Tuesday, 5 March 2013

Thoughts on making Measurements

After having some troubles with projected faces (dealing with correct wire orders)  for the mean time I have considered looking at measurements or the ability to add parametric dimensions to drawings. These are dimensions which will update with geometry accordingly.

With some discussion on the forums about this: further discussion encouraged the idea for a generic measurement framework which would be useful throughout FreeCAD to make useful parametric dimensions and 'temporary' measurements which are common place inside most CAD packages.

Temporary measurement is a tool that provides a quick and convenient method to check the length of an edge or the distance (including components) between two points. These points use geometric references to provide a more accurate measurement unlike previously.

Parametric dimensions are more permanent and would be stored inside the Document as a feature or an annotation in the Drawing Module.

The Measurement framework aims to take a set of geometric entries such as line edge or two points and calculate the distance between them using a given vector. This is fairly simple stuff, but having a centralised framework would allow it to be adopted in other areas in FreeCAD, namely the Drawing Module for providing dimensioning support. it is in fact possible to calculate this from the projected shapes inside Drawing but using the previous reference geometry provides a means of obtaining the 'true' value for the geometric feature and will adapt to changes to the 3D Part more sensibly. However, in the future there could be an option for using projected lengths. 

Eventually, I would imagine this can be extended for displaying and calculating more complex properties such as moment or inertia, centre of mass etc. For the time being the measurement framework will only provide a c++ and python framework. The focus for the interface is simplicity - where it will specify the geometric features used and should then be able to determine measurement. There will be most likely ambiguous cases so giving an option to override this seems sensible.

In the Drawing Module  my aim is to apply a similar philosophy of creating dimensions using one tool; some people don't prefer this understandably, so there will tool bar and menu options for creating specific dimension types. In most cases this will allow convenient dimensioning.

I still need to figure out including point contacts since these are not explicitly projected by OCC and are contained inside the edge data.

This was slight regurgitation of thoughts I had on this before I attempt to start so apologies if this wasn't written well.

+ Checking out the current state of the Drawing Module:

I figured that it would be good idea to share my progress so far and allow people to contribute. The module is no where near ready for any testing - so please don't point out the obvious if something's broke. If there are any users interested in helping develop I would be more happy to take feedback and contributions to help with development!

Please checkout the github repo:


  1. What I would like to see is the ability to add
    10.2mm (+0.01, -0.03)
    9.80 (+0, -0.04)


  2. That would be included as a property in the Dimension Feature so I would be sure this is possible.