665bea53cf
2 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
![]() |
3838bddcdb |
AngleViaPoint Constraint
AngleViaPoint: fixes in UI routines + new messages Goofed undo message in tangency via point is fixed. Forgotten updateActive, clearSelection have been added. New more informative error messages for tangent constraint. AngleViaPoint: using it instead of via line tangency * replaced the helper construction line for ellipse-to-ellipse and similar tangency with a point. Using tangent-via-point there * deleted tangency via line for point-to-point on (cherry picked from commit 9e3fa8c8de0f49c0ef3c978e015eb905358dbdd9) AngleViaPoint: internal/external tangency locking *Added automatic tangency type lockdown for all new constraints (only for point-wise tangency). Tangency type is stored in the constraint datum field, as an angle value shifted by Pi/2 (to be able to treat 0.0 as undefined type). Added ability to switch the tangency by setting datum value from python (can be abused by passing arbitrary angle). Further simplified the tangency related code in Sketch.cpp. AngleViaPoint: added license to Geo.cpp AngleViaPoint: renames in Constraints.cpp/.h Changed some names to increase self-explanatoryness: bool "remapped" renamed to "pvecChangedFlag" "ReconstructEverything()" renamed to "ReconstructGeomPointers()" AngleViaPoint: renames in Constraints.cpp/.h Changed some names to increase self-explanatoryness: bool "remapped" renamed to "pvecChangedFlag" "ReconstructEverything()" renamed to "ReconstructGeomPointers()" AngleViaPoint: using for endpoint perpendicularity + direction lockdown, just as with tangency. + quite a lot of old code is gone because of that AngleViaPoint: perp-ty UI routine made similar to tangent (Git has made a very messy diff.) The changes are: * Perpendicularity-via-point (3-element selection) support added. * Endpoint-to-curve and endpoint-to-endpoint supports all shape combinations. * a bit of code cleanup and clarifications. AngleViaPoint: placement of perpendicular icon in 3d view AngleViaPoint: fix: allow setDatum of perpendicular constraint AngleViaPoint: fix: centers of ellipses are not endpoints isSimpleVertex used to return false for centers of ellipses and arcs of ellipses, which made them being accepted for point-to-point tangency. Should be fixed forever, mo more changes are expected to be necessary for new types of geometry. AngleViaPoint: precalc with OCC (work in progress) Work in progress (not yet working). Using OCC's tangent to replace implementation of SketchObject::calculateAngleViaPoint. AngleViaPoint: fix math: normal now points inwards, where it was intended initially and goofed up. AngleViaPoint: adding comments to the code AngleViaPoint: using GeomCurve::closestParameterToBasicCurve for angle precalculation AngleViaPoint: Py method: changeConstraintsLocking changeConstraintsLocking(True) - locks/re-locks all lockable tangency/perpendicularity constraints of the sketch (applicable to existing sketches). changeConstraintsLocking(False) - removes locking information from lockable constraints AngleViaPoint: final SketchObject::calculateAngleViaPoint Now, finally, using OCC functionality (thanks Abdullah!), without composing temporary Sketch object. |
||
![]() |
501c40f0e6 |
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. |