wandererfan wrote: ↑
Thu Nov 08, 2018 12:53 pm
I suspect this would be a partial solution at best.
If the geometry has changed enough that the old Edge/Vertex numbering is incorrect, the endpoints of the the Dimension are likely to be different too.
That is probably true, which would make my idea an incomplete hack at best. After geometry update, it would be possible to search for the closest compatible new vertices near the old dimension endpoints, if no vertices would be exactly at the expected positions. This would, however, be both computationally expensive, and very likely unreliable under any serious 3D geometry changes, too. The upside would be that it would probably be straightforward to implement, and it would improve the current situation somewhat.
As pointed pointed out at the Wiki, the proper way would be to have a 3D <-> 2D mapping of the vertices/edges, but if I understood correctly this is difficult/missing with the current OCC system. At which operation is the numbered correspondence between 3D and 2D geometry lost in the current TechDraw implementation? Is it the flattening of the 3D geometry into a 2D plane, probably made using some OCC algorithms? Or do the actual 3D vertice/edge numbers already change randomly in PartDesign when editing a model?
I wonder if there is some industry-agreed algorithm to solve this 3D -> 2D mapping reliably. I mean, in the general case there are an unlimited number of points in 3D-space that map to exactly the same 2D point (for a given flat projection). Also, editing a 3D model adds and removes edges and vertices in an unpredictable sequence. When the user selects a 2D-point, which underlying 3D point (s)he actually wants to choose? I guess this problem would arise even if there would be a complete correspondence system between the 3D and 2D geometries. Perhaps the default choice should be the 3D point closest to the viewer.
Thinking about this, I now understand this is actually a pretty hard problem.