Measurements

Leading up to this project, I’ve been on a several month hiatus from anything to do with FreeCAD, as I’ve been either too busy or on the road since my last involvement. I started out this post intending to contrast a few different ways of adding a dimension (aka measurement) to a drawing, and create a TODO item to clean up the tools involved in working with dimensions.

What I’ve ended up with is a whole mental list of things that I’d like to see fixed, which are mostly unrelated to dimensions. There’s a lot about the current version of FreeCAD that’s not very intuitive, but that I had gotten used to previously. With a fresher perspective, all the little interface bugs that I had gotten used to have made themselves obvious again… That’s the whole trick with software development though – breaking down big problems until they’re down to lines-of-code level. This software is very much under development – the guts are there, but there’s a lot of polishing to be done.


Anyways, getting back to measurements, we have the obvious measurement tool that is present in all FreeCAD workbenches, represented with this little icon:

measurement tool 1 icon

Although it is quite simple and has some significant shortcomings, it has two major positives: it is relatively intuitive, and it is consistent. I can click two points on a drawing and get the distance between them. The endpoints don’t snap, but the “Properties Editor” is quickly discovered and can be used to manually enter coordinates or nudge the points around.

The measurement tool doesn’t “stick” to objects – in this trivial example, I’ve “measured” the cone, then changed the cone size and the measurement doesn’t follow.

measurement tool 1If we go into specific workbenches, there are other ways to add dimensions that are more-or-less similar to the first method, for instance this toolbar in the Part workbench:

part toolbar measurement icons

or this one in the Draft workbench, which admittedly I haven’t played with recently:

Draft measurement tools

Then, there are the constraints in Sketcher, which are not the same as a dimension, but have a lot in common in terms of user interaction:

constraint in sketcher

There are also dimensions in a development branch that I intend to have a look at in another post…

So, what needs to happen? It seems to me that adding a dimension to a CAD drawing is a fairly universal need, and so there should be a fairly universal tool in FreeCAD to address it. There should be no need for that tool to be implemented in every workbench that might need dimensions rendered.

Further, there are several open issues with rendering the constraints in Sketcher, so perhaps a good solution is to add a “layer” to the “Viewer”, designed around rendering things like constraints or dimensions. Things rendered in that layer could be linked with the 2- or 3-D objects in the scene, so it shouldn’t be necessary to manually adjust dimensions whenever objects they relate to are adjusted.

Cost: 1 beverage (interrupted by a nice walk in our beautiful botanical gardens!)

3 thoughts on “Measurements

  1. ickby

    Hey Ian,

    Nice Idee, having a unified measurement toll and visuals would be nice. Just a few thoughts that came up while reading your post.

    The main problem to work with is freecads workbench system. If you want to make something universal (compared to every workbench with a custom implementation) it would need to be located in the main code. But then it does nothing know of the workbenches and can’t use their specifics. That is why the general measurement tool only uses the scenegrpah for measurements and is therefore very limited and inaccurate. The part tools are highly accurate as they can use open cascade directly. So one would need to come up with some kind of (currently non-existing) communication system. I imagined it as “action” system: somewhere a action is defined and executed, this may be a workbench or the core, and then this action is propagated to all workbenches. They check the action type and decide if they want to provide input for this action. Then part would handle shapes, mesh meshes etc. One problem would be of this shall be a app or GUI system, most likely both as there are use cases which require data actions and some require interface actions.

    IMHO such a system would be needed for the task and very useful in general as I can think of multiple tools working over workbench borders (snapping, clipping…), but I came never around implementing it. Also this is a major design Desi on, so needs convincing and approval.

    The simplified version of the task would IMHO be the creation of a unified measurement representation and let the work bench tools all use it. This would circumvent all the problems.

    Like

    Reply
  2. ianrrees Post author

    Thanks ickby! Yes, the workbench approach does complicate things a bit. I’ve not looked at the interface between the workbenches and the main code very much (except for some work I did with keyboard shortcuts that never got merged, should dig that up…), but would imagine that there wouldn’t need to be very many API additions to support the sort of behaviour I’m imagining. Will think about it and maybe expand later if this is something people are interested in. -Ian-

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s