From 31d803d46be5bd187a7b18c36cee8ceb556ecaec Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Tue, 12 Jan 2016 16:13:03 +0100 Subject: [PATCH] Hyperbola PointOnObject UI Constraint You can add a point to be on the hyperbola and it will lock to it. The endpoints of the hyperbola go crazy because of the HyperbolicArcRangeToEndPoints code that is the one of Ellipse <= Awaiting DeepSOIC help ;) --- src/Mod/Sketcher/App/Sketch.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 25c07c38a0..34591a9cb4 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -735,6 +735,9 @@ GCS::Curve* Sketch::getGCSCurveByGeoId(int geoId) case ArcOfEllipse: return &ArcsOfEllipse[Geoms[geoId].index]; break; + case ArcOfHyperbola: + return &ArcsOfHyperbola[Geoms[geoId].index]; + break; default: return 0; }; @@ -1764,6 +1767,12 @@ int Sketch::addPointOnObjectConstraint(int geoId1, PointPos pos1, int geoId2) GCSsys.addConstraintPointOnEllipse(p1, a, tag); return ConstraintsCounter; } + else if (Geoms[geoId2].type == ArcOfHyperbola) { + GCS::ArcOfHyperbola &a = ArcsOfHyperbola[Geoms[geoId2].index]; + int tag = ++ConstraintsCounter; + GCSsys.addConstraintPointOnHyperbolicArc(p1, a, tag); + return ConstraintsCounter; + } } return -1; }