Can I make a dimension/measurement line stay coplanar with a face?

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Can I make a dimension/measurement line stay coplanar with a face?

Post by wisecad »

Hi Folks,

- Introduction (you can skip this detail and go directly to the problem section):
I am having a very annoying problem. :( Let’s say I create a dimension/measurement line to measure an edge’s length, the dimension/measurement line being aligned to a custom working-plane that references a particular face (that face being adjacent to the edge being measured). That dimension/measurement line would also be coplanar with regard to the face that the custom working-plane is referencing. That makes perfect sense, and so far so good. :)
However, let’s also assume that the position of that face is controlled by a parameter in a spreadsheet. If that parameter changes, the face will change its position, but the dimension/measurement line won’t also change to “follow” the face to its new position. The dimension/measurement line will instead stay aligned to the custom working-plane’s original position, consequently looking now slanted/angled relative to the face to which it used to be coplanar. :cry:

Problem:
Here is an example (please see the picture below). I have created a dimension/measurement line, measuring an edge (38mm in length) that is adjacent to a face, which I have referenced to create a custom working-plane (still displayed for your convenience), on which said dimension/measurement line has been created. Now, the position of the referenced face is determined by a parameter on the spreadsheet on the left. Changes to the 5th parameter, named OuterWallThickness, will cause the face to shift position alongside the x-axis. The parameter had a value of 7mm when the dimension/measurement line was created on the displayed custom working-plane (created using the measured edge’s adjacent face as reference). The dimension/measurement line is at this point still coplanar with the face and therefore looks straight relative to the face.
Software-Freecad-Issues-07-DimensionMeasurementArrowLinesDoNotStayCoplanarWithReferenceFace-01.jpg
Software-Freecad-Issues-07-DimensionMeasurementArrowLinesDoNotStayCoplanarWithReferenceFace-01.jpg (208.38 KiB) Viewed 1438 times

Now, when the parameter is changed to be 10mm and consequently the face shifted 3mm on the x-axis, the dimension/measurement line does not shift together with the face, and it is still aligned to the custom working-plane’s original position (on which the dimension/measurement line was originally created), consequently looking now slanted/angled. Please see the picture below.
Software-Freecad-Issues-07-DimensionMeasurementArrowLinesDoNotStayCoplanarWithReferenceFace-02.jpg
Software-Freecad-Issues-07-DimensionMeasurementArrowLinesDoNotStayCoplanarWithReferenceFace-02.jpg (203.44 KiB) Viewed 1438 times

QUESTION: Is there a way to make a dimension/measurement line to stay coplanar with a face?


Thanks in advance for your time and for your answers. :)

Cheers

Raoul
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by chrisb »

Draft is partially not parametric and this is one of these cases.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by wisecad »

Hi Chrisb,
Thanks for your answer. :)
So, there is absolutely no way to make a dimension/measurement line stay coplanar with a face? :cry:
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by thomas-neemann »

wisecad wrote: Sat Jun 05, 2021 8:57 am
here is a possibility


Bildschirmfoto_2021-06-05_12-39-14.png
Bildschirmfoto_2021-06-05_12-39-14.png (25.55 KiB) Viewed 1386 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by wisecad »

Hallo Thomas-Neeman :D Vielen Dank again.
That is a very clever solution. :idea:
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by wisecad »

Thomas-Neemann,
Your solution is a general solution to many of FreeCAD’s current limitations. :idea: Thank you for sharing that trick. :D
I think of it now as more of a mindset, than a trick or a specific solution to a specific problem, at least for those whom are already familiar with FreeCAD expressions. More on that later.
The reason your solution is a general solution for many of FreeCAD’s current limitations is better conveyed with an example. Today, I was going to post a question about another problem in FreeCAD also related to dimension lines. While dimension lines that are derived-from/linked-to edges, properly update their dimensions (although not their position, as we saw before) when the model changes; dimension lines that are derived-from/linked-to individual points (so called “point-to-point”), do not update even their dimensions let alone their positions. This is a severe limitation, forcing users in some cases to update lots of dimension lines by hand, potentially missing some. However, your suggested solution to use expressions to link a dimension to other data-values in the model (including spreadsheet values) solves also this problem in addition to the one I had asked for help originally in this post. It figures this could be an easy and powerful way to solve many of the limitations we currently face while FreeCAD remains in beta version.
As for this information being something that is better for the community to promote more as a mindset than an individual solution to different problems, here are my thoughts. I already had learned about expressions, and was using them to link dimensions in my model to values in a spreadsheet. However, when you start to think of expressions as a way to link pretty much everything, that is when all sort of possibilities open up. Consequentially, developing a mindset though which you conceive of everything being potentially linked by using expressions, should be emphasized to newbies like myself as one of the fundamental ways to use FreeCAD.
Expressions are becoming one of my favorite FreeCAD features. :geek:
Again, thank you for sharing this idea.
Cheers
Raoul
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by thomas-neemann »

wisecad wrote: Sun Jun 06, 2021 3:58 am
hallo raoul

thank you for this nice feedback. am currently in the process of testing this technology for draft triangle faces as a replacement for datum planes in part. if it works I'll link a video here.

greetings thomas
Last edited by thomas-neemann on Sun Jun 06, 2021 7:07 am, edited 1 time in total.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
onekk
Veteran
Posts: 6098
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by onekk »

Sorry for bothering, only a free thinking, to put something in the discussion.

Maybe a better solution would be to modify the source code of dimensions, to take link them to some properties of the original object, but I think that this could be done after the Toponaming issue will be resolved.

If I link the dimension to say obj1.edge1 to obj2.edge2 and specify a position say (obj1.edge3.Lenght * 0.5) when the object is modified all the measure will be recalculated.

If the naming is coherent across modification of the object the only drawbacks could be if some "reference object" is deleted.

But also with spreadsheet there is this possibility, if the reference cell will be delete all the dimensions related to it are broken.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by chrisb »

Moved to Draft forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
thomas-neemann
Veteran
Posts: 11729
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Can I make a dimension/measurement line stay coplanar with a face?

Post by thomas-neemann »

wisecad wrote: Sun Jun 06, 2021 3:58 am
hallo raoul



it works. here is an example of a parametric "datum-plane" in part

https://www.youtube.com/watch?v=TUcBd0rEiF4



Bildschirmfoto_2021-06-06_12-53-01.png
Bildschirmfoto_2021-06-06_12-53-01.png (75.69 KiB) Viewed 1218 times


Bildschirmfoto_2021-06-06_12-16-50.png
Bildschirmfoto_2021-06-06_12-16-50.png (90.91 KiB) Viewed 1230 times

Greetings Thomas
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply