INCLUDE(FindEclipse)
INCLUDE(Common)
INCLUDE(FindQt)
-INCLUDE(FindBoost)
INCLUDE(FindPython)
INCLUDE(FindSalome)
INCLUDE(FindSolveSpace)
${CAS_SHAPE}
)
-ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS)
ADD_LIBRARY(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
TARGET_LINK_LIBRARIES(ConstructionPlugin ${PROJECT_LIBRARIES})
GeomAlgoAPI
)
-ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS)
ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
TARGET_LINK_LIBRARIES(FeaturesPlugin ${PROJECT_LIBRARIES})
${CAS_SHAPE}
)
-ADD_DEFINITIONS(-DGEOMDATA_EXPORTS ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DGEOMDATA_EXPORTS ${CAS_DEFINITIONS})
ADD_LIBRARY(GeomData SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(GeomData ${PROJECT_LIBRARIES})
-ADD_DEFINITIONS(-DGEOMVALIDATORS_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DGEOMVALIDATORS_EXPORTS)
ADD_LIBRARY(GeomValidators SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(GeomValidators ${PROJECT_LIBRARIES})
-ADD_DEFINITIONS(-DMODEL_EXPORTS ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DMODEL_EXPORTS ${CAS_DEFINITIONS})
ADD_LIBRARY(Model MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(Model ${PROJECT_LIBRARIES})
PartSetPlugin_Remove.cpp
)
-ADD_DEFINITIONS(-DPARTSETPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DPARTSETPLUGIN_EXPORTS)
ADD_LIBRARY(PartSetPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(PartSetPlugin ${PROJECT_LIBRARIES} ModelAPI)
plugin-Sketch.xml
)
-ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
${PROJECT_SOURCE_DIR}/src/Events
)
-ADD_DEFINITIONS(-DSKETCHSOLVER_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DSKETCHSOLVER_EXPORTS)
ADD_LIBRARY(SketchSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
)
// For the length constraint the start and end points of the line should be added to the entities list instead of line
if (aConstrType == SLVS_C_PT_PT_DISTANCE
&& theConstraint->getKind().compare(SketchPlugin_ConstraintLength::ID()) == 0) {
- Slvs_hEntity aLineEnt = changeEntity(aFeature);
+ Slvs_hEntity aLineEnt = changeEntityFeature(aFeature);
int aEntPos = Search(aLineEnt, myEntities);
aConstrEnt[indAttr++] = myEntities[aEntPos].point[0];
aConstrEnt[indAttr++] = myEntities[aEntPos].point[1];
aConstrEnt[indAttr++] = 0;
break; // there should be no other entities
} else if (aConstrAttr->isObject())
- aConstrEnt[indAttr] = changeEntity(aFeature);
+ aConstrEnt[indAttr] = changeEntityFeature(aFeature);
else
aConstrEnt[indAttr] = changeEntity(aConstrAttr->attr());
}
aFeature = aDoc->feature(aRC);
}
- aConstrEnt = aConstrAttr->isObject() ? changeEntity(aFeature) : changeEntity(aConstrAttr->attr());
+ aConstrEnt = aConstrAttr->isObject() ? changeEntityFeature(aFeature) : changeEntity(aConstrAttr->attr());
if (aConstrMapIter == myConstraintMap.end()) { // Add new constraint
// Check the fixed entity is not a point.
// Class: SketchSolver_ConstraintGroup
// Purpose: create/update the element defined by the feature affected by any constraint
// ============================================================================
-Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(FeaturePtr theEntity)
+Slvs_hEntity SketchSolver_ConstraintGroup::changeEntityFeature(FeaturePtr theEntity)
{
if (!theEntity->data()->isValid())
return SLVS_E_UNKNOWN;
}
}
-void SketchSolver_ConstraintGroup::updateRelatedConstraints(
+void SketchSolver_ConstraintGroup::updateRelatedConstraintsFeature(
std::shared_ptr<ModelAPI_Feature> theFeature) const
{
ConstraintMap::const_iterator aConstrIter = myConstraintMap.begin();
#include <SketchPlugin_Constraint.h>
#include <ModelAPI_Data.h>
+#include <ModelAPI_Feature.h>
+
+#include <memory>
#include <list>
#include <map>
#include <vector>
* \param[in] theEntity attribute of the constraint
*/
void updateRelatedConstraints(std::shared_ptr<ModelAPI_Attribute> theEntity) const;
- void updateRelatedConstraints(std::shared_ptr<ModelAPI_Feature> theFeature) const;
+ void updateRelatedConstraintsFeature(std::shared_ptr<ModelAPI_Feature> theFeature) const;
/** \brief Adds or updates an entity in the group
*
* \return identifier of changed entity or 0 if entity could not be changed
*/
Slvs_hEntity changeEntity(std::shared_ptr<ModelAPI_Attribute> theEntity);
- Slvs_hEntity changeEntity(FeaturePtr theEntity);
+ Slvs_hEntity changeEntityFeature(std::shared_ptr<ModelAPI_Feature> theEntity);
protected:
/** \brief Adds or updates a normal in the group
// Author: Artem ZHIDKOV
#include "SketchSolver_ConstraintManager.h"
+#include <SketchSolver_ConstraintGroup.h>
#include <Events_Loop.h>
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_Events.h>
#include <ModelAPI_Object.h>
#include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_Attribute.h>
#include <SketchPlugin_Constraint.h>
#include <SketchPlugin_Line.h>
#include <SketchPlugin_Point.h>
#include <SketchPlugin_Sketch.h>
+#include <SketchPlugin_Feature.h>
#include <list>
+#include <set>
+#include <memory>
// Initialization of constraint manager self pointer
SketchSolver_ConstraintManager* SketchSolver_ConstraintManager::_self = 0;
if ((*aGroupIter)->getId() == aGroupId) {
// If the group is empty, the feature is not added (the constraint only)
if (!aConstraint && !(*aGroupIter)->isEmpty())
- return (*aGroupIter)->changeEntity(theFeature) != SLVS_E_UNKNOWN;
+ return (*aGroupIter)->changeEntityFeature(theFeature) != SLVS_E_UNKNOWN;
return (*aGroupIter)->changeConstraint(aConstraint);
}
} else if (aGroups.size() > 1) { // Several groups applicable for this feature => need to merge them
if (aConstraint)
return (*aFirstGroupIter)->changeConstraint(aConstraint);
- return (*aFirstGroupIter)->changeEntity(theFeature) != SLVS_E_UNKNOWN;
+ return (*aFirstGroupIter)->changeEntityFeature(theFeature) != SLVS_E_UNKNOWN;
}
// Something goes wrong
std::vector<SketchSolver_ConstraintGroup*>::iterator aGroupIter;
for (aGroupIter = myGroups.begin(); aGroupIter != myGroups.end(); aGroupIter++)
if (!(*aGroupIter)->isEmpty())
- (*aGroupIter)->updateRelatedConstraints(theFeature);
+ (*aGroupIter)->updateRelatedConstraintsFeature(theFeature);
}
// ============================================================================
// Class: SketchSolver_Session
// Purpose: search workplane containing given feature
// ============================================================================
-std::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_ConstraintManager::findWorkplane(
- std::shared_ptr<SketchPlugin_Feature> theFeature) const
+std::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_ConstraintManager
+::findWorkplane(std::shared_ptr<SketchPlugin_Feature> theFeature) const
{
// Already verified workplanes
std::set<std::shared_ptr<ModelAPI_CompositeFeature> > aVerified;
return myWorkshop->viewer()->AISContext();
}
-void XGUI_Displayer::display(AISObjectPtr theAIS, bool isUpdate)
+void XGUI_Displayer::displayAIS(AISObjectPtr theAIS, bool isUpdate)
{
Handle(AIS_InteractiveContext) aContext = AISContext();
Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
}
}
-void XGUI_Displayer::erase(AISObjectPtr theAIS, const bool isUpdate)
+void XGUI_Displayer::eraseAIS(AISObjectPtr theAIS, const bool isUpdate)
{
Handle(AIS_InteractiveContext) aContext = AISContext();
Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
void display(ObjectPtr theObject, bool isUpdateViewer = true);
/// Display the given AIS object. To hide this object use corresponde erase method
- void display(AISObjectPtr theAIS, bool isUpdate = true);
+ void displayAIS(AISObjectPtr theAIS, bool isUpdate = true);
/// Stop the current selection and color the given features to the selection color
/// \param theFeatures a list of features to be disabled
void erase(ObjectPtr theObject, const bool isUpdateViewer = true);
/// Erase the given AIS object displayed by corresponded display method
- void erase(AISObjectPtr theAIS, const bool isUpdate = true);
+ void eraseAIS(AISObjectPtr theAIS, const bool isUpdate = true);
/// Erase all presentations
/// \param isUpdateViewer the parameter whether the viewer should be update immediatelly