diff --git a/src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py b/src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py index d9615e8f70..241f1ca728 100644 --- a/src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py +++ b/src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py @@ -2149,10 +2149,10 @@ class TestTopologicalNamingProblem(unittest.TestCase): doc.recompute() doc.Pad.Visibility = False doc.Sketch001.Visibility = False - doc.Sketch.movePoint(3, 0, App.Vector(-5, 0, 0), 1) - doc.Sketch.movePoint(0, 0, App.Vector(0.000000, -5, 0), 1) - doc.Sketch.movePoint(1, 0, App.Vector(-5, 0.000000, 0), 1) - doc.Sketch.movePoint(2, 0, App.Vector(-0, -5, 0), 1) + doc.Sketch.moveGeometry(3, 0, App.Vector(-5, 0, 0), 1) + doc.Sketch.moveGeometry(0, 0, App.Vector(0.000000, -5, 0), 1) + doc.Sketch.moveGeometry(1, 0, App.Vector(-5, 0.000000, 0), 1) + doc.Sketch.moveGeometry(2, 0, App.Vector(-0, -5, 0), 1) doc.recompute() # If Sketch001 is still at the right start point, we are good. self.assertTrue(doc.Sketch001.AttachmentOffset.Matrix == App.Matrix()) diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 06e02aa395..e67965bf6f 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -4765,7 +4765,7 @@ int Sketch::internalSolve(std::string& solvername, int level) return ret; } -int Sketch::initMove(std::vector moved, bool fine) +int Sketch::initMove(std::vector geoEltIds, bool fine) { if (hasConflicts()) { // don't try to move sketches that contain conflicting constraints @@ -4782,7 +4782,7 @@ int Sketch::initMove(std::vector moved, bool fine) // (emplace_back in the for loop below) will trigger reallocation. // Which will corrupt pointers we're storing. size_t reserveSize = 0; - for (auto& pair : moved) { + for (auto& pair : geoEltIds) { int geoId = checkGeoId(pair.GeoId); Sketcher::PointPos pos = pair.Pos; if (Geoms[geoId].type == BSpline && (pos == PointPos::none || pos == PointPos::mid)) { @@ -4795,7 +4795,7 @@ int Sketch::initMove(std::vector moved, bool fine) } MoveParameters.reserve(reserveSize); - for (auto& pair : moved) { + for (auto& pair : geoEltIds) { int geoId = checkGeoId(pair.GeoId); Sketcher::PointPos pos = pair.Pos; @@ -4959,7 +4959,7 @@ int Sketch::initMove(std::vector moved, bool fine) p0.y = &MoveParameters.emplace_back(*center.y); GCSsys.addConstraintP2PCoincident(p0, center, GCS::DefaultTemporaryConstraint); } - else if (pos == PointPos::none && moved.size() > 1) { + else if (pos == PointPos::none && geoEltIds.size() > 1) { // When group dragging, arcs should move without modification. GCS::Point p2; GCS::Point& sp = Points[Geoms[geoId].startPointId]; @@ -5015,8 +5015,8 @@ int Sketch::initMove(std::vector moved, bool fine) int Sketch::initMove(int geoId, PointPos pos, bool fine) { - std::vector moved = {GeoElementId(geoId, pos)}; - return initMove(moved, fine); + std::vector geoEltIds = {GeoElementId(geoId, pos)}; + return initMove(geoEltIds, fine); } void Sketch::resetInitMove() @@ -5093,7 +5093,9 @@ int Sketch::initBSplinePieceMove(int geoId, return 0; } -int Sketch::movePoint(std::vector moved, Base::Vector3d toPoint, bool relative) +int Sketch::moveGeometries(std::vector geoEltIds, + Base::Vector3d toPoint, + bool relative) { if (hasConflicts()) { // don't try to move sketches that contain conflicting constraints @@ -5101,7 +5103,7 @@ int Sketch::movePoint(std::vector moved, Base::Vector3d toPoint, b } if (!isInitMove) { - initMove(moved); + initMove(geoEltIds); initToPoint = toPoint; moveStep = 0; } @@ -5113,7 +5115,7 @@ int Sketch::movePoint(std::vector moved, Base::Vector3d toPoint, b else { // I am getting too far away from the original solution so reinit the solution if ((toPoint - initToPoint).Length() > 20 * moveStep) { - initMove(moved); + initMove(geoEltIds); initToPoint = toPoint; } } @@ -5128,7 +5130,7 @@ int Sketch::movePoint(std::vector moved, Base::Vector3d toPoint, b } else { size_t i = 0; - for (auto& pair : moved) { + for (auto& pair : geoEltIds) { if (i >= MoveParameters.size()) { break; } @@ -5204,10 +5206,10 @@ int Sketch::movePoint(std::vector moved, Base::Vector3d toPoint, b return solve(); } -int Sketch::movePoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative) +int Sketch::moveGeometry(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative) { - std::vector moved = {GeoElementId(geoId, pos)}; - return movePoint(moved, toPoint, relative); + std::vector geoEltIds = {GeoElementId(geoId, pos)}; + return moveGeometries(geoEltIds, toPoint, relative); } int Sketch::setDatum(int /*constrId*/, double /*value*/) diff --git a/src/Mod/Sketcher/App/Sketch.h b/src/Mod/Sketcher/App/Sketch.h index 79a9f237cb..aef9bb9b08 100644 --- a/src/Mod/Sketcher/App/Sketch.h +++ b/src/Mod/Sketcher/App/Sketch.h @@ -161,7 +161,7 @@ public: /** initializes a point (or curve) drag by setting the current * sketch status as a reference */ - int initMove(std::vector moved, bool fine = true); + int initMove(std::vector geoEltIds, bool fine = true); int initMove(int geoId, PointPos pos, bool fine = true); /** Initializes a B-spline piece drag by setting the current @@ -185,8 +185,10 @@ public: * a condition for satisfying the new point location! * The relative flag permits moving relatively to the current position */ - int movePoint(std::vector moved, Base::Vector3d toPoint, bool relative = false); - int movePoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative = false); + int moveGeometries(std::vector geoEltIds, + Base::Vector3d toPoint, + bool relative = false); + int moveGeometry(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative = false); /** * Sets whether the initial solution should be recalculated while dragging after a certain diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 9e4e723d6d..fd868503e2 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -1340,7 +1340,7 @@ int SketchObject::diagnoseAdditionalConstraints( return lastDoF; } -int SketchObject::movePoint(std::vector moved, const Base::Vector3d& toPoint, bool relative, +int SketchObject::moveGeometries(std::vector geoEltIds, const Base::Vector3d& toPoint, bool relative, bool updateGeoBeforeMoving) { @@ -1370,7 +1370,7 @@ int SketchObject::movePoint(std::vector moved, const Base::Vector3 return -1; // move the point and solve - lastSolverStatus = solvedSketch.movePoint(moved, toPoint, relative); + lastSolverStatus = solvedSketch.moveGeometries(geoEltIds, toPoint, relative); // moving the point can not result in a conflict that we did not have // or a redundancy that we did not have before, or a change of DoF @@ -1391,11 +1391,11 @@ int SketchObject::movePoint(std::vector moved, const Base::Vector3 return lastSolverStatus; } -int SketchObject::movePoint(int geoId, PointPos pos, const Base::Vector3d& toPoint, bool relative, +int SketchObject::moveGeometry(int geoId, PointPos pos, const Base::Vector3d& toPoint, bool relative, bool updateGeoBeforeMoving) { - std::vector moved = { GeoElementId(geoId, pos) }; - return movePoint(moved, toPoint, relative, updateGeoBeforeMoving); + std::vector geoEltIds = { GeoElementId(geoId, pos) }; + return moveGeometries(geoEltIds, toPoint, relative, updateGeoBeforeMoving); } template <> @@ -2785,14 +2785,14 @@ int SketchObject::fillet(int GeoId1, int GeoId2, const Base::Vector3d& refPnt1, if (dist1.Length() < dist2.Length()) { filletPosId1 = PointPos::start; filletPosId2 = PointPos::end; - movePoint(GeoId1, PosId1, p1, false, true); - movePoint(GeoId2, PosId2, p2, false, true); + moveGeometry(GeoId1, PosId1, p1, false, true); + moveGeometry(GeoId2, PosId2, p2, false, true); } else { filletPosId1 = PointPos::end; filletPosId2 = PointPos::start; - movePoint(GeoId1, PosId1, p2, false, true); - movePoint(GeoId2, PosId2, p1, false, true); + moveGeometry(GeoId1, PosId1, p2, false, true); + moveGeometry(GeoId2, PosId2, p1, false, true); } auto tangent1 = std::make_unique(); @@ -3280,14 +3280,14 @@ int SketchObject::fillet(int GeoId1, int GeoId2, const Base::Vector3d& refPnt1, if (dist1 < dist2) { filletPosId1 = PointPos::start; filletPosId2 = PointPos::end; - movePoint(GeoId1, PosId1, p1, false, true); - movePoint(GeoId2, PosId2, p2, false, true); + moveGeometry(GeoId1, PosId1, p1, false, true); + moveGeometry(GeoId2, PosId2, p2, false, true); } else { filletPosId1 = PointPos::end; filletPosId2 = PointPos::start; - movePoint(GeoId1, PosId1, p2, false, true); - movePoint(GeoId2, PosId2, p1, false, true); + moveGeometry(GeoId1, PosId1, p2, false, true); + moveGeometry(GeoId2, PosId2, p1, false, true); } auto* tangent1 = new Sketcher::Constraint(); @@ -3385,7 +3385,7 @@ int SketchObject::extend(int GeoId, double increment, PointPos endpoint) newPoint.Normalize(); newPoint.Scale(scaleFactor, scaleFactor, scaleFactor); newPoint = newPoint + endVec; - retcode = movePoint(GeoId, Sketcher::PointPos::start, newPoint, false, true); + retcode = moveGeometry(GeoId, Sketcher::PointPos::start, newPoint, false, true); } else if (endpoint == PointPos::end) { Base::Vector3d newPoint = endVec - startVec; @@ -3393,7 +3393,7 @@ int SketchObject::extend(int GeoId, double increment, PointPos endpoint) newPoint.Normalize(); newPoint.Scale(scaleFactor, scaleFactor, scaleFactor); newPoint = newPoint + startVec; - retcode = movePoint(GeoId, Sketcher::PointPos::end, newPoint, false, true); + retcode = moveGeometry(GeoId, Sketcher::PointPos::end, newPoint, false, true); } } else if (geom->is()) { diff --git a/src/Mod/Sketcher/App/SketchObject.h b/src/Mod/Sketcher/App/SketchObject.h index a0cf073571..a49dad6330 100644 --- a/src/Mod/Sketcher/App/SketchObject.h +++ b/src/Mod/Sketcher/App/SketchObject.h @@ -352,15 +352,15 @@ public: /// toggle the driving status of this constraint int toggleVirtualSpace(int ConstrId); /// move this point to a new location and solve - int movePoint(std::vector moved, - const Base::Vector3d& toPoint, - bool relative = false, - bool updateGeoBeforeMoving = false); - int movePoint(int GeoId, - PointPos PosId, - const Base::Vector3d& toPoint, - bool relative = false, - bool updateGeoBeforeMoving = false); + int moveGeometries(std::vector geoEltIds, + const Base::Vector3d& toPoint, + bool relative = false, + bool updateGeoBeforeMoving = false); + int moveGeometry(int GeoId, + PointPos PosId, + const Base::Vector3d& toPoint, + bool relative = false, + bool updateGeoBeforeMoving = false); /// retrieves the coordinates of a point static Base::Vector3d getPoint(const Part::Geometry* geo, PointPos PosId); Base::Vector3d getPoint(int GeoId, PointPos PosId) const; @@ -704,11 +704,11 @@ public: /* Solver exposed interface */ * state as a reference (enables dragging). NOTE: A temporary move operation must always be * preceded by a initTemporaryMove() operation. */ - inline int moveTemporaryPoint(std::vector moved, - Base::Vector3d toPoint, - bool relative = false); + inline int moveGeometriesTemporary(std::vector moved, + Base::Vector3d toPoint, + bool relative = false); inline int - moveTemporaryPoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative = false); + moveGeometryTemporary(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative = false); /// forwards a request to update an extension of a geometry of the solver to the solver. inline void updateSolverExtension(int geoId, std::unique_ptr&& ext) { @@ -999,7 +999,7 @@ private: /** this internal flag indicate that an operation modifying the geometry, but not the DoF of the sketch took place (e.g. toggle construction), so if next action is a movement of a point - (movePoint), the geometry must be updated first. + (moveGeometry), the geometry must be updated first. */ bool solverNeedsUpdate; @@ -1100,19 +1100,19 @@ inline int SketchObject::initTemporaryBSplinePieceMove(int geoId, return solvedSketch.initBSplinePieceMove(geoId, pos, firstPoint, fine); } -inline int SketchObject::moveTemporaryPoint(std::vector moved, - Base::Vector3d toPoint, - bool relative /*=false*/) +inline int SketchObject::moveGeometriesTemporary(std::vector geoEltIds, + Base::Vector3d toPoint, + bool relative /*=false*/) { - return solvedSketch.movePoint(moved, toPoint, relative); + return solvedSketch.moveGeometries(geoEltIds, toPoint, relative); } -inline int SketchObject::moveTemporaryPoint(int geoId, - PointPos pos, - Base::Vector3d toPoint, - bool relative /*=false*/) +inline int SketchObject::moveGeometryTemporary(int geoId, + PointPos pos, + Base::Vector3d toPoint, + bool relative /*=false*/) { std::vector moved = {GeoElementId(geoId, pos)}; - return moveTemporaryPoint(moved, toPoint, relative); + return moveGeometriesTemporary(moved, toPoint, relative); } diff --git a/src/Mod/Sketcher/App/SketchObjectPy.xml b/src/Mod/Sketcher/App/SketchObjectPy.xml index c3a1ebd860..d9d5834b9b 100644 --- a/src/Mod/Sketcher/App/SketchObjectPy.xml +++ b/src/Mod/Sketcher/App/SketchObjectPy.xml @@ -513,10 +513,10 @@ setLabelDistance(constraintIndex:int, value:float) - + - movePoint(GeoIndex,PointPos,Vector,[relative]) - move a given point (or curve) + moveGeometry(GeoIndex,PointPos,Vector,[relative]) - move a given point (or curve) to another location. It moves the specified point (or curve) to the given location by adding some temporary weak constraints and solve the sketch. diff --git a/src/Mod/Sketcher/App/SketchObjectPyImp.cpp b/src/Mod/Sketcher/App/SketchObjectPyImp.cpp index bdbcdd49f4..072e389e66 100644 --- a/src/Mod/Sketcher/App/SketchObjectPyImp.cpp +++ b/src/Mod/Sketcher/App/SketchObjectPyImp.cpp @@ -1185,7 +1185,7 @@ PyObject* SketchObjectPy::moveGeometries(PyObject* args) } // Convert Python list to std::vector - std::vector moved; + std::vector geoEltIds; Py_ssize_t listSize = PyList_Size(pyList); for (Py_ssize_t i = 0; i < listSize; ++i) { @@ -1204,14 +1204,14 @@ PyObject* SketchObjectPy::moveGeometries(PyObject* args) return nullptr; } - moved.emplace_back(GeoElementId(geoId, static_cast(pointPos))); + geoEltIds.emplace_back(GeoElementId(geoId, static_cast(pointPos))); } // Convert Python vector to Base::Vector3d Base::Vector3d v1 = static_cast(pcObj)->value(); // Call the C++ method - if (this->getSketchObjectPtr()->movePoint(moved, v1, (relative > 0))) { + if (this->getSketchObjectPtr()->moveGeometries(geoEltIds, v1, (relative > 0))) { PyErr_SetString(PyExc_ValueError, "Failed to move geometries."); return nullptr; } @@ -1219,7 +1219,7 @@ PyObject* SketchObjectPy::moveGeometries(PyObject* args) Py_RETURN_NONE; } -PyObject* SketchObjectPy::movePoint(PyObject* args) +PyObject* SketchObjectPy::moveGeometry(PyObject* args) { PyObject* pcObj; int GeoId, PointType; @@ -1237,10 +1237,10 @@ PyObject* SketchObjectPy::movePoint(PyObject* args) Base::Vector3d v1 = static_cast(pcObj)->value(); - if (this->getSketchObjectPtr()->movePoint(GeoId, - static_cast(PointType), - v1, - (relative > 0))) { + if (this->getSketchObjectPtr()->moveGeometry(GeoId, + static_cast(PointType), + v1, + (relative > 0))) { std::stringstream str; str << "Not able to move point with the id and type: (" << GeoId << ", " << PointType << ")"; diff --git a/src/Mod/Sketcher/App/SketchPy.xml b/src/Mod/Sketcher/App/SketchPy.xml index bc4599e111..7285d7951e 100644 --- a/src/Mod/Sketcher/App/SketchPy.xml +++ b/src/Mod/Sketcher/App/SketchPy.xml @@ -35,10 +35,10 @@ clear the sketch - + - movePoint(GeoIndex,PointPos,Vector,[relative]) - move a given point (or curve) + moveGeometry(GeoIndex,PointPos,Vector,[relative]) - move a given point (or curve) to another location. It moves the specified point (or curve) to the given location by adding some temporary weak constraints and solve the sketch. diff --git a/src/Mod/Sketcher/App/SketchPyImp.cpp b/src/Mod/Sketcher/App/SketchPyImp.cpp index 5d25ea726b..98d85b5e45 100644 --- a/src/Mod/Sketcher/App/SketchPyImp.cpp +++ b/src/Mod/Sketcher/App/SketchPyImp.cpp @@ -151,7 +151,7 @@ PyObject* SketchPy::clear(PyObject* args) Py_RETURN_NONE; } -PyObject* SketchPy::movePoint(PyObject* args) +PyObject* SketchPy::moveGeometry(PyObject* args) { int index1, index2; PyObject* pcObj; @@ -168,10 +168,10 @@ PyObject* SketchPy::movePoint(PyObject* args) Base::Vector3d* toPoint = static_cast(pcObj)->getVectorPtr(); return Py::new_reference_to( - Py::Long(getSketchPtr()->movePoint(index1, - static_cast(index2), - *toPoint, - (relative > 0)))); + Py::Long(getSketchPtr()->moveGeometry(index1, + static_cast(index2), + *toPoint, + (relative > 0)))); } // +++ attributes implementer ++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index 67a9e34994..f8ef0894ba 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -2502,7 +2502,7 @@ protected: Base::Vector3d p2 = line->getEndPoint(); if (fabs(p1.y - p2.y) < Precision::Confusion()) { // effectively vertical p2 = p1 + (p2 - p1).Length() * Base::Vector3d(0.0, 1.0, 0.0); - Gui::cmdAppObjectArgs(Obj, "movePoint(%d,2,App.Vector(%f, %f, 0),0) ", GeoId1, p2.x, p2.y); + Gui::cmdAppObjectArgs(Obj, "moveGeometry(%d,2,App.Vector(%f, %f, 0),0) ", GeoId1, p2.x, p2.y); } Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Vertical',%d)) ", GeoId1); } @@ -2530,7 +2530,7 @@ protected: Base::Vector3d p2 = line->getEndPoint(); if (fabs(p1.x - p2.x) < Precision::Confusion()) { // effectively vertical p2 = p1 + (p2 - p1).Length() * Base::Vector3d(1.0, 0.0, 0.0); - Gui::cmdAppObjectArgs(Obj, "movePoint(%d,2,App.Vector(%f, %f, 0),0) ", GeoId1, p2.x, p2.y); + Gui::cmdAppObjectArgs(Obj, "moveGeometry(%d,2,App.Vector(%f, %f, 0),0) ", GeoId1, p2.x, p2.y); } Gui::cmdAppObjectArgs(Obj, "addConstraint(Sketcher.Constraint('Horizontal',%d)) ", GeoId1); } diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 3aaf19fa1d..3f220d1516 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -1658,7 +1658,7 @@ void ViewProviderSketch::doDragStep(double x, double y) } } - if (getSketchObject()->moveTemporaryPoint(drag.Dragged, vec, drag.relative) == 0) { + if (getSketchObject()->moveGeometriesTemporary(drag.Dragged, vec, drag.relative) == 0) { setPositionText(Base::Vector2d(x, y)); draw(true, false); } diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.h b/src/Mod/Sketcher/Gui/ViewProviderSketch.h index 869f714c54..9bd654f640 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.h +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.h @@ -601,7 +601,7 @@ public: * -> inline void setRecalculateInitialSolutionWhileMovingPoint(bool * recalculateInitialSolutionWhileMovingPoint) * -> inline int initTemporaryMove(int geoId, PointPos pos, bool fine=true) - * -> inline int moveTemporaryPoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool + * -> inline int moveGeometryTemporary(int geoId, PointPos pos, Base::Vector3d toPoint, bool * relative=false) * -> inline void updateSolverExtension(int geoId, std::unique_ptr && * ext) diff --git a/src/Mod/Sketcher/SketcherTests/TestSketcherSolver.py b/src/Mod/Sketcher/SketcherTests/TestSketcherSolver.py index e9936cf61e..3e96bfd3e8 100644 --- a/src/Mod/Sketcher/SketcherTests/TestSketcherSolver.py +++ b/src/Mod/Sketcher/SketcherTests/TestSketcherSolver.py @@ -158,9 +158,9 @@ def CreateSlotPlateSet(SketchFeature): SketchFeature.setDatum(6, 0.872665) SketchFeature.addConstraint(Sketcher.Constraint("DistanceX", 0, 2, 0.0)) SketchFeature.setDatum(9, 0.000000) - SketchFeature.movePoint(0, 2, App.Vector(-0.007829, -33.376450, 0)) - SketchFeature.movePoint(0, 2, App.Vector(-0.738149, -10.493386, 0)) - SketchFeature.movePoint(0, 2, App.Vector(-0.007829, 2.165328, 0)) + SketchFeature.moveGeometry(0, 2, App.Vector(-0.007829, -33.376450, 0)) + SketchFeature.moveGeometry(0, 2, App.Vector(-0.738149, -10.493386, 0)) + SketchFeature.moveGeometry(0, 2, App.Vector(-0.007829, 2.165328, 0)) SketchFeature.addConstraint(Sketcher.Constraint("DistanceY", 0, 2, 2.165328)) SketchFeature.setDatum(10, 0.000000) @@ -229,7 +229,7 @@ class TestSketcherSolver(unittest.TestCase): CreateBoxSketchSet(self.Box) self.Doc.recompute() # moving a point of the sketch - self.Box.movePoint(0, 2, App.Vector(88.342697, 28.174158, 0)) + self.Box.moveGeometry(0, 2, App.Vector(88.342697, 28.174158, 0)) # fully constrain self.Box.addConstraint(Sketcher.Constraint("DistanceX", 1, 2, 90.0)) self.Box.addConstraint(Sketcher.Constraint("DistanceY", 1, 2, -50.0)) @@ -363,7 +363,7 @@ class TestSketcherSolver(unittest.TestCase): ActiveSketch.solve() ActiveSketch.exposeInternalGeometry(0) ActiveSketch.solve() - ActiveSketch.movePoint(0, 0, App.Vector(-26.266434, 14.345055, 0), 0) + ActiveSketch.moveGeometry(0, 0, App.Vector(-26.266434, 14.345055, 0), 0) ActiveSketch.solve() ActiveSketch.addConstraint(Sketcher.Constraint("Block", 0)) # Block the Ellipse in place ActiveSketch.addConstraint(