]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp
Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Intersection.cpp
index 16d625770ca0edaf8cef3b313b0d3b2e3b297917..55a254d73e067a24bc19145ee542533300e423b6 100644 (file)
@@ -24,8 +24,10 @@ FeaturesPlugin_Intersection::FeaturesPlugin_Intersection()
 //=================================================================================================
 void FeaturesPlugin_Intersection::initAttributes()
 {
-  data()->addAttribute(FeaturesPlugin_Intersection::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
-  data()->addAttribute(FeaturesPlugin_Intersection::TOOL_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+  data()->addAttribute(FeaturesPlugin_Intersection::OBJECT_LIST_ID(), 
+                       ModelAPI_AttributeSelectionList::typeId());
+  data()->addAttribute(FeaturesPlugin_Intersection::TOOL_LIST_ID(), 
+                       ModelAPI_AttributeSelectionList::typeId());
 }
 
 //=================================================================================================
@@ -34,9 +36,11 @@ void FeaturesPlugin_Intersection::execute()
   ListOfShape anObjects, aTools;
 
   // Getting objects.
-  AttributeSelectionListPtr anObjectsSelList = selectionList(FeaturesPlugin_Intersection::OBJECT_LIST_ID());
+  AttributeSelectionListPtr anObjectsSelList = 
+    selectionList(FeaturesPlugin_Intersection::OBJECT_LIST_ID());
   for (int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
-    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr = anObjectsSelList->value(anObjectsIndex);
+    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr = 
+      anObjectsSelList->value(anObjectsIndex);
     std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
     if (!anObject.get()) {
       return;
@@ -45,7 +49,8 @@ void FeaturesPlugin_Intersection::execute()
   }
 
   // Getting tools.
-  AttributeSelectionListPtr aToolsSelList = selectionList(FeaturesPlugin_Intersection::TOOL_LIST_ID());
+  AttributeSelectionListPtr aToolsSelList = 
+    selectionList(FeaturesPlugin_Intersection::TOOL_LIST_ID());
   for (int aToolsIndex = 0; aToolsIndex < aToolsSelList->size(); aToolsIndex++) {
     std::shared_ptr<ModelAPI_AttributeSelection> aToolAttr = aToolsSelList->value(aToolsIndex);
     std::shared_ptr<GeomAPI_Shape> aTool = aToolAttr->value();
@@ -63,7 +68,8 @@ void FeaturesPlugin_Intersection::execute()
   int aResultIndex = 0;
 
   // Create result for each object.
-  for (ListOfShape::iterator anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end(); anObjectsIt++) {
+  for (ListOfShape::iterator 
+       anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end(); anObjectsIt++) {
     std::shared_ptr<GeomAPI_Shape> anObject = *anObjectsIt;
     ListOfShape aListWithObject; aListWithObject.push_back(anObject);
     GeomAlgoAPI_Intersection anIntersectionAlgo(aListWithObject, aTools);
@@ -105,7 +111,8 @@ void FeaturesPlugin_Intersection::loadNamingDS(std::shared_ptr<ModelAPI_ResultBo
   std::shared_ptr<GeomAPI_Shape> aResultShape = theMakeShape.shape();
   std::shared_ptr<GeomAPI_DataMapOfShapeShape> aMapOfShapes = theMakeShape.mapOfSubShapes();
   const int aDeletedTag = 1;
-  const int aSubsolidsTag = 2; /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
+  /// sub solids will be placed at labels 3, 4, etc. if result is compound of solids
+  const int aSubsolidsTag = 2; 
   const int aModifyTag = 100000;
   int aModifyToolsTag = 200000;
   std::ostringstream aStream;
@@ -125,9 +132,9 @@ void FeaturesPlugin_Intersection::loadNamingDS(std::shared_ptr<ModelAPI_ResultBo
     aStream.clear();
     aStream << aModName << "_" << anIndex++;
     theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::VERTEX,
-                                               aModifyToolsTag, aStream.str(), *aMapOfShapes.get(), true);
+                                   aModifyToolsTag, aStream.str(), *aMapOfShapes.get(), true);
     theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::EDGE,
-                                               aModifyToolsTag, aStream.str(), *aMapOfShapes.get(), true);
+                                 aModifyToolsTag, aStream.str(), *aMapOfShapes.get(), true);
     theResultBody->loadDeletedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE, aDeletedTag);
     aModifyToolsTag += 10000;
   }