return myCases;
}
-void Config_AttributeMessage::setCases(const std::list<std::pair<std::string, std::string> >& theCases)
+void Config_AttributeMessage::setCases(const std::list<std::pair<std::string,
+ std::string> >& theCases)
{
myCases = theCases;
}
std::string aName = getProperty(theNode, FOLDER_NAME);
std::string aGroupType = getProperty(theNode, GROUP_TYPE);
if (aName.empty() || aGroupType.empty())
- Events_InfoMessage("Config_DataModelReader", "Reading dataModel.xml: wrong folder definition.").send();
+ Events_InfoMessage("Config_DataModelReader",
+ "Reading dataModel.xml: wrong folder definition.").send();
std::string aIcon = getProperty(theNode, NODE_ICON);
std::string aEmpty = getProperty(theNode, SHOW_EMPTY);
Events_ID aMenuItemEvent = Events_Loop::eventByName(myEventGenerated);
if (isNode(theNode, NODE_FEATURE, NULL)) {
storeAttribute(theNode, _ID);
- std::shared_ptr<Config_FeatureMessage> aMessage(new Config_FeatureMessage(aMenuItemEvent, this));
+ std::shared_ptr<Config_FeatureMessage>
+ aMessage(new Config_FeatureMessage(aMenuItemEvent, this));
fillFeature(theNode, aMessage);
myFeatures.push_back(getProperty(theNode, _ID));
//If a feature has xml definition for it's widget:
} else if (myIsProcessWidgets) {
// widgets, like shape_selector or containers, like toolbox
if (isAttributeNode(theNode)) {
- std::shared_ptr<Config_AttributeMessage> aMessage(new Config_AttributeMessage(aMenuItemEvent, this));
+ std::shared_ptr<Config_AttributeMessage>
+ aMessage(new Config_AttributeMessage(aMenuItemEvent, this));
aMessage->setFeatureId(restoreAttribute(NODE_FEATURE, _ID));
std::string anAttributeID = getProperty(theNode, _ID);
if (!anAttributeID.empty()) {
aMessage->setConcealment(getBooleanAttribute(theNode, ATTR_CONCEALMENT, false));
std::list<std::pair<std::string, std::string> > aCases;
- xmlNodePtr aCaseNode = hasParentRecursive(theNode, WDG_SWITCH_CASE, WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, NULL);
+ xmlNodePtr aCaseNode =
+ hasParentRecursive(theNode, WDG_SWITCH_CASE, WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, NULL);
while(aCaseNode) {
std::string aCaseNodeID = getProperty(aCaseNode, _ID);
std::string aSwitchNodeID = "";
aSwitchNode = hasParentRecursive(aCaseNode, WDG_TOOLBOX, NULL);
}
if (!xmlStrcmp(aName, (const xmlChar *) WDG_OPTIONALBOX)) {
- /// the box is optional, attribute is in case if the optional attribute value is not empty
+ /// the box is optional, attribute is in case
+ /// if the optional attribute value is not empty
aSwitchNode = aCaseNode;
}
if (aSwitchNode)
aSwitchNodeID = getProperty(aSwitchNode, _ID);
aCases.push_back(std::make_pair(aSwitchNodeID, aCaseNodeID));
- aCaseNode = hasParentRecursive(aSwitchNode, WDG_SWITCH_CASE, WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, NULL);
+ aCaseNode = hasParentRecursive(aSwitchNode, WDG_SWITCH_CASE,
+ WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, NULL);
}
aMessage->setCases(aCases);
Events_Loop::loop()->send(aMessage);
outFeatureMessage->setId(getProperty(theFeatureNode, _ID));
outFeatureMessage->setPluginLibrary(myLibraryName);
outFeatureMessage->setNestedFeatures(getProperty(theFeatureNode, FEATURE_NESTED));
- outFeatureMessage->setActionsWhenNested(getNormalizedProperty(theFeatureNode, FEATURE_WHEN_NESTED));
+ outFeatureMessage->setActionsWhenNested(getNormalizedProperty(theFeatureNode,
+ FEATURE_WHEN_NESTED));
outFeatureMessage->setModal(getBooleanAttribute(theFeatureNode, FEATURE_MODAL, false));
bool isInternal = getBooleanAttribute(theFeatureNode, ATTR_INTERNAL, false);
if (myFeaturesInFiles.count(theFeatureName)) {
std::string anErrorMsg = "Can not register feature '%1' in plugin '%2'."
" There is a feature with the same ID.";
- Events_InfoMessage("Config_ModuleReader", anErrorMsg).arg(theFeatureName).arg(thePluginConfig).send();
+ Events_InfoMessage("Config_ModuleReader", anErrorMsg)
+ .arg(theFeatureName).arg(thePluginConfig).send();
return;
}
CONFIG_EXPORT Config_ModuleReader(const char* theEventGenerated = 0);
/// Destructor
CONFIG_EXPORT virtual ~Config_ModuleReader();
- /// Returns map that describes which file contains a feature (the feature is key, the file is value)
+ /// Returns map that describes which file contains a feature
+ /// (the feature is key, the file is value)
CONFIG_EXPORT const std::map<std::string, std::string>& featuresInFiles() const;
/// Returns list of module's xml files
CONFIG_EXPORT const std::set<std::string>& modulePluginFiles() const;
std::string addPlugin(const std::string& aPluginLibrary,
const std::string& aPluginScript,
const std::string& aPluginConf);
- /// Save feature in myFeaturesInFiles. Generates an error if the feature name is already registered.
+ /// Save feature in myFeaturesInFiles.
+ /// Generates an error if the feature name is already registered.
void addFeature(const std::string& theFeatureName, const std::string& thePluginConfig);
private:
std::map<std::string, std::string> myFeaturesInFiles; ///< a feature name is key, a file is value
std::set<std::string> myPluginFiles; ///< a feature name is key, a file is value
- static std::map<std::string, PluginType> myPluginTypes; ///< a plugin name is key, a plugin type is value
+ /// a plugin name is key, a plugin type is value
+ static std::map<std::string, PluginType> myPluginTypes;
static std::set<std::string> myDependencyModules; ///< set of loaded modules
const char* myEventGenerated; ///< gives ability to send Feature_Messages to various listeners
};
Config_Properties Config_PropManager::myProps;
-Config_Prop* Config_PropManager::registerProp(const std::string& theSection, const std::string& theName,
- const std::string& theTitle, Config_Prop::PropType theType,
+Config_Prop* Config_PropManager::registerProp(const std::string& theSection,
+ const std::string& theName,
+ const std::string& theTitle,
+ Config_Prop::PropType theType,
const std::string& theDefaultValue)
{
Config_Prop* aProp = findProp(theSection, theName);
* \param theDefValue - default and initial value of the property
* Returns True if the property succesfully registered
*/
- CONFIG_EXPORT static Config_Prop* registerProp(const std::string& theSection, const std::string& theName,
- const std::string& theTitle, Config_Prop::PropType theType, const std::string& theDefValue = "");
+ CONFIG_EXPORT static Config_Prop* registerProp(const std::string& theSection,
+ const std::string& theName,
+ const std::string& theTitle, Config_Prop::PropType theType,
+ const std::string& theDefValue = "");
//! Finds property in the given section by the given name, if property not found returns NULL
CONFIG_EXPORT static Config_Prop* findProp(
const std::string& theSection, const std::string& theName);
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConnectorAPI_Connector.cpp
// Purpose:
//
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConnectorAPI_Connector.h
// Purpose:
//
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConstructionAPI_Axis.cpp
// Purpose:
//
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- setByTwoPlanes(thePlane1, theOffset1, theReverseOffset1, thePlane2, theOffset2, theReverseOffset2);
+ setByTwoPlanes(thePlane1, theOffset1, theReverseOffset1,
+ thePlane2, theOffset2, theReverseOffset2);
}
}
const ModelHighAPI_Double& theY,
const ModelHighAPI_Double& theZ)
{
- fillAttribute(ConstructionPlugin_Axis::CREATION_METHOD_BY_POINT_AND_DIRECTION(), creationMethod());
+ fillAttribute(ConstructionPlugin_Axis::CREATION_METHOD_BY_POINT_AND_DIRECTION(),
+ creationMethod());
fillAttribute(thePoint, firstPoint());
fillAttribute(theX, xDirection());
fillAttribute(theY, yDirection());
theDumper << ", " << anAttrDX << ", " << anAttrDY << ", " << anAttrDZ;
} else if(aCreationMethod == ConstructionPlugin_Axis::CREATION_METHOD_BY_TWO_POINTS()) {
- AttributeSelectionPtr anAttrFirstPnt = aBase->selection(ConstructionPlugin_Axis::POINT_FIRST());
- AttributeSelectionPtr anAttrSecondPnt = aBase->selection(ConstructionPlugin_Axis::POINT_SECOND());
+ AttributeSelectionPtr anAttrFirstPnt =
+ aBase->selection(ConstructionPlugin_Axis::POINT_FIRST());
+ AttributeSelectionPtr anAttrSecondPnt =
+ aBase->selection(ConstructionPlugin_Axis::POINT_SECOND());
theDumper << ", " << anAttrFirstPnt << ", " << anAttrSecondPnt;
} else if(aCreationMethod == ConstructionPlugin_Axis::CREATION_METHOD_BY_LINE()) {
theDumper << ", " << anAttrLine;
} else if(aCreationMethod == ConstructionPlugin_Axis::CREATION_METHOD_BY_CYLINDRICAL_FACE()) {
- AttributeSelectionPtr anAttrFace = aBase->selection(ConstructionPlugin_Axis::CYLINDRICAL_FACE());
+ AttributeSelectionPtr anAttrFace =
+ aBase->selection(ConstructionPlugin_Axis::CYLINDRICAL_FACE());
theDumper << ", " << anAttrFace;
} else if(aCreationMethod == ConstructionPlugin_Axis::CREATION_METHOD_BY_PLANE_AND_POINT()) {
if(aBase->string(ConstructionPlugin_Axis::USE_OFFSET1())->isInitialized()
&& !aBase->string(ConstructionPlugin_Axis::USE_OFFSET1())->value().empty()) {
AttributeDoublePtr anAttrOffset1 = aBase->real(ConstructionPlugin_Axis::OFFSET1());
- AttributeBooleanPtr anAttrReverseOffset1 = aBase->boolean(ConstructionPlugin_Axis::REVERSE_OFFSET1());
+ AttributeBooleanPtr anAttrReverseOffset1 =
+ aBase->boolean(ConstructionPlugin_Axis::REVERSE_OFFSET1());
theDumper << ", " << anAttrOffset1 << ", " << anAttrReverseOffset1;
}
if(aBase->string(ConstructionPlugin_Axis::USE_OFFSET2())->isInitialized()
&& !aBase->string(ConstructionPlugin_Axis::USE_OFFSET2())->value().empty()) {
AttributeDoublePtr anAttrOffset2 = aBase->real(ConstructionPlugin_Axis::OFFSET2());
- AttributeBooleanPtr anAttrReverseOffset2 = aBase->boolean(ConstructionPlugin_Axis::REVERSE_OFFSET2());
+ AttributeBooleanPtr anAttrReverseOffset2 =
+ aBase->boolean(ConstructionPlugin_Axis::REVERSE_OFFSET2());
theDumper << ", " << anAttrOffset2 << ", " << anAttrReverseOffset2;
}
} else if(aCreationMethod == ConstructionPlugin_Axis::CREATION_METHOD_BY_POINT_AND_DIRECTION()) {
// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConstructionAPI_Axis.h
// Purpose:
//
virtual ~ConstructionAPI_Axis();
INTERFACE_21(ConstructionPlugin_Axis::ID(),
- creationMethod, ConstructionPlugin_Axis::METHOD(), ModelAPI_AttributeString, /** Creation method */,
- firstPoint, ConstructionPlugin_Axis::POINT_FIRST(), ModelAPI_AttributeSelection, /** First point */,
- secondPoint, ConstructionPlugin_Axis::POINT_SECOND(), ModelAPI_AttributeSelection, /** Second point */,
- cylindricalFace, ConstructionPlugin_Axis::CYLINDRICAL_FACE(), ModelAPI_AttributeSelection, /** Cylindrical face */,
- xDirection, ConstructionPlugin_Axis::X_DIRECTION(), ModelAPI_AttributeDouble, /** X direction */,
- yDirection, ConstructionPlugin_Axis::Y_DIRECTION(), ModelAPI_AttributeDouble, /** Y direction */,
- zDirection, ConstructionPlugin_Axis::Z_DIRECTION(), ModelAPI_AttributeDouble, /** Z direction */,
- xDimension, ConstructionPlugin_Axis::DX(), ModelAPI_AttributeDouble, /** X dimension */,
- yDimension, ConstructionPlugin_Axis::DY(), ModelAPI_AttributeDouble, /** Y dimension */,
- zDimension, ConstructionPlugin_Axis::DZ(), ModelAPI_AttributeDouble, /** Z dimension */,
- line, ConstructionPlugin_Axis::LINE(), ModelAPI_AttributeSelection, /** Line */,
- plane, ConstructionPlugin_Axis::PLANE(), ModelAPI_AttributeSelection, /** Plane */,
- point, ConstructionPlugin_Axis::POINT(), ModelAPI_AttributeSelection, /** Point */,
- plane1, ConstructionPlugin_Axis::PLANE1(), ModelAPI_AttributeSelection, /** Plane 1 */,
- useOffset1, ConstructionPlugin_Axis::USE_OFFSET1(), ModelAPI_AttributeString, /** Use offset 1 */,
- offset1, ConstructionPlugin_Axis::OFFSET1(), ModelAPI_AttributeDouble, /** Offset 1 */,
- reverseOffset1, ConstructionPlugin_Axis::REVERSE_OFFSET1(), ModelAPI_AttributeBoolean, /** Reverse offset 1 */,
- plane2, ConstructionPlugin_Axis::PLANE2(), ModelAPI_AttributeSelection, /** Plane 2 */,
- useOffset2, ConstructionPlugin_Axis::USE_OFFSET2(), ModelAPI_AttributeString, /** Use offset 2 */,
- offset2, ConstructionPlugin_Axis::OFFSET2(), ModelAPI_AttributeDouble, /** Offset 2 */,
- reverseOffset2, ConstructionPlugin_Axis::REVERSE_OFFSET2(), ModelAPI_AttributeBoolean, /** Reverse offset 2 */)
+ creationMethod, ConstructionPlugin_Axis::METHOD(),
+ ModelAPI_AttributeString, /** Creation method */,
+ firstPoint, ConstructionPlugin_Axis::POINT_FIRST(),
+ ModelAPI_AttributeSelection, /** First point */,
+ secondPoint, ConstructionPlugin_Axis::POINT_SECOND(),
+ ModelAPI_AttributeSelection, /** Second point */,
+ cylindricalFace, ConstructionPlugin_Axis::CYLINDRICAL_FACE(),
+ ModelAPI_AttributeSelection, /** Cylindrical face */,
+ xDirection, ConstructionPlugin_Axis::X_DIRECTION(),
+ ModelAPI_AttributeDouble, /** X direction */,
+ yDirection, ConstructionPlugin_Axis::Y_DIRECTION(),
+ ModelAPI_AttributeDouble, /** Y direction */,
+ zDirection, ConstructionPlugin_Axis::Z_DIRECTION(),
+ ModelAPI_AttributeDouble, /** Z direction */,
+ xDimension, ConstructionPlugin_Axis::DX(),
+ ModelAPI_AttributeDouble, /** X dimension */,
+ yDimension, ConstructionPlugin_Axis::DY(),
+ ModelAPI_AttributeDouble, /** Y dimension */,
+ zDimension, ConstructionPlugin_Axis::DZ(),
+ ModelAPI_AttributeDouble, /** Z dimension */,
+ line, ConstructionPlugin_Axis::LINE(),
+ ModelAPI_AttributeSelection, /** Line */,
+ plane, ConstructionPlugin_Axis::PLANE(),
+ ModelAPI_AttributeSelection, /** Plane */,
+ point, ConstructionPlugin_Axis::POINT(),
+ ModelAPI_AttributeSelection, /** Point */,
+ plane1, ConstructionPlugin_Axis::PLANE1(),
+ ModelAPI_AttributeSelection, /** Plane 1 */,
+ useOffset1, ConstructionPlugin_Axis::USE_OFFSET1(),
+ ModelAPI_AttributeString, /** Use offset 1 */,
+ offset1, ConstructionPlugin_Axis::OFFSET1(),
+ ModelAPI_AttributeDouble, /** Offset 1 */,
+ reverseOffset1, ConstructionPlugin_Axis::REVERSE_OFFSET1(),
+ ModelAPI_AttributeBoolean, /** Reverse offset 1 */,
+ plane2, ConstructionPlugin_Axis::PLANE2(),
+ ModelAPI_AttributeSelection, /** Plane 2 */,
+ useOffset2, ConstructionPlugin_Axis::USE_OFFSET2(),
+ ModelAPI_AttributeString, /** Use offset 2 */,
+ offset2, ConstructionPlugin_Axis::OFFSET2(),
+ ModelAPI_AttributeDouble, /** Offset 2 */,
+ reverseOffset2, ConstructionPlugin_Axis::REVERSE_OFFSET2(),
+ ModelAPI_AttributeBoolean, /** Reverse offset 2 */)
/// Set points
CONSTRUCTIONAPI_EXPORT
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConstructionAPI_Plane.cpp
// Purpose:
//
{
fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE(), mycreationMethod);
fillAttribute(theFace, myplane);
- fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_DISTANCE_FROM_OTHER(), mycreationMethodByOtherPlane);
+ fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_DISTANCE_FROM_OTHER(),
+ mycreationMethodByOtherPlane);
fillAttribute(theDistance, mydistance);
fillAttribute(theIsReverse, myreverse);
void ConstructionAPI_Plane::setByTwoParallelPlanes(const ModelHighAPI_Selection& thePlane1,
const ModelHighAPI_Selection& thePlane2)
{
- fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_TWO_PARALLEL_PLANES(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_TWO_PARALLEL_PLANES(),
+ mycreationMethod);
fillAttribute(thePlane1, myplane1);
fillAttribute(thePlane2, myplane2);
{
fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE(), mycreationMethod);
fillAttribute(thePlane, myplane);
- fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_COINCIDENT_TO_POINT(), mycreationMethodByOtherPlane);
+ fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_COINCIDENT_TO_POINT(),
+ mycreationMethodByOtherPlane);
fillAttribute(thePoint, mycoincidentPoint);
execute();
{
fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE(), mycreationMethod);
fillAttribute(thePlane, myplane);
- fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_ROTATION(), mycreationMethodByOtherPlane);
+ fillAttribute(ConstructionPlugin_Plane::CREATION_METHOD_BY_ROTATION(),
+ mycreationMethodByOtherPlane);
fillAttribute(theAxis, myaxis);
fillAttribute(theAngle, myangle);
theDumper << aBase << " = model.addPlane(" << aDocName;
- std::string aCreationMethod = aBase->string(ConstructionPlugin_Plane::CREATION_METHOD())->value();
+ std::string aCreationMethod =
+ aBase->string(ConstructionPlugin_Plane::CREATION_METHOD())->value();
if(aCreationMethod == ConstructionPlugin_Plane::CREATION_METHOD_BY_GENERAL_EQUATION()) {
AttributeDoublePtr anAttrA = aBase->real(ConstructionPlugin_Plane::A());
} else if(aCreationMethod == ConstructionPlugin_Plane::CREATION_METHOD_BY_LINE_AND_POINT()) {
AttributeSelectionPtr anAttrLine = aBase->selection(ConstructionPlugin_Plane::LINE());
AttributeSelectionPtr anAttrPoint = aBase->selection(ConstructionPlugin_Plane::POINT());
- AttributeBooleanPtr anAttrPerpendicular = aBase->boolean(ConstructionPlugin_Plane::PERPENDICULAR());
+ AttributeBooleanPtr anAttrPerpendicular =
+ aBase->boolean(ConstructionPlugin_Plane::PERPENDICULAR());
theDumper << ", " << anAttrLine << ", " << anAttrPoint << ", " << anAttrPerpendicular;
} else if(aCreationMethod == ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE()) {
std::string aCreationMethodOption =
aBase->string(ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE_OPTION())->value();
- if(aCreationMethodOption == ConstructionPlugin_Plane::CREATION_METHOD_BY_DISTANCE_FROM_OTHER()) {
+ if(aCreationMethodOption ==
+ ConstructionPlugin_Plane::CREATION_METHOD_BY_DISTANCE_FROM_OTHER()) {
AttributeDoublePtr anAttrDistance = aBase->real(ConstructionPlugin_Plane::DISTANCE());
AttributeBooleanPtr anAttrReverse = aBase->boolean(ConstructionPlugin_Plane::REVERSE());
theDumper << ", " << anAttrPlane << ", " << anAttrDistance << ", " << anAttrReverse;
- } else if(aCreationMethodOption == ConstructionPlugin_Plane::CREATION_METHOD_BY_COINCIDENT_TO_POINT()) {
- AttributeSelectionPtr anAttrPoint = aBase->selection(ConstructionPlugin_Plane::COINCIDENT_POINT());
+ } else if(aCreationMethodOption ==
+ ConstructionPlugin_Plane::CREATION_METHOD_BY_COINCIDENT_TO_POINT()) {
+ AttributeSelectionPtr anAttrPoint =
+ aBase->selection(ConstructionPlugin_Plane::COINCIDENT_POINT());
theDumper << ", " << anAttrPlane << ", " << anAttrPoint;
} else if(aCreationMethodOption == ConstructionPlugin_Plane::CREATION_METHOD_BY_ROTATION()) {
theDumper << ", " << anAttrPlane << ", " << anAttrAxis << ", " << anAttrAngle;
}
- } else if(aCreationMethod == ConstructionPlugin_Plane::CREATION_METHOD_BY_TWO_PARALLEL_PLANES()) {
+ } else if(aCreationMethod ==
+ ConstructionPlugin_Plane::CREATION_METHOD_BY_TWO_PARALLEL_PLANES()) {
AttributeSelectionPtr anAttrPlane1 = aBase->selection(ConstructionPlugin_Plane::PLANE1());
AttributeSelectionPtr anAttrPlane2 = aBase->selection(ConstructionPlugin_Plane::PLANE2());
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConstructionAPI_Plane.h
// Purpose:
//
virtual ~ConstructionAPI_Plane();
INTERFACE_20(ConstructionPlugin_Plane::ID(),
- creationMethod, ConstructionPlugin_Plane::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
- A, ConstructionPlugin_Plane::A(), ModelAPI_AttributeDouble, /** Parameter A for general equation */,
- B, ConstructionPlugin_Plane::B(), ModelAPI_AttributeDouble, /** Parameter B for general equation */,
- C, ConstructionPlugin_Plane::C(), ModelAPI_AttributeDouble, /** Parameter C for general equation */,
- D, ConstructionPlugin_Plane::D(), ModelAPI_AttributeDouble, /** Parameter D for general equation */,
- point1, ConstructionPlugin_Plane::POINT1(), ModelAPI_AttributeSelection, /** Point 1 for plane */,
- point2, ConstructionPlugin_Plane::POINT2(), ModelAPI_AttributeSelection, /** Point 2 for plane */,
- point3, ConstructionPlugin_Plane::POINT3(), ModelAPI_AttributeSelection, /** Point 3 for plane */,
- line, ConstructionPlugin_Plane::LINE(), ModelAPI_AttributeSelection, /** Line for plane */,
- point, ConstructionPlugin_Plane::POINT(), ModelAPI_AttributeSelection, /** Point for plane */,
- perpendicular, ConstructionPlugin_Plane::PERPENDICULAR(), ModelAPI_AttributeBoolean, /** Perpendicular flag */,
- creationMethodByOtherPlane, ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE_OPTION(), ModelAPI_AttributeString, /** Creation method by other plane*/,
- plane, ConstructionPlugin_Plane::PLANE(), ModelAPI_AttributeSelection, /** Plane face */,
- distance, ConstructionPlugin_Plane::DISTANCE(), ModelAPI_AttributeDouble, /** Distance */,
- reverse, ConstructionPlugin_Plane::REVERSE(), ModelAPI_AttributeBoolean, /** Reverse flag */,
- coincidentPoint, ConstructionPlugin_Plane::COINCIDENT_POINT(), ModelAPI_AttributeSelection, /** Coincident point */,
- axis, ConstructionPlugin_Plane::AXIS(), ModelAPI_AttributeSelection, /** Axis for rotation */,
- angle, ConstructionPlugin_Plane::ANGLE(), ModelAPI_AttributeDouble, /** Rotation angle */,
- plane1, ConstructionPlugin_Plane::PLANE1(), ModelAPI_AttributeSelection, /** Plane 1 */,
- plane2, ConstructionPlugin_Plane::PLANE2(), ModelAPI_AttributeSelection, /** Plane 2 */)
+ creationMethod, ConstructionPlugin_Plane::CREATION_METHOD(),
+ ModelAPI_AttributeString, /** Creation method */,
+ A, ConstructionPlugin_Plane::A(),
+ ModelAPI_AttributeDouble, /** Parameter A for general equation */,
+ B, ConstructionPlugin_Plane::B(),
+ ModelAPI_AttributeDouble, /** Parameter B for general equation */,
+ C, ConstructionPlugin_Plane::C(),
+ ModelAPI_AttributeDouble, /** Parameter C for general equation */,
+ D, ConstructionPlugin_Plane::D(),
+ ModelAPI_AttributeDouble, /** Parameter D for general equation */,
+ point1, ConstructionPlugin_Plane::POINT1(),
+ ModelAPI_AttributeSelection, /** Point 1 for plane */,
+ point2, ConstructionPlugin_Plane::POINT2(),
+ ModelAPI_AttributeSelection, /** Point 2 for plane */,
+ point3, ConstructionPlugin_Plane::POINT3(),
+ ModelAPI_AttributeSelection, /** Point 3 for plane */,
+ line, ConstructionPlugin_Plane::LINE(),
+ ModelAPI_AttributeSelection, /** Line for plane */,
+ point, ConstructionPlugin_Plane::POINT(),
+ ModelAPI_AttributeSelection, /** Point for plane */,
+ perpendicular, ConstructionPlugin_Plane::PERPENDICULAR(),
+ ModelAPI_AttributeBoolean, /** Perpendicular flag */,
+ creationMethodByOtherPlane,
+ ConstructionPlugin_Plane::CREATION_METHOD_BY_OTHER_PLANE_OPTION(),
+ ModelAPI_AttributeString, /** Creation method by other plane*/,
+ plane, ConstructionPlugin_Plane::PLANE(),
+ ModelAPI_AttributeSelection, /** Plane face */,
+ distance, ConstructionPlugin_Plane::DISTANCE(),
+ ModelAPI_AttributeDouble, /** Distance */,
+ reverse, ConstructionPlugin_Plane::REVERSE(),
+ ModelAPI_AttributeBoolean, /** Reverse flag */,
+ coincidentPoint, ConstructionPlugin_Plane::COINCIDENT_POINT(),
+ ModelAPI_AttributeSelection, /** Coincident point */,
+ axis, ConstructionPlugin_Plane::AXIS(),
+ ModelAPI_AttributeSelection, /** Axis for rotation */,
+ angle, ConstructionPlugin_Plane::ANGLE(),
+ ModelAPI_AttributeDouble, /** Rotation angle */,
+ plane1, ConstructionPlugin_Plane::PLANE1(),
+ ModelAPI_AttributeSelection, /** Plane 1 */,
+ plane2, ConstructionPlugin_Plane::PLANE2(),
+ ModelAPI_AttributeSelection, /** Plane 2 */)
/// Set face and distance
CONSTRUCTIONAPI_EXPORT
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConstructionAPI_Point.cpp
// Purpose:
//
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
// Name : ConstructionAPI_Point.h
// Purpose:
//
y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */,
z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */)
- //INTERFACE_14(ConstructionPlugin_Point::ID(),
- // creationMethod, ConstructionPlugin_Point::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
- // x, ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble, /** X attribute */,
- // y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */,
- // z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */,
- // edge, ConstructionPlugin_Point::EDGE(), ModelAPI_AttributeSelection, /** Edge attribute */,
- // distanceValue, ConstructionPlugin_Point::DISTANCE_VALUE(), ModelAPI_AttributeDouble, /** Distance value attribute */,
- // distancePercent, ConstructionPlugin_Point::DISTANCE_PERCENT(), ModelAPI_AttributeBoolean, /** Distance percent attribute */,
- // reverse, ConstructionPlugin_Point::REVERSE(), ModelAPI_AttributeBoolean, /** Reverse attribute */,
- // point, ConstructionPlugin_Point::POINT(), ModelAPI_AttributeSelection, /** Point attribute */,
- // plane, ConstructionPlugin_Point::PLANE(), ModelAPI_AttributeSelection, /** Plane attribute */,
- // firstLine, ConstructionPlugin_Point::FIRST_LINE(), ModelAPI_AttributeSelection, /** First line attribute */,
- // secondLine, ConstructionPlugin_Point::SECOND_LINE(), ModelAPI_AttributeSelection, /** Second line attribute */,
- // intersectionLine, ConstructionPlugin_Point::INTERSECTION_LINE(), ModelAPI_AttributeSelection, /** Intersection line attribute */,
- // intersectionPlane, ConstructionPlugin_Point::INTERSECTION_PLANE(), ModelAPI_AttributeSelection, /** Intersection plane attribute */
- //)
/// Set point values.
CONSTRUCTIONAPI_EXPORT
double aDY = data()->real(DY())->value();
double aDZ = data()->real(DZ())->value();
- if (fabs(aDX) < MINIMAL_LENGTH() && fabs(aDY) < MINIMAL_LENGTH() && fabs(aDZ) < MINIMAL_LENGTH()){
+ if (fabs(aDX) < MINIMAL_LENGTH() && fabs(aDY) < MINIMAL_LENGTH() &&
+ fabs(aDZ) < MINIMAL_LENGTH()) {
setError("Axis builder with dimensions :: all dimensions are null", false);
return ;
}
static GeomShapePtr faceByThreeVertices(const std::shared_ptr<GeomAPI_Vertex> theV1,
const std::shared_ptr<GeomAPI_Vertex> theV2,
const std::shared_ptr<GeomAPI_Vertex> theV3);
-static std::shared_ptr<GeomAPI_Face> makeRectangularFace(const std::shared_ptr<GeomAPI_Face> theFace,
- const std::shared_ptr<GeomAPI_Pln> thePln);
+static std::shared_ptr<GeomAPI_Face> makeRectangularFace(
+ const std::shared_ptr<GeomAPI_Face> theFace,
+ const std::shared_ptr<GeomAPI_Pln> thePln);
//==================================================================================================
ConstructionPlugin_Plane::ConstructionPlugin_Plane()
//==================================================================================================
void ConstructionPlugin_Plane::initAttributes()
{
- data()->addAttribute(ConstructionPlugin_Plane::CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ConstructionPlugin_Plane::CREATION_METHOD(),
+ ModelAPI_AttributeString::typeId());
data()->addAttribute(PLANE(), ModelAPI_AttributeSelection::typeId());
data()->addAttribute(DISTANCE(), ModelAPI_AttributeDouble::typeId());
GeomShapePtr aShape;
std::string aCreationMethod = string(CREATION_METHOD())->value();
- if(aCreationMethod == CREATION_METHOD_BY_GENERAL_EQUATION() || aCreationMethod == "PlaneByGeneralEquation") {
+ if(aCreationMethod == CREATION_METHOD_BY_GENERAL_EQUATION() ||
+ aCreationMethod == "PlaneByGeneralEquation") {
aShape = createByGeneralEquation();
} else if(aCreationMethod == CREATION_METHOD_BY_THREE_POINTS()) {
aShape = createByThreePoints();
//==================================================================================================
bool ConstructionPlugin_Plane::customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
- std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
+ std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
{
std::vector<int> aColor;
// get color from the attribute of the result
- if (theResult.get() != NULL && theResult->data()->attribute(ModelAPI_Result::COLOR_ID()).get() != NULL) {
+ if (theResult.get() != NULL &&
+ theResult->data()->attribute(ModelAPI_Result::COLOR_ID()).get() != NULL) {
AttributeIntArrayPtr aColorAttr = theResult->data()->intArray(ModelAPI_Result::COLOR_ID());
if (aColorAttr.get() && aColorAttr->size()) {
aColor.push_back(aColorAttr->value(0));
}
std::shared_ptr<GeomAPI_Edge> anEdge(new GeomAPI_Edge(anAxisShape));
- std::shared_ptr<GeomAPI_Ax1> anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(),
- anEdge->line()->direction()));
+ std::shared_ptr<GeomAPI_Ax1> anAxis =
+ std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(),
+ anEdge->line()->direction()));
// Getting angle.
double anAngle = real(ANGLE())->value();
const std::shared_ptr<GeomAPI_Vertex> theV2,
const std::shared_ptr<GeomAPI_Vertex> theV3)
{
- std::shared_ptr<GeomAPI_Face> aFace = GeomAlgoAPI_FaceBuilder::planarFaceByThreeVertices(theV1, theV2, theV3);
+ std::shared_ptr<GeomAPI_Face> aFace =
+ GeomAlgoAPI_FaceBuilder::planarFaceByThreeVertices(theV1, theV2, theV3);
ListOfShape anObjects;
anObjects.push_back(theV1);
anObjects.push_back(theV2);
anObjects.push_back(theV3);
- std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints = GeomAlgoAPI_ShapeTools::getBoundingBox(anObjects, 1.0);
+ std::list<std::shared_ptr<GeomAPI_Pnt> > aBoundingPoints =
+ GeomAlgoAPI_ShapeTools::getBoundingBox(anObjects, 1.0);
GeomShapePtr aRes = GeomAlgoAPI_ShapeTools::fitPlaneToBox(aFace, aBoundingPoints);
return aRes;
double aWgap = (aMaxX2d - aMinX2d) * 0.1;
double aHgap = (aMaxY2d - aMinY2d) * 0.1;
std::shared_ptr<GeomAPI_Face> aResFace = GeomAlgoAPI_FaceBuilder::planarFace(thePln,
- aMinX2d - aWgap, aMinY2d - aHgap, aMaxX2d - aMinX2d + 2. * aWgap, aMaxY2d - aMinY2d + 2. * aHgap);
+ aMinX2d - aWgap, aMinY2d - aHgap, aMaxX2d - aMinX2d + 2. * aWgap,
+ aMaxY2d - aMinY2d + 2. * aHgap);
return aResFace;
}
ModelAPI_Session::get()->registerPlugin(this);
// register construction properties
- Config_PropManager::registerProp("Visualization", "construction_plane_color", "Construction plane color",
+ Config_PropManager::registerProp("Visualization", "construction_plane_color",
+ "Construction plane color",
Config_Prop::Color, ConstructionPlugin_Plane::DEFAULT_COLOR());
}
//==================================================================================================
bool ConstructionPlugin_Point::customisePresentation(ResultPtr theResult,
AISObjectPtr thePrs,
- std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
+ std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
{
bool isCustomized = theDefaultPrs.get() != NULL &&
theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
{
FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
- AttributeSelectionPtr aLineAttribute1 = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+ AttributeSelectionPtr aLineAttribute1 =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
AttributeSelectionPtr aLineAttribute2 = aFeature->selection(theArguments.front());
GeomShapePtr aLineShape1 = aLineAttribute1->value();
{
FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
- AttributeSelectionPtr anAttribute1 = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+ AttributeSelectionPtr anAttribute1 =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
std::shared_ptr<GeomAPI_Lin> aLin;
//==================================================================================================
bool ConstructionPlugin_ValidatorPlaneThreePoints::isValid(const AttributePtr& theAttribute,
- const std::list<std::string>& theArguments,
- Events_InfoMessage& theError) const
+ const std::list<std::string>& theArguments,
+ Events_InfoMessage& theError) const
{
FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
- AttributeSelectionPtr aPointAttribute1 = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+ AttributeSelectionPtr aPointAttribute1 =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
AttributeSelectionPtr aPointAttribute2 = aFeature->selection(theArguments.front());
AttributeSelectionPtr aPointAttribute3 = aFeature->selection(theArguments.back());
{
FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
- AttributeSelectionPtr anAttribute1 = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+ AttributeSelectionPtr anAttribute1 =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
std::shared_ptr<GeomAPI_Lin> aLin;
{
FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
- AttributeSelectionPtr anAttribute1 = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+ AttributeSelectionPtr anAttribute1 =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
std::shared_ptr<GeomAPI_Pln> aPln1;
{
FeaturePtr aFeature = ModelAPI_Feature::feature(theAttribute->owner());
- AttributeSelectionPtr anAttribute1 = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
+ AttributeSelectionPtr anAttribute1 =
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
AttributeSelectionPtr anAttribute2 = aFeature->selection(theArguments.front());
std::shared_ptr<GeomAPI_Pln> aPln1;
/// Constructor
/// \param theSender a pointer on sender object
- explicit Events_InfoMessage(const void* theSender = 0):Events_Message(Events_Loop::eventByName("InfoMessage"), theSender) {}
+ explicit Events_InfoMessage(const void* theSender = 0):
+ Events_Message(Events_Loop::eventByName("InfoMessage"), theSender) {}
/// Constructor
/// \param theSender a pointer on sender object
*/
class EVENTS_EXPORT Events_ID
{
- char* myID; ///< pointer to the text-identifier of the event, unique pointer for all events of such type
+ /// pointer to the text-identifier of the event, unique pointer for all events of such type
+ char* myID;
Events_ID(char* theID)
{
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// Name : ExchangeAPI_Export.cpp
// Purpose:
//
const std::string & theFileFormat)
{
// TODO(spo): check that thePart is not empty
- std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ExchangePlugin_ExportFeature::ID());
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ thePart->addFeature(ExchangePlugin_ExportFeature::ID());
fillAttribute("Regular", aFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID()));
fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::FILE_PATH_ID()));
- fillAttribute(theSelectionList, aFeature->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID()));
+ fillAttribute(theSelectionList,
+ aFeature->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID()));
fillAttribute(theFileFormat, aFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()));
aFeature->execute();
}
const std::string & theGeometryName)
{
// TODO(spo): check that thePart is not empty
- std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ExchangePlugin_ExportFeature::ID());
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ thePart->addFeature(ExchangePlugin_ExportFeature::ID());
fillAttribute("XAO", aFeature->string(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID()));
fillAttribute(theFilePath, aFeature->string(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID()));
fillAttribute(theAuthor, aFeature->string(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID()));
- fillAttribute(theGeometryName, aFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID()));
+ fillAttribute(theGeometryName,
+ aFeature->string(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID()));
fillAttribute("XAO", aFeature->string(ExchangePlugin_ExportFeature::FILE_FORMAT_ID()));
aFeature->execute();
}
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// Name : ExchangeAPI_Export.h
// Purpose:
//
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// Name : ExchangeAPI_Import.cpp
// Purpose:
//
// to make import have results
theDumper << "model.do()" << std::endl;
- CompositeFeaturePtr aCompositeFeature = std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aBase);
+ CompositeFeaturePtr aCompositeFeature =
+ std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aBase);
if(aCompositeFeature.get()) {
int aNbOfSubs = aCompositeFeature->numberOfSubs();
for(int anIndex = 0; anIndex < aNbOfSubs; ++anIndex) {
- std::string aSubFeatureGet = theDumper.name(aBase) + ".subFeature(" + std::to_string((long long)anIndex) + ")";
+ std::string aSubFeatureGet =
+ theDumper.name(aBase) + ".subFeature(" + std::to_string((long long)anIndex) + ")";
theDumper.dumpSubFeatureNameAndColor(aSubFeatureGet, aCompositeFeature->subFeature(anIndex));
}
}
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// Name : ExchangeAPI_Import.h
// Purpose:
//
virtual ~ExchangeAPI_Import();
INTERFACE_1(ExchangePlugin_ImportFeature::ID(),
- filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString, /** File path */
+ filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(),
+ ModelAPI_AttributeString, /** File path */
)
/// Set point values
*/
void ExchangePlugin_ExportFeature::initAttributes()
{
- data()->addAttribute(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(ExchangePlugin_ExportFeature::FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(ExchangePlugin_ExportFeature::FILE_FORMAT_ID(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(ExchangePlugin_ExportFeature::SELECTION_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
- data()->addAttribute(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID(), ModelAPI_AttributeString::typeId());
-
- //ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::SELECTION_LIST_ID());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::XAO_AUTHOR_ID());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID());
+ data()->addAttribute(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID(),
+ ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ExchangePlugin_ExportFeature::FILE_PATH_ID(),
+ ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID(),
+ ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ExchangePlugin_ExportFeature::FILE_FORMAT_ID(),
+ ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ExchangePlugin_ExportFeature::SELECTION_LIST_ID(),
+ ModelAPI_AttributeSelectionList::typeId());
+ data()->addAttribute(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID(),
+ ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID(),
+ ModelAPI_AttributeString::typeId());
+
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
+ ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
+ ExchangePlugin_ExportFeature::XAO_AUTHOR_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(),
+ ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID());
}
void ExchangePlugin_ExportFeature::attributeChanged(const std::string& theID)
// complex conversion of reference id to element index
int aReferenceID = aSelection->Id();
std::string aReferenceString = XAO::XaoUtils::intToString(aReferenceID);
- int anElementID = aXao.getGeometry()->getElementIndexByReference(aGroupDimension, aReferenceString);
+ int anElementID =
+ aXao.getGeometry()->getElementIndexByReference(aGroupDimension, aReferenceString);
aXaoGroup->add(anElementID);
}
*/
void ExchangePlugin_ImportFeature::initAttributes()
{
- data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
- AttributePtr aFeaturesAttribute = data()->addAttribute(ExchangePlugin_ImportFeature::FEATURES_ID(), ModelAPI_AttributeRefList::typeId());
+ data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(),
+ ModelAPI_AttributeString::typeId());
+ AttributePtr aFeaturesAttribute =
+ data()->addAttribute(ExchangePlugin_ImportFeature::FEATURES_ID(),
+ ModelAPI_AttributeRefList::typeId());
aFeaturesAttribute->setIsArgument(false);
ModelAPI_Session::get()->validators()->registerNotObligatory(