FreeCAD: master 501c40f0

Author Committer Branch Timestamp Parent
Abdullah Tahiri wmayer master 2014-11-01 15:12:18 master 80120a6b
Affected Issues  0000909: Disappearing sketches due to tangency autoconstraint
Changeset Sketcher: Ellipse implementation enhancements

- ArcOfEllipse enhancement: Tangency ArcOfEllipse to ArcOfEllipse or ArcOfCircle by selecting end/starting points...
- Minor bug corrections (Thanks DeepSOIC)
- ExposeInternalGeometry python command
- DeleteUnusedInternalGeometry python command
- On deletion of an Ellipse/ArcOfEllipse all further unconstrained internal geometry is also deleted.
- This cleans up the code by eliminating code repetition in the creation methods.
- Major bug fix for autoconstraints for ellipse and arc of ellipse creation (for both creation methods)
- Major bug fix Start and Endpoint constraints of an arc of ellipse where not taking into account that Sketcher arcs are always CCW, so they have to be exchanged if we convert a CW arc into a CCW arc.

Sketcher: General bug fix: Tangency wrongly suggested

What?
=====
- On creation of a shape autoconstraints are suggested.
- Tangent autoconstraint was suggested even with lines perpendicular to the tangency direction

Reproduce
=========
- Make a circle on the origin and move the mouse along the X axis, it will suggest a tangency that is impossible
- Click on the axis and no circle will be created

Solution
========
- The SeekConstraint now can use the parameter dir to give a direction that is substantially perpendicular to the expected tangency, so that
if an object having a direction (a line) is hit, a tangency will not be suggested if within around 6 degrees of being parallel.
- Additionally, if such a line is an X,Y axis of the sketch, tangency will only be suggested if the direction is within 6 degrees of being perpendicular (i.e. it is almost tangent already while sketching).
- This difference is due to the fact that an X or Y axis can not "move" to meet the object under creation, whereas a line can.
mod - src/Mod/Sketcher/App/Sketch.cpp Diff File
mod - src/Mod/Sketcher/App/SketchObject.cpp Diff File
mod - src/Mod/Sketcher/App/SketchObject.h Diff File
mod - src/Mod/Sketcher/App/SketchObjectPy.xml Diff File
mod - src/Mod/Sketcher/App/SketchObjectPyImp.cpp Diff File
mod - src/Mod/Sketcher/Gui/CMakeLists.txt Diff File
mod - src/Mod/Sketcher/Gui/CommandConstraints.cpp Diff File
add - src/Mod/Sketcher/Gui/CommandConstraints.h Diff File
mod - src/Mod/Sketcher/Gui/CommandCreateGeo.cpp Diff File
mod - src/Mod/Sketcher/Gui/DrawSketchHandler.cpp Diff File