]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1834: Fix length of lines
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 9 Nov 2016 14:26:10 +0000 (17:26 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 9 Nov 2016 14:26:10 +0000 (17:26 +0300)
28 files changed:
src/Config/Config_AttributeMessage.cpp
src/Config/Config_DataModelReader.cpp
src/Config/Config_FeatureReader.cpp
src/Config/Config_ModuleReader.cpp
src/Config/Config_ModuleReader.h
src/Config/Config_PropManager.cpp
src/Config/Config_PropManager.h
src/ConnectorAPI/ConnectorAPI_Connector.cpp
src/ConnectorAPI/ConnectorAPI_Connector.h
src/ConstructionAPI/ConstructionAPI_Axis.cpp
src/ConstructionAPI/ConstructionAPI_Axis.h
src/ConstructionAPI/ConstructionAPI_Plane.cpp
src/ConstructionAPI/ConstructionAPI_Plane.h
src/ConstructionAPI/ConstructionAPI_Point.cpp
src/ConstructionAPI/ConstructionAPI_Point.h
src/ConstructionPlugin/ConstructionPlugin_Axis.cpp
src/ConstructionPlugin/ConstructionPlugin_Plane.cpp
src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
src/ConstructionPlugin/ConstructionPlugin_Point.cpp
src/ConstructionPlugin/ConstructionPlugin_Validators.cpp
src/Events/Events_InfoMessage.h
src/Events/Events_Message.h
src/ExchangeAPI/ExchangeAPI_Export.cpp
src/ExchangeAPI/ExchangeAPI_Export.h
src/ExchangeAPI/ExchangeAPI_Import.cpp
src/ExchangeAPI/ExchangeAPI_Import.h
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp

index b154d9cbfbd2c4c9444d945d966c063696f86945..e1df96c3d7324451b2cbec4fc48c86edd46e04ec 100644 (file)
@@ -61,7 +61,8 @@ const std::list<std::pair<std::string, std::string> >& Config_AttributeMessage::
   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;
 }
index afd688ed538e072fd344c88d5feb6c786e53a39a..b9c000104422fff2548c678625828d53f6a85ce8 100644 (file)
@@ -29,7 +29,8 @@ void Config_DataModelReader::processNode(xmlNodePtr theNode)
     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);
index 5fdd12f6af11cb7972b0588feeb97962c91e7c3f..ed25f9821832ade3c5f82bc4a33562f4858a679d 100644 (file)
@@ -51,7 +51,8 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
   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:
@@ -64,7 +65,8 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
   } 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()) {
@@ -73,7 +75,8 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
         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 = "";
@@ -86,14 +89,16 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
             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);
@@ -135,7 +140,8 @@ void Config_FeatureReader::fillFeature(xmlNodePtr theFeatureNode,
   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);
index dfd442b7e6012a70d6938d8fb800ffcb7d3de71c..1b206fba6f97b3e59618101a058ee5e4515d9788 100644 (file)
@@ -72,7 +72,8 @@ void Config_ModuleReader::addFeature(const std::string& theFeatureName,
   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;
   }
 
index a50fd028c75e90540dd09235a2e5382dd608a790..a8b1910bc8a54e7db5e744ea7e72443d3af48b73 100644 (file)
@@ -36,7 +36,8 @@ class Config_ModuleReader : public Config_XMLReader
   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;
@@ -69,13 +70,15 @@ class Config_ModuleReader : public Config_XMLReader
   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
 };
index c6e71b88e36435a44c0cdd3c3edc7fc44e54926c..de17ec1a5fddd86dfaa67a9a9cdd3616ce5a68e6 100644 (file)
@@ -13,8 +13,10 @@ bool stringToBoolean(const std::string& theInt);
 
 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);
index 9b2ced3eafdf41b28ec17b152c9c459eb04d39f8..bb7854b10fe675eb14be99a650c6ede6027a0160 100644 (file)
@@ -32,8 +32,10 @@ class Config_PropManager
    * \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);
index 7662f41979e37ca0f4dca3eed71eb8e0749f4103..35b12b263b7229717944c5d488d352d6cd6a4f23 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConnectorAPI_Connector.cpp
 // Purpose: 
 //
index 5ddf0bfe76fc2464864510217379d7a37b67f464..9c8c210ab8ae3bb7907e4e620ed1fb76ef531bc8 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConnectorAPI_Connector.h
 // Purpose: 
 //
index 7f1debcfa76ffe11e9233916acdc41520427e2d8..6883edf46289d71406b861d4537005efff27b343 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConstructionAPI_Axis.cpp
 // Purpose: 
 //
@@ -86,7 +88,8 @@ ConstructionAPI_Axis::ConstructionAPI_Axis(const std::shared_ptr<ModelAPI_Featur
 : ModelHighAPI_Interface(theFeature)
 {
   if(initialize()) {
-    setByTwoPlanes(thePlane1, theOffset1, theReverseOffset1, thePlane2, theOffset2, theReverseOffset2);
+    setByTwoPlanes(thePlane1, theOffset1, theReverseOffset1, 
+                   thePlane2, theOffset2, theReverseOffset2);
   }
 }
 
@@ -147,7 +150,8 @@ void ConstructionAPI_Axis::setByPointAndDirection(const ModelHighAPI_Selection&
                                                   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());
@@ -274,8 +278,10 @@ void ConstructionAPI_Axis::dump(ModelHighAPI_Dumper& theDumper) const
 
     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()) {
@@ -283,7 +289,8 @@ void ConstructionAPI_Axis::dump(ModelHighAPI_Dumper& theDumper) const
 
     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()) {
@@ -299,7 +306,8 @@ void ConstructionAPI_Axis::dump(ModelHighAPI_Dumper& theDumper) const
     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;
     }
 
@@ -307,7 +315,8 @@ void ConstructionAPI_Axis::dump(ModelHighAPI_Dumper& theDumper) const
     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()) {
index e9bdb6bfc944125b54adda045da8c2ad0379b2ee..477ce6c3714d44bbf00739394335405e35a54fd0 100644 (file)
@@ -1,5 +1,7 @@
 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
 
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConstructionAPI_Axis.h
 // Purpose: 
 //
@@ -87,27 +89,48 @@ public:
   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
index b7de5703c0b882fc8e56067c416ce264c13914ab..9d7a3d96ec20349e2dc0642e97f8c1bdd5e07f18 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConstructionAPI_Plane.cpp
 // Purpose: 
 //
@@ -106,7 +108,8 @@ void ConstructionAPI_Plane::setByFaceAndDistance(const ModelHighAPI_Selection& t
 {
   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);
 
@@ -158,7 +161,8 @@ void ConstructionAPI_Plane::setByLineAndPoint(const ModelHighAPI_Selection& theL
 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);
 
@@ -171,7 +175,8 @@ void ConstructionAPI_Plane::setByCoincidentToPoint(const ModelHighAPI_Selection&
 {
   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();
@@ -184,7 +189,8 @@ void ConstructionAPI_Plane::setByRotation(const ModelHighAPI_Selection& thePlane
 {
   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);
 
@@ -199,7 +205,8 @@ void ConstructionAPI_Plane::dump(ModelHighAPI_Dumper& theDumper) const
 
   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());
@@ -217,7 +224,8 @@ void ConstructionAPI_Plane::dump(ModelHighAPI_Dumper& theDumper) const
   } 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()) {
@@ -225,13 +233,16 @@ void ConstructionAPI_Plane::dump(ModelHighAPI_Dumper& theDumper) const
 
     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()) {
@@ -240,7 +251,8 @@ void ConstructionAPI_Plane::dump(ModelHighAPI_Dumper& theDumper) const
 
       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());
 
index 48eef87db38f27daea155b6e2c26ee2f5e10a268..b2d206e8c3247352b8385a002053226ba6ebc256 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConstructionAPI_Plane.h
 // Purpose: 
 //
@@ -74,26 +76,47 @@ public:
   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
index 5e9aea6e18b291132bd0aa7dcf2045e498c15d13..2c86fbbb78c0f5112774e156df8d32e4649975fb 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConstructionAPI_Point.cpp
 // Purpose: 
 //
index 6c2b295bb69c0490bd1f178a6f85261773c5d7f0..aa454fcfba1e6c6b1d64bcd14c8eb8f2d27e941d 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
+
 // Name   : ConstructionAPI_Point.h
 // Purpose: 
 //
@@ -58,22 +60,6 @@ public:
               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
index 1317356de7f708746508ccba492e7957ccfad393..8c59aa01c704f0bb1fee23693c387519ece28151 100644 (file)
@@ -171,7 +171,8 @@ void ConstructionPlugin_Axis::createAxisByDimensions()
   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 ;
   }
index 6fc73fa04d8dbc11e62c91c505d58440a0b86a4f..754a5aa4680f3e810a636a9d78b9a904d09b8e5f 100644 (file)
@@ -34,8 +34,9 @@
 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()
@@ -45,7 +46,8 @@ 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());
@@ -87,7 +89,8 @@ void ConstructionPlugin_Plane::execute()
   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();
@@ -122,11 +125,12 @@ void ConstructionPlugin_Plane::execute()
 
 //==================================================================================================
 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));
@@ -328,8 +332,9 @@ std::shared_ptr<GeomAPI_Shape> ConstructionPlugin_Plane::createByRotation()
   }
   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();
@@ -379,13 +384,15 @@ GeomShapePtr faceByThreeVertices(const std::shared_ptr<GeomAPI_Vertex> theV1,
                                  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;
@@ -424,7 +431,8 @@ std::shared_ptr<GeomAPI_Face> makeRectangularFace(const std::shared_ptr<GeomAPI_
   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;
 }
index dab24920d4ff0bd3ba7b3d02fd1a76535582f942..40c016f503f7ef4ef101183ba8a0b5eb341f7389 100644 (file)
@@ -37,7 +37,8 @@ ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
   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());
 }
 
index e5d40b7c1e163eca0c1890103248da3cf7acd62f..fa0cf672a2d801930cc5c663b2e5b342fa5d9c56 100644 (file)
@@ -86,7 +86,7 @@ void ConstructionPlugin_Point::execute()
 //==================================================================================================
 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);
index 6fa9cbd240ac42b0f013398bcedaec07abed30a4..e9d239b826941dc607716402356a0d70cd52ec7f 100644 (file)
@@ -29,7 +29,8 @@ bool ConstructionPlugin_ValidatorPointLines::isValid(const AttributePtr& theAttr
 {
   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();
@@ -86,7 +87,8 @@ bool ConstructionPlugin_ValidatorPointLineAndPlaneNotParallel::isValid(
 {
   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;
@@ -133,12 +135,13 @@ bool ConstructionPlugin_ValidatorPointLineAndPlaneNotParallel::isValid(
 
 //==================================================================================================
 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());
 
@@ -208,7 +211,8 @@ bool ConstructionPlugin_ValidatorPlaneLinePoint::isValid(
 {
   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;
@@ -265,7 +269,8 @@ bool ConstructionPlugin_ValidatorPlaneTwoParallelPlanes::isValid(
 {
   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;
@@ -317,7 +322,8 @@ bool ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes::isValid(
 {
   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;
index 77ebdb1c4e3fabe94dcbcfefae14eb1060157c37..b5e33ec3c775b849c3b9613d5480e4a8c348aac1 100644 (file)
@@ -24,7 +24,8 @@ public:
 
   /// 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
index c55149ff21bf19037e97bd17d1aef7aaadbcaef0..68b757e8fc91a9dcff60557b6743761eda2708be 100644 (file)
@@ -21,7 +21,8 @@
  */
 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)
   {
index 68a0b464536359d64579f4dde80738aa56a17107..5b1dd9a98fe499d8fb3615439f29184f3b2bdfbf 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // Name   : ExchangeAPI_Export.cpp
 // Purpose: 
 //
@@ -15,10 +17,12 @@ void exportToFile(const std::shared_ptr<ModelAPI_Document> & thePart,
                   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();
 }
@@ -29,11 +33,13 @@ void exportToXAO(const std::shared_ptr<ModelAPI_Document> & thePart,
                  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();
 }
index 9846f5cf6d6360194aea451d97cbe644891f438f..6a7025f8bb98c6b3f4cec4446f3e405167c1c8b0 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // Name   : ExchangeAPI_Export.h
 // Purpose: 
 //
index cf8b40089326b9e928d4b4d54051d8b104224de6..12b987f4af09950d272d00784bcaf4bc0dcebb09 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // Name   : ExchangeAPI_Import.cpp
 // Purpose: 
 //
@@ -62,11 +64,13 @@ void ExchangeAPI_Import::dump(ModelHighAPI_Dumper& theDumper) const
   // 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));
     }
   }
index 7f55c7342470159db302555996d9c71e1f768134..dd6a3d014af56f92397631fe44e3b73d9a5370e4 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // Name   : ExchangeAPI_Import.h
 // Purpose: 
 //
@@ -36,7 +38,8 @@ public:
   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
index 14311b75c0b5c98e0f209c5a0af4ddb09e862cbb..2c031fb4f211001454cfb7ee8f1af8e1d632dabb 100644 (file)
@@ -55,18 +55,27 @@ ExchangePlugin_ExportFeature::~ExchangePlugin_ExportFeature()
  */
 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)
@@ -227,7 +236,8 @@ void ExchangePlugin_ExportFeature::exportXAO(const std::string& theFileName)
       // 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);
     }
index 4107115ce918ce816768289e9e340a3442d3bf73..70bab6e93944316af75e56853536b65dbce28718 100644 (file)
@@ -52,8 +52,11 @@ ExchangePlugin_ImportFeature::~ExchangePlugin_ImportFeature()
  */
 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(