[Sketcher] Auto-constrain point on B-spline

This commit is contained in:
Ajinkya Dahale
2022-10-09 01:44:22 +05:30
committed by abdullahtahiriyo
parent 05295be7cd
commit 41d240c515

View File

@@ -559,9 +559,6 @@ int DrawSketchHandler::seekAutoConstraint(std::vector<AutoConstraint> &suggested
}
if (GeoId != GeoEnum::GeoUndef) {
const Part::Geometry * hitobject = sketchgui->getSketchObject()->getGeometry(GeoId);
// Currently only considers objects in current Sketcher
AutoConstraint constr;
constr.Type = Sketcher::None;
@@ -571,7 +568,7 @@ int DrawSketchHandler::seekAutoConstraint(std::vector<AutoConstraint> &suggested
constr.Type = Sketcher::Coincident;
else if (type == AutoConstraint::CURVE && PosId != Sketcher::PointPos::none)
constr.Type = Sketcher::PointOnObject;
else if ((type == AutoConstraint::VERTEX || type == AutoConstraint::VERTEX_NO_TANGENCY) && PosId == Sketcher::PointPos::none && hitobject->getTypeId() != Part::GeomBSplineCurve::getClassTypeId())
else if ((type == AutoConstraint::VERTEX || type == AutoConstraint::VERTEX_NO_TANGENCY) && PosId == Sketcher::PointPos::none)
constr.Type = Sketcher::PointOnObject;
else if (type == AutoConstraint::CURVE && PosId == Sketcher::PointPos::none)
constr.Type = Sketcher::Tangent;