Make SolveSpace solver default.
<plugin script="addons_Features" configuration="addons_Features.xml"/>
<plugin script="ConnectorPlugin" configuration="plugin-Connector.xml" dependency="Geometry"/>
<plugin library="ParametersPlugin" configuration="plugin-Parameters.xml"/>
-<!-- <plugin library="SolveSpaceSolver"/> -->
- <plugin library="PlaneGCSSolver"/>
+ <plugin library="SolveSpaceSolver"/>
+<!-- <plugin library="PlaneGCSSolver"/> -->
<plugin library="GeomValidators"/>
<plugin library="DFBrowser" internal="true"/>
</plugins>
const EntityID& theSketchID,
const SketchSolver_ConstraintType& theType,
const double& theValue,
+ const bool theFullValue,
const EntityWrapperPtr& thePoint1,
const EntityWrapperPtr& thePoint2,
const std::list<EntityWrapperPtr>& theTrsfEnt) const
aResult->setEntities(aConstrAttrList);
if (anAngleParam)
aResult->setValueParameter(anAngleParam);
+ aResult->setIsFullValue(theFullValue);
return std::list<ConstraintWrapperPtr>(1, aResult);
}
/// \param theSketchID [in] sketch the constraint belongs to
/// \param theType [in] type of constraint
/// \param theValue [in] numeric characteristic of constraint (angle for multi-rotation) if applicable
+ /// \param theFullValue [in] indicates theValue shows full translation delta/rotation angle or delta/angle between neighbor entities
/// \param thePoint1 [in] center for multi-rotation or start point for multi-translation
/// \param thePoint2 [in] end point for multi-translation (empty for multi-rotation)
/// \param theTrsfEnt [in] list of transformed entities
const EntityID& theSketchID,
const SketchSolver_ConstraintType& theType,
const double& theValue,
+ const bool theFullValue,
const EntityWrapperPtr& thePoint1,
const EntityWrapperPtr& thePoint2,
const std::list<EntityWrapperPtr>& theTrsfEnt) const;
if (aResult == GCS::Success) {
myEquationSystem.applySolution();
aStatus = STATUS_OK;
- } else {
- myEquationSystem.undoSolution();
+ } else
aStatus = STATUS_FAILED;
- }
+
return aStatus;
}
+
+void PlaneGCSSolver_Solver::undo()
+{
+ myEquationSystem.undoSolution();
+}
*/
virtual SketchSolver_SolveStatus solve();
+ /// \brief Prepare for solving. Store initial values of parameters for undo
+ virtual void prepare()
+ { /* do nothing */ }
+
+ /// \brief Revert solution to initial values
+ virtual void undo();
+
private:
GCS::VEC_pD myParameters; ///< list of unknowns
std::set<GCS::Constraint*> myConstraints; ///< list of constraints already processed by the system
/// \param theSketchID [in] sketch the constraint belongs to
/// \param theType [in] type of constraint
/// \param theValue [in] numeric characteristic of constraint (angle for multi-rotation) if applicable
+ /// \param theFullValue [in] indicates theValue shows full translation delta/rotation angle or delta/angle between neighbor entities
/// \param thePoint1 [in] center for multi-rotation or start point for multi-translation
/// \param thePoint2 [in] end point for multi-translation (empty for multi-rotation)
/// \param theTrsfEnt [in] list of transformed entities
const EntityID& theSketchID,
const SketchSolver_ConstraintType& theType,
const double& theValue,
- const bool& theFullValue,
+ const bool theFullValue,
const EntityWrapperPtr& thePoint1,
const EntityWrapperPtr& thePoint2,
const std::list<EntityWrapperPtr>& theTrsfEnt) const = 0;
const EntityID& theSketchID,
const SketchSolver_ConstraintType& theType,
const double& theValue,
- const bool& theFullValue,
+ const bool theFullValue,
const EntityWrapperPtr& thePoint1,
const EntityWrapperPtr& thePoint2,
const std::list<EntityWrapperPtr>& theTrsfEnt) const
/// \param theSketchID [in] sketch the constraint belongs to
/// \param theType [in] type of constraint
/// \param theValue [in] numeric characteristic of constraint (angle for multi-rotation) if applicable
+ /// \param theFullValue [in] indicates theValue shows full translation delta/rotation angle or delta/angle between neighbor entities
/// \param thePoint1 [in] center for multi-rotation or start point for multi-translation
/// \param thePoint2 [in] end point for multi-translation (empty for multi-rotation)
/// \param theTrsfEnt [in] list of transformed entities
const EntityID& theSketchID,
const SketchSolver_ConstraintType& theType,
const double& theValue,
- const bool& theFullValue,
+ const bool theFullValue,
const EntityWrapperPtr& thePoint1,
const EntityWrapperPtr& thePoint2,
const std::list<EntityWrapperPtr>& theTrsfEnt) const;