TechDraw_DimensionRepair: Problem changing dim in iso view to References 3D

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

TechDraw_DimensionRepair: Problem changing dim in iso view to References 3D

Post by Roy_043 »

I am not sure if the TechDraw_DimensionRepair tool should be used for this:
  1. Open the attached file.
  2. Select Edge6 from the Box in the 3D view.
  3. Add the dimension to the selection.
  4. Call TechDraw_DimensionRepair.
  5. The "References 3D" section shows the preselected geometry.
  6. Click the "Replace ..." button.
  7. The "References 2D" section is now empty.
  8. Click the OK button.
  9. Result: the dimension has changed to vertical and still seems to reference 2D geometry. "References 2D" is now just "View". The "Measure Type" is still "Projected".
There is an inconsistency in the task panel:
If the dimension references 2D geometry, and you preselect alternative 2D geometry, then the new selection is not displayed in the task panel.

There is also an issue with undo. Undoing the actions of TechDraw_DimensionRepair does not seem to work.

Code: Select all

OS: Ubuntu 22.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31598 (Git) AppImage
Build type: Release
Branch: master
Hash: f7db685a2821adaf23c85a25855401ecc1eeff2c
Python 3.10.8, Qt 5.15.6, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Attachments
TechDraw_DimensionRepair-iso-dim.FCStd
(18.69 KiB) Downloaded 29 times
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: TechDraw_DimensionRepair: Problem changing dim in iso view to References 3D

Post by wandererfan »

Roy_043 wrote: Tue Jan 17, 2023 10:50 am
Great feedback. Thank you.

git commit 72df799770 should address these points:

Result: the dimension has changed to vertical and still seems to reference 2D geometry.
>>> the 3d geometry is along the Y axis, which we would normally consider to be vertical, but of course the projection of the 3d geometry is not vertical. I've changed this to use the projected points to determine vertical/horizontal with 3d references

"References 2D" is now just "View".
>>> this is as it should be. Once 3d references are assigned, the 2d references are irrelevant, and we only need to know what View the dimension belongs to. This is a change from the previous implementation where 2d references were always required to draw the dimension. Now we project the 3d references directly onto the view. This makes the dimension much more robust in the face of changed edge numbering.

The "Measure Type" is still "Projected".
>>> see this discussion. https://www.forum.freecadweb.org/viewto ... 46#p644346
>>> in the previous implementation, if there was a 3d reference, then the dimension was "True". In this implementation
a dimension is always "Projected" unless set to "True" by the user.

If the dimension references 2D geometry, and you preselect alternative 2D geometry, then the new selection is not displayed in the task panel.
>>> Now, when the dialog starts, the current dimension references are displayed. Selected geometry is only displayed after
"Replace references with current selection" is pressed.

There is also an issue with undo. Undoing the actions of TechDraw_DimensionRepair does not seem to work.
>>> I think this is fixed, but there seems to be a delay before the PropertyEditor reflects the undo.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: TechDraw_DimensionRepair: Problem changing dim in iso view to References 3D

Post by Roy_043 »

Thanks. Will try again with the next weekly.
Post Reply