How to use the "Measure Distance" tool effectively?

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!
peepsalot
Posts: 50
Joined: Sun Nov 13, 2011 9:44 pm

How to use the "Measure Distance" tool effectively?

Post by peepsalot »

There is a tool in the "Inspection Workbench" called "Measure Distance" which I am finding difficult to use. I could not find any mention of this tool on the wiki so I thought I'd ask here.

What I want to do is measure some basic dimensions of an imported STL file. The problem i have is that I end up measuring slightly off of the line that I want. Is there a way to constrain to an axis or to a face normal or some other useful tips for making this easy to get useful dimensions out of things? For example in some cases I want to measure the distance between two parallel faces, but I'm just getting the distance between two arbitrary points within the faces.
wmayer
Founder
Posts: 20074
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: How to use the "Measure Distance" tool effectively?

Post by wmayer »

First of all this tool is available in all workbenches, not only in the inspection workbench. And also this tool is kept very simple, yes you can only measure the distance between two points. So far, there is no possibility to set constraints or so. The actual intention of it was to get a rough feeling in what dimension an object is, so if it's in meters, millimetres, nanometres, ... But you can't measure precisely with it as is.
jmaustpc
Veteran
Posts: 11211
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: How to use the "Measure Distance" tool effectively?

Post by jmaustpc »

Hi all
This does not really answer this question but is related .... sort of.

If you have a shape, in this example a simple cube, (I assume doesn't work with mesh (stl)), you can set its display mode property to "points".

Then in "part" wb ...create primitives... gui pops up, below position you have x, y , z. Then you have a button "3dview". If you click on this button then click anywhere on a shape, the position of the click is transferred to the x, y, z for "position".

If you have set the cube to view parameters "points" it only shows the 8 corner points of the cube. If you move the mouse until the point is highlighted then it is easy to EXACTLY gain the position of that point, you can then move to another point and do the same. In a simple cube you have now have its dimensions.

Now if you do the same thing, (but forget about the make primitives gui) with the measuring tool you can very easily get the exact distance between two points.

If it does not work with a mesh, you could convert the mesh to shape and then do one of these two tricks above, obviously the more complicated the shape the more difficult the methods are, but thought I would mention these methods just in case it is useful to you or anyone else.


Jim

edit: - here is a screen shot if anyone wants it. I have not yet set up a remote image server, sorry for the inconvenience.
jmaustpc
Veteran
Posts: 11211
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: How to use the "Measure Distance" tool effectively?

Post by jmaustpc »

I just tried it with a few standard mesh shapes.

You can make it show points only, but unlike in the part work bench, the mouse does not automatically select the point and high light the point, so it does not give you the complete precision that you easily get in "Part wb".


Jim
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to use the "Measure Distance" tool effectively?

Post by NormandC »

I was wondering if you could actually take any kind of measurement out of an STL file? Because in the pro mid-range CAD software I use at work (Solid Edge), you simply can't.

In case you don't know (otherwise forgive me for stating the obvious), STL is above all an output format. STL stands for "stereolithography" which was one of the earliest types of rapid prototyping. Such a file is almost unusable in CAD... although I guess it could be used for FEM?
peepsalot
Posts: 50
Joined: Sun Nov 13, 2011 9:44 pm

Re: How to use the "Measure Distance" tool effectively?

Post by peepsalot »

jmaustpc wrote:Hi all
If it does not work with a mesh, you could convert the mesh to shape and then do one of these two tricks above, obviously the more complicated the shape the more difficult the methods are, but thought I would mention these methods just in case it is useful to you or anyone else.
How can you convert a mesh to a shape?
jmaustpc wrote:I was wondering if you could actually take any kind of measurement out of an STL file? Because in the pro mid-range CAD software I use at work (Solid Edge), you simply can't.
STL files import as a mesh, and you can use the measure distance tool to get distance between arbitrary points on the surface of the mesh, which is what i was talking about in my first post. You can't really snap it to vertices or any other sort of exact dimensioning though.

Here is an example:
Image
This piece I'm pretty sure was created with exact millimeter dimensions, but can't tell for sure since i can't pick any exact points on it to measure between.
The reason I want to measure these STL files is there are many models of 3D printable things that I would like to be able to convert into parametric Python scripts and have certain dimensions of them be configurable.

So, it would be great if vertices/edges/facets of a mesh could be measured.

Ideally I would like to see a measurement tool that can measure from any of vertex/edge/face(t) and any combination for each endpoint.

Depending on the type of selected objects being measured, it could exhibit different smart behaviors.
Vertex to vertex: simple distance between two points
Vertex to edge: option to get distance between edge line and an imaginary parallel line which passes through the vertex
Vertex to face: option to get distance between face and imaginary parallel plane which passes through the vertex (length of face plane normal to the vertex point)
Edge to Edge: if edges are parallel, give distance between them, if not then user can choose arbitrary points along the lines
Edge to Face: option for face place normal length to point on edge
Face to Face: if faces parallel, give distance between them, otherwise user can choose arbitrary points inside face

Does any of this make sense? I'm currently looking into writing my own python scripts to experiment with some of these ideas, but still learning much of the API.
Last edited by peepsalot on Tue Nov 29, 2011 3:44 am, edited 2 times in total.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to use the "Measure Distance" tool effectively?

Post by NormandC »

Hi,

You can convert a mesh into a shape in the Part workbench, by the "Part --> Create Shape from Mesh" menu (there's probably a python command for that but I don't know it). I just tried, and once converted to shape, you can select vertexes.

I don't know if you can get the kind of info you're looking for. If you're experimenting with Python scripts, you're well ahead of me already!

But if you don't mind my asking: why do you need to get such detailed measurements out of mesh objects?
peepsalot
Posts: 50
Joined: Sun Nov 13, 2011 9:44 pm

Re: How to use the "Measure Distance" tool effectively?

Post by peepsalot »

Sorry i was editing my post at the time you replied to it, I added an explanation of why I want to measure these things above.

What I basically want is a virtual caliper for precise inspection of parts. Oh, and a virtual protractor would be nice too!
peepsalot
Posts: 50
Joined: Sun Nov 13, 2011 9:44 pm

Re: How to use the "Measure Distance" tool effectively?

Post by peepsalot »

OK, after converting to a part, it is much easier to measure dimensions since vertices are selectable.
Image

The main challenge now is finding exact radius or diameter of circles. I think I can compute that fairly easy from three points on the circle though.

Then maybe something to mark the center of the circle for measuring distance to the edge and/or between other circle centers.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to use the "Measure Distance" tool effectively?

Post by NormandC »

Hi,

I understand now, but the fact is, those STL files are next to useless. I consider myself an experienced CAD user (couldn't write a Python script by myself if my life depended on it though ;) ), and I'm aghast at the proliferation of all those STL files, because to me they are complete garbage, worthless to work with in a CAD system. I understand it's easier to deal directly with an STL file when you goal is to print it, but I wish people who share those files would provide the original CAD files as well, or at least some properly dimensioned blueprint to recreate them from scratch. On Thingiverse, very few have the insight to provide STEP files along with STLs.

Anyway, I wish you good luck, since if you succeed in making this tool everyone will benefit! :)

P.S. You may know of the FreeCAD initiative to remodel all the parts from the Prusa Mendel in FreeCAD parametric format? viewtopic.php?f=8&t=1867
Post Reply