[Macro] Snap Dimension lines to same length / re-center dimension

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: [Macro] Snap Dimension lines to same length / re-center dimension

Post by reox »

Yes, I would do that. But before I would like to iron out a few kinks that are still in the macro. For example, I found out that the calculation is not correct for generic Distance measures if the edges are not co-linear.

edit: this should be fixed now, it is working now for all kinds of distances (i tested :P)
User avatar
M4x
Veteran
Posts: 1472
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: [Macro] Snap Dimension lines to same length / re-center dimension

Post by M4x »

Push

Maybe the re-center part could be included into the Macro version 4.2 multilanguage: helper tools to improve TechDraw documents.
edi wrote: pinged by pinger macro
edi
Posts: 481
Joined: Fri Jan 17, 2020 1:32 pm

Re: [Macro] Snap Dimension lines to same length / re-center dimension

Post by edi »

This tools are already existing in TechDrawTools.FCMacro. https://github.com/FreeCAD/FreeCAD-macr ... ls.FCMacro
TechDraw1006.png
TechDraw1006.png (9.34 KiB) Viewed 1662 times
User avatar
M4x
Veteran
Posts: 1472
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: [Macro] Snap Dimension lines to same length / re-center dimension

Post by M4x »

The recentering of the dimension "number" on a dimension line itself? I thought you've said some days ago that's it's not implemented yet (I still have to answer to your question after having a deeper look.if I recall correctly).

Here it is: https://forum.freecadweb.org/viewtopic. ... 4&start=70
edi wrote: Mon Sep 20, 2021 3:39 pm
M4x wrote: Sun Sep 19, 2021 7:25 pm feature request
I'd like to be able to center the "number" showing the value of a dimension at a (for example) horizontal dimension. I think that's the initial state after adding a dimension.
It is easy to realize this in python, but it will be difficult to handle it. Before manipulating any measure you have to select it. Only the measure value (number) can be selected. If you select it using the curser you usually move it a little bit (without aim). Therefore the positioning and cascading tools keep the position of the number. A solution could be to have an optional choice keep/center when using the position and cascade tools.
Post Reply