[Sketcher] Constrain first pole weight in exposeInternalGeometry

This commit is part of a project funded by the Open Toolchain Foundation under the title "Open Toolchain Foundation - Curve drawing tool in Sketcher Workbench"
This commit is contained in:
Ajinkya Dahale
2023-02-28 21:53:16 +05:30
committed by abdullahtahiriyo
parent 94db5271b3
commit d14daed442

View File

@@ -5349,6 +5349,17 @@ int SketchObject::exposeInternalGeometry(int GeoId)
}
else {
controlpointgeoids[0] = currentgeoid+incrgeo+1;
if (weights[0] == 1.0) {
// if the first weight is 1.0 it's probably going to be non-rational
Sketcher::Constraint *newConstr3 = new Sketcher::Constraint();
newConstr3->Type = Sketcher::Weight;
newConstr3->First = controlpointgeoids[0];
newConstr3->setValue(weights[0]);
icon.push_back(newConstr3);
isfirstweightconstrained = true;
}
}
incrgeo++;
}