[Solved] - Curve length measurements ?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: Curve distance measurements ?

Post by Gift »

raminee wrote: Mon Jun 27, 2022 7:00 pm Ok let me clarify my question again :

(see new image )

I DO NOT wish to measure the distance between two curves/arcs.

I wish to measure the distance of a curved edge/line.

The curve is not a circle or a geometric shape where I can measure or calculate the curved distance.


R.

Q3.jpg
The distance is not a const. Do you want get the normal from a point of the curve and calculate the distance to other curve?
raminee
Posts: 18
Joined: Thu Jan 05, 2017 7:47 pm

Re: Curve distance measurements ?

Post by raminee »

I just want to measure how long is the green line in the previous image .
Imagine if you were to stretch the green line into a straight line then what would be the length of it.

R.
User avatar
Vincent B
Veteran
Posts: 4731
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curve distance measurements ?

Post by Vincent B »

GeomInfo in Curves Wb. ;)
raminee
Posts: 18
Joined: Thu Jan 05, 2017 7:47 pm

Re: Curve distance measurements ?

Post by raminee »

YES !!!!!!

THANK YOU Vincent B !!!!
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: Curve distance measurements ?

Post by adrianinsaval »

raminee wrote: Mon Jun 27, 2022 7:07 pm I have done the python command sub.Length, as suggested earlier by drmarco, but it just gives me the following error

Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'sub' is not defined
you are most likely using an outdated version of FreeCAD, the current stable release is 0.20. Please follow the guidelines in the big red banner above when asking for help and post your full FreeCAD info.
Anyways, the curves workbench solution is likely a more user friendly option.
drmacro
Veteran
Posts: 8978
Joined: Sun Mar 02, 2014 4:35 pm

Re: Curve distance measurements ?

Post by drmacro »

raminee wrote: Mon Jun 27, 2022 7:07 pm I have done the python command sub.Length, as suggested earlier by drmarco, but it just gives me the following error

Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'sub' is not defined
Select the edge
hit Ctrl+Shift+P If you don't do this then the object "sub" will not exist and this is the error you see.
now in the Python console: sub.Length

But, the Curves workbench is probably better for you. ;)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
domad
Veteran
Posts: 2092
Joined: Mon Jun 22, 2020 12:16 pm

Re: Curve distance measurements ?

Post by domad »

raminee wrote: Mon Jun 27, 2022 6:14 pm ......
A very practical alternative to classic measurement tools is to draw precise lines, using the snaps functions, then read the length from the parameters panel, once the reading is finished, delete them or include them in a Group folder.
raminee
Posts: 18
Joined: Thu Jan 05, 2017 7:47 pm

Re: Curve distance measurements ?

Post by raminee »

I updated the FreeCAD version and now sub.Length works as well.

Thank you all for your support.

Now onto my next question in another upcoming post

R.
edwilliams16
Veteran
Posts: 3179
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Curve distance measurements ?

Post by edwilliams16 »

Try again, it should work. If not, upload the file and tell us which edge you are selecting. Also tell us what shows up in the Python Console after you typed Ctrl-Shift-P (Command-Shift-P on a Mac)

Select the edge.
type Ctrl+Shift+P
go to the python console and type: sub.Length
hit enter and see the length.

EDIT: Missed the previous answers somehow.
chrisb
Veteran
Posts: 54167
Joined: Tue Mar 17, 2015 9:14 am

Re: Curve distance measurements ?

Post by chrisb »

raminee wrote: Mon Jun 27, 2022 8:39 pm Thank you all for your support.
Would you mind changing th subject of the first post, which is also the title of the topic? The native speakers may correct me, but you are not asking for a distance, but rather for the length of a curve. (A distance is always the measure to some other thing.)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply