Sketcher: Improved B-Spline creation
This commit is contained in:
@@ -4712,11 +4712,28 @@ public:
|
||||
ConstrMethod == 0 ?"False":"True",
|
||||
geometryCreationMode==Construction?"True":"False");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
currentgeoid++;
|
||||
|
||||
// autoconstraints were added to the circles of the poles, which is ok because they must go to the
|
||||
// right position, or the user will freak-out if they appear out of the autoconstrained position.
|
||||
// However, autoconstrains on the first and last pole, in normal non-periodic b-splines (with appropriate endpoint knot multiplicity)
|
||||
// as the ones created by this tool are intended for the b-spline endpoints, and not for the poles,
|
||||
// so here we retrieve any autoconstraint on those poles' center and mangle it to the endpoint.
|
||||
if (ConstrMethod == 0) {
|
||||
|
||||
for(auto & constr : static_cast<Sketcher::SketchObject *>(sketchgui->getObject())->Constraints.getValues()) {
|
||||
if(constr->First == FirstPoleGeoId && constr->FirstPos == Sketcher::mid) {
|
||||
constr->First = currentgeoid;
|
||||
constr->FirstPos = Sketcher::start;
|
||||
}
|
||||
else if(constr->First == (FirstPoleGeoId + CurrentConstraint - 1) && constr->FirstPos == Sketcher::mid) {
|
||||
constr->First = currentgeoid;
|
||||
constr->FirstPos = Sketcher::end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Constraint pole circles to B-spline.
|
||||
std::stringstream cstream;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user