I'm exploring the many features of FreeCAD, and am trying out the dimension tool, but getting some odd results. I would like to know if I am doing something wrong (most likely) or something else is going on.
I have a quite simple part which I created using a series of csg operations. It is slightly cuved along the dimension which is around 30mm, but straight along the other dimensions, and is shown below:
:
I created the dimension with ~size 110mm by using 'select edge', same with the vertical dim of size 5.94. The other dim I created by selecting the vertices at either end. There are some problems with this dimension. The reported size of this is not correct (although I know I can override the text), and when I rotate or move the object from the standard view it is not actually attached where it should be (see image below).
If I create the other dimensions on the straight edges by selecting each vertex (rather than using 'select edge') the dimensions are also wrong, see below where I've done this.
The dimension again doesn't move with the part when rotated.
In case it's something I'm doing wrong, here is exactly how I added the dimension:
1. Activate Draft
2. Click on Add Dimension
3. Hover over desired vertex selection, click when highlighted with a filled circle, and the little green symbol beside the cursor is a green dot with a line sticking out of it
4. Hover over second desired vertex, click when highlighted with a filled circle, and the little green symbol beside the cursor is a green dot with a line sticking out of it
5. place the dimension line wherever
During this process, the numbers in the dimension tool never match the vertex location displayed in the FreeCAD main window as I hover over the shape components.
I am using the development version of FreeCAD from git on Linux, cloned yesterday, but get the same behaviour in the released version 0.14 as well.
EDIT--UPDATE
I have found I can get the correct behaviour by adding the dimension manually through the python API. Steps are:
1) print first vertex (would be nice if there was an easier way to display this info for debugging purposes, and yes, I know it is briefly displayed in the main window when you hover):
Code: Select all
print(FreeCADGui.Selection.getSelectionEx()[0].SubObjects[0].Point)
Code: Select all
print(FreeCADGui.Selection.getSelectionEx()[0].SubObjects[0].Point)
Code: Select all
Draft.makeDimension(FreeCAD.Vector(X1, Y1, Z1),FreeCAD.Vector(X2, Y2, Z2))