Draft: Fix dimensions of parametric circles

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
Post Reply
nizovn
Posts: 1
Joined: Sat Oct 21, 2017 12:20 pm

Draft: Fix dimensions of parametric circles

Post by nizovn »

Hello!
I'm new to FreeCAD, using it since this week. I find it very useful and it satisfies my needs (paramentric drawings). Thanks a lot for this project!
However, there is one bug (or maybe it's just my misunderstanding how tool should work) which is very important for me: parametric dimensions in Draft Workbench for curved edges doesn't work correctly.
For example, these are simple commands which create cylinder and dimension of it's diameter:

Code: Select all

App.ActiveDocument.addObject("Part::Cylinder","Cylinder")
import Draft
Draft.makeDimension(FreeCAD.ActiveDocument.Cylinder,0,"diameter",FreeCAD.Vector(0.0,0.0,12.0))
This is the result:
old.png
old.png (120.87 KiB) Viewed 1341 times
You can see that resulted dimension line is orthogonal to cylinder's edge, and such dimension is not useful.
So, I fixed this behavior, and after these changes (see below), the result looks as expected:
new.png
new.png (119.11 KiB) Viewed 1341 times
About:
OS: "NAME=Gentoo"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.Unknown
Build type: Release
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.9.1

PR: https://github.com/FreeCAD/FreeCAD/pull/1050
Post Reply