Sketcher: addGeometry : Remove point construction limitation.

This commit is contained in:
PaddleStroke
2024-08-06 08:40:43 +02:00
committed by Yorik van Havre
parent f763fe5bf3
commit e7ff71c20c
3 changed files with 4 additions and 14 deletions

View File

@@ -675,9 +675,9 @@ std::string PythonConverter::process(const Sketcher::Constraint* constraint, Geo
if (!constraint->isActive || !constraint->isDriving) {
std::string active = constraint->isActive ? "True" : "False";
std::string driving = constraint->isDriving ? "True" : "False";
resultStr += ", " + active;
if (constraint->isDimensional()) {
std::string driving = constraint->isDriving ? "True" : "False";
resultStr += ", " + driving;
}
}

View File

@@ -1549,12 +1549,7 @@ int SketchObject::addGeometry(const std::vector<Part::Geometry*>& geoList,
Part::Geometry* copy = v->copy();
generateId(copy);
if (copy->is<Part::GeomPoint>()) {
// creation mode for points is always construction not to
// break legacy code
GeometryFacade::setConstruction(copy, true);
}
else if (construction) {
if (construction) {
GeometryFacade::setConstruction(copy, construction);
}
@@ -1588,12 +1583,7 @@ int SketchObject::addGeometry(std::unique_ptr<Part::Geometry> newgeo, bool const
auto* geoNew = newgeo.release();
generateId(geoNew);
if (geoNew->is<Part::GeomPoint>()) {
// creation mode for points is always construction not to
// break legacy code
GeometryFacade::setConstruction(geoNew, true);
}
else if (construction) {
if (construction) {
GeometryFacade::setConstruction(geoNew, construction);
}

View File

@@ -85,7 +85,7 @@ private:
editPoint.x,
editPoint.y);
if (!isConstructionMode()) {
if (isConstructionMode()) {
Gui::cmdAppObjectArgs(sketchgui->getObject(),
"toggleConstruction(%d)",
getHighestCurveIndex());