]> 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 15:37:43 +0000 (18:37 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 9 Nov 2016 15:37:43 +0000 (18:37 +0300)
13 files changed:
cpplint.cfg
src/BuildAPI/BuildAPI_Edge.h
src/BuildAPI/BuildAPI_Face.h
src/BuildAPI/BuildAPI_Shell.h
src/BuildAPI/BuildAPI_SubShapes.h
src/BuildAPI/BuildAPI_Vertex.h
src/BuildAPI/BuildAPI_Wire.h
src/BuildPlugin/BuildPlugin_Face.cpp
src/BuildPlugin/BuildPlugin_Shell.cpp
src/BuildPlugin/BuildPlugin_SubShapes.cpp
src/BuildPlugin/BuildPlugin_Validators.cpp
src/BuildPlugin/BuildPlugin_Validators.h
src/BuildPlugin/BuildPlugin_Wire.cpp

index f90ce424508e5f65d1bd85bf13ccb1c87c18b330..cc3f964d72514e910c98fc026956f0cc5fbd96e2 100644 (file)
@@ -1,3 +1,4 @@
 linelength=100
-filter=-whitespace,+whitespace/line_length,-readability,-build,-runtime
+filter=-whitespace,+whitespace/end_of_line,-readability,-build,-runtime
 root=src
+#+whitespace/line_length
index 2d9fe087ed9c27d7a1574650e8a3b11d8e4347c1..91b6329f97b9678293958715ffc5d1770dc1a1d3 100644 (file)
@@ -36,7 +36,8 @@ public:
   virtual ~BuildAPI_Edge();
 
   INTERFACE_1(BuildPlugin_Edge::ID(),
-              baseObjects, BuildPlugin_Edge::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+              baseObjects, BuildPlugin_Edge::BASE_OBJECTS_ID(),
+              ModelAPI_AttributeSelectionList, /** Base objects */)
 
   /// Modify base attribute of the feature.
   BUILDAPI_EXPORT
index 997499bbba16116bc5a373bd74c8d85709910b3a..c614eb411379fc0c71c15f5585d2a0deab54f1a5 100644 (file)
@@ -36,7 +36,8 @@ public:
   virtual ~BuildAPI_Face();
 
   INTERFACE_1(BuildPlugin_Face::ID(),
-              baseObjects, BuildPlugin_Face::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+              baseObjects, BuildPlugin_Face::BASE_OBJECTS_ID(), 
+              ModelAPI_AttributeSelectionList, /** Base objects */)
 
   /// Modify base attribute of the feature.
   BUILDAPI_EXPORT
index 0e6338842a62b0f60c26c185f1b08468e5547467..a0fcecc3f94ade55fdc53fb6e617e09849a74026 100644 (file)
@@ -36,7 +36,8 @@ public:
   virtual ~BuildAPI_Shell();
 
   INTERFACE_1(BuildPlugin_Shell::ID(),
-              baseObjects, BuildPlugin_Shell::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+              baseObjects, BuildPlugin_Shell::BASE_OBJECTS_ID(),
+              ModelAPI_AttributeSelectionList, /** Base objects */)
 
   /// Modify base attribute of the feature.
   BUILDAPI_EXPORT
index 492df6fdc4ed4ab4521e590b6b271b7fc27b6ee2..8871a7e3f82e03e16fc3c6fed571dcb36a1ece96 100644 (file)
@@ -37,8 +37,10 @@ public:
   virtual ~BuildAPI_SubShapes();
 
   INTERFACE_2(BuildPlugin_SubShapes::ID(),
-              baseShape, BuildPlugin_SubShapes::BASE_SHAPE_ID(), ModelAPI_AttributeSelection, /** Base shape */,
-              subShapes, BuildPlugin_SubShapes::SUBSHAPES_ID(), ModelAPI_AttributeSelectionList, /** Sub-shapes */)
+              baseShape, BuildPlugin_SubShapes::BASE_SHAPE_ID(),
+              ModelAPI_AttributeSelection, /** Base shape */,
+              subShapes, BuildPlugin_SubShapes::SUBSHAPES_ID(),
+              ModelAPI_AttributeSelectionList, /** Sub-shapes */)
 
   /// Modify base attribute of the feature.
   BUILDAPI_EXPORT
index d4dc4b8c58fdce40458a5016e5e19dadcd9f6c97..f14e87897da720c324d43572d43150c1141158be 100644 (file)
@@ -36,7 +36,8 @@ public:
   virtual ~BuildAPI_Vertex();
 
   INTERFACE_1(BuildPlugin_Vertex::ID(),
-              baseObjects, BuildPlugin_Vertex::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+              baseObjects, BuildPlugin_Vertex::BASE_OBJECTS_ID(), 
+              ModelAPI_AttributeSelectionList, /** Base objects */)
 
   /// Modify base attribute of the feature.
   BUILDAPI_EXPORT
index 68430929e0f3ce028d82f3725dd6c4696a424013..b86b7e653087382cf49730cc20f54b9ef7a3caab 100644 (file)
@@ -36,7 +36,8 @@ public:
   virtual ~BuildAPI_Wire();
 
   INTERFACE_1(BuildPlugin_Wire::ID(),
-              baseObjects, BuildPlugin_Wire::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+              baseObjects, BuildPlugin_Wire::BASE_OBJECTS_ID(),
+              ModelAPI_AttributeSelectionList, /** Base objects */)
 
   /// Modify base attribute of the feature.
   BUILDAPI_EXPORT
index 0f20802984fbce5120440875cb13457065ee4f32..774cfdf39787a3745719e15fd8cca67d90e8f009 100644 (file)
@@ -79,7 +79,8 @@ void BuildPlugin_Face::execute()
 
   // Get faces.
   ListOfShape aFaces;
-  GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(), aPln->direction(), anEdges, aFaces);
+  GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(),
+                                         aPln->direction(), anEdges, aFaces);
 
   // Get wires from faces.
   ListOfShape aWires;
@@ -111,7 +112,8 @@ void BuildPlugin_Face::execute()
       for(ListOfShape::const_iterator anIt = anEdges.cbegin(); anIt != anEdges.cend(); ++anIt) {
         std::shared_ptr<GeomAPI_Edge> anEdgeInList(new GeomAPI_Edge(*anIt));
         if(anEdgeInList->isEqual(anEdgeInResult)) {
-          aResultBody->modified(anEdgeInList, anEdgeInResult, "Edge_" + std::to_string((long long)anEdgeIndex), anEdgeIndex);
+          aResultBody->modified(anEdgeInList, anEdgeInResult,
+                                "Edge_" + std::to_string((long long)anEdgeIndex), anEdgeIndex);
           ++anEdgeIndex;
           break;
         }
index 3575c48b50525b0bc74866851d5bf44312065c72..b90e749459d9728d538d5ed02fbee2f6cd39d41f 100644 (file)
@@ -72,7 +72,8 @@ void BuildPlugin_Shell::execute()
     ResultBodyPtr aResultBody = document()->createBody(data(), anIndex);
     aResultBody->store(aShell);
     for(ListOfShape::const_iterator anIt = aShapes.cbegin(); anIt != aShapes.cend(); ++anIt) {
-      for(GeomAPI_ShapeExplorer aFaceExp(*anIt, GeomAPI_Shape::FACE); aFaceExp.more(); aFaceExp.next()) {
+      for(GeomAPI_ShapeExplorer 
+          aFaceExp(*anIt, GeomAPI_Shape::FACE); aFaceExp.more(); aFaceExp.next()) {
         GeomShapePtr aFace = aFaceExp.current();
         ListOfShape aHistory;
         aSewingAlgo.modified(aFace, aHistory);
index ebbe753ba399013a53324d0db56337176fe8d58c..0eaa6a2e73bd1f02e0cf0fca94d84d51c023049b 100644 (file)
@@ -115,12 +115,13 @@ void BuildPlugin_SubShapes::execute()
   aResultBody->storeModified(aBaseShape, aResultShape);
   aResultBody->loadAndOrientModifiedShapes(&aBuilder, aBaseShape, GeomAPI_Shape::EDGE, aModEdgeTag,
                                           "Modified_Edge", *aBuilder.mapOfSubShapes().get());
-  for(ListOfShape::const_iterator anIt = aShapesToAdd.cbegin(); anIt != aShapesToAdd.cend(); ++anIt) {
+  for(ListOfShape::const_iterator
+      anIt = aShapesToAdd.cbegin(); anIt != aShapesToAdd.cend(); ++anIt) {
     GeomAPI_Shape::ShapeType aShType = (*anIt)->shapeType();
     aResultBody->loadAndOrientModifiedShapes(&aBuilder, *anIt, aShType,
-                                             aShType == GeomAPI_Shape::VERTEX ? aModVertexTag : aModEdgeTag,
-                                             aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex" : "Modified_Edge",
-                                             *aBuilder.mapOfSubShapes().get());
+                        aShType == GeomAPI_Shape::VERTEX ? aModVertexTag : aModEdgeTag,
+                        aShType == GeomAPI_Shape::VERTEX ? "Modified_Vertex" : "Modified_Edge",
+                        *aBuilder.mapOfSubShapes().get());
   }
   setResult(aResultBody);
 }
index b75c77e54577815bc538f8c895dc3b0dd0abdb90..4ff1e7dfb90d0609e3c30f05d586ee3eb64e883e 100644 (file)
@@ -32,7 +32,8 @@ bool BuildPlugin_ValidatorBaseForBuild::isValid(const AttributePtr& theAttribute
 {
   // Get base objects list.
   if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
-    std::string aMsg = "Error: BuildPlugin_ValidatorBaseForBuild does not support attribute type '%1'\nOnly '%2' is supported.";
+    std::string aMsg = "Error: BuildPlugin_ValidatorBaseForBuild does "
+                       "not support attribute type '%1'\nOnly '%2' is supported.";
     Events_InfoMessage("BuildPlugin_Validators", aMsg).
       arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
     return false;
@@ -78,14 +79,16 @@ bool BuildPlugin_ValidatorBaseForBuild::isValid(const AttributePtr& theAttribute
     }
 
     // Check that it is shape on sketch.
-    ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
+    ResultConstructionPtr aConstruction = 
+      std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if(aConstruction.get()) {
       if(aConstruction->isInfinite()) {
         theError = "Inifinte objects not acceptable.";
         return false;
       }
 
-      std::shared_ptr<GeomAPI_PlanarEdges> anEdges = std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
+      std::shared_ptr<GeomAPI_PlanarEdges> anEdges = 
+        std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
       if(anEdges.get()) {
         if(aShape->isEqual(aContextShape)) {
           // It is whole sketch.
@@ -113,7 +116,8 @@ bool BuildPlugin_ValidatorBaseForWire::isValid(const std::shared_ptr<ModelAPI_Fe
 {
   // Get attribute.
   if(theArguments.size() != 1) {
-    std::string aMsg = "Error: BuildPlugin_ValidatorBaseForWire should be used only with 1 parameter (ID of base objects list).";
+    std::string aMsg = "Error: BuildPlugin_ValidatorBaseForWire should be used only "
+                       "with 1 parameter (ID of base objects list).";
     Events_InfoMessage("BuildPlugin_Validators", aMsg).send();
     return false;
   }
@@ -147,7 +151,8 @@ bool BuildPlugin_ValidatorBaseForWire::isValid(const std::shared_ptr<ModelAPI_Fe
 }
 
 //=================================================================================================
-bool BuildPlugin_ValidatorBaseForWire::isNotObligatory(std::string theFeature, std::string theAttribute)
+bool BuildPlugin_ValidatorBaseForWire::isNotObligatory(std::string theFeature,
+                                                       std::string theAttribute)
 {
   return false;
 }
@@ -195,7 +200,8 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
     GeomShapePtr aSectedEdges = aPaveFiller.shape();
 
     int anEdgesNum = 0;
-    for(GeomAPI_ShapeExplorer anExp(aSectedEdges, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
+    for(GeomAPI_ShapeExplorer 
+        anExp(aSectedEdges, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
       anEdgesNum++;
     }
     if(anEdgesNum != anEdges.size()) {
@@ -213,7 +219,8 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
 
   // Check that selected objects have closed contours.
   ListOfShape aFaces;
-  GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(), aPln->direction(), anEdges, aFaces);
+  GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(), 
+                                         aPln->direction(), anEdges, aFaces);
   if(aFaces.empty()) {
     theError = "Selected objects does not have closed contours.";
     return false;
@@ -223,7 +230,8 @@ bool BuildPlugin_ValidatorBaseForFace::isValid(const std::shared_ptr<ModelAPI_Fe
 }
 
 //=================================================================================================
-bool BuildPlugin_ValidatorBaseForFace::isNotObligatory(std::string theFeature, std::string theAttribute)
+bool BuildPlugin_ValidatorBaseForFace::isNotObligatory(std::string theFeature, 
+                                                       std::string theAttribute)
 {
   return false;
 }
@@ -242,7 +250,8 @@ bool BuildPlugin_ValidatorSubShapesSelection::isValid(const AttributePtr& theAtt
 
   // Get base objects list.
   if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
-    std::string aMsg = "Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \""
+    std::string aMsg = 
+      "Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \""
       "%1\"\n Only \"%2\" supported.";
     Events_InfoMessage("BuildPlugin_Validators", aMsg).
       arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
index a72a882f1c6313c6f323d44c08e64cf7c82ed719..4edd43894b194f0670fb91856ade13ff632407df 100644 (file)
@@ -12,7 +12,8 @@
 
 /// \class BuildPlugin_ValidatorBaseForBuild
 /// \ingroup Validators
-/// \brief A validator for selection base shapes for build features. Allows to select shapes on sketch and
+/// \brief A validator for selection base shapes for build features. 
+/// Allows to select shapes on sketch and
 /// whole objects with allowed type.
 class BuildPlugin_ValidatorBaseForBuild: public ModelAPI_AttributeValidator
 {
index 4b7231a721a7589295d12e63f319b81d07310f3b..15a832b7d6d1a48b32fd50e7c4828a0bc785bdac 100644 (file)
@@ -122,12 +122,14 @@ bool BuildPlugin_Wire::addContour()
 
     // Check that it is edge on sketch.
     ResultPtr aContext = aSelection->context();
-    ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
+    ResultConstructionPtr aConstruction =
+      std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
     if(!aConstruction.get()) {
       continue;
     }
     GeomShapePtr aContextShape = aConstruction->shape();
-    std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges = std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
+    std::shared_ptr<GeomAPI_PlanarEdges> aPlanarEdges = 
+      std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aContextShape);
     if(!aPlanarEdges.get()) {
       continue;
     }
@@ -149,15 +151,18 @@ bool BuildPlugin_Wire::addContour()
     AttributeSelectionPtr aSelection = *aListIt;
     std::shared_ptr<GeomAPI_Edge> anEdgeInList(new GeomAPI_Edge(aSelection->value()));
 
-    ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aSelection->context());
+    ResultConstructionPtr aConstruction = 
+      std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aSelection->context());
 
     // Iterate on wires and add wire with this edge.
     std::shared_ptr<GeomAPI_Shape> aFoundWire;
     for(int anIndex = 0; anIndex < aConstruction->facesNum(); ++anIndex) {
       std::shared_ptr<GeomAPI_Face> aFace = aConstruction->face(anIndex);
-      for(GeomAPI_ShapeExplorer aWireExp(aFace, GeomAPI_Shape::WIRE); aWireExp.more(); aWireExp.next()) {
+      for(GeomAPI_ShapeExplorer 
+          aWireExp(aFace, GeomAPI_Shape::WIRE); aWireExp.more(); aWireExp.next()) {
         GeomShapePtr aWireOnFace = aWireExp.current();
-        for(GeomAPI_ShapeExplorer anExp(aWireOnFace, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
+        for(GeomAPI_ShapeExplorer 
+            anExp(aWireOnFace, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
           std::shared_ptr<GeomAPI_Edge> anEdgeOnFace(new GeomAPI_Edge(anExp.current()));
           if(anEdgeInList->isEqual(anEdgeOnFace)) {
             aFoundWire = aWireOnFace;
@@ -172,7 +177,8 @@ bool BuildPlugin_Wire::addContour()
 
     // If wire with the same edge found. Add all other edges to list.
     if(aFoundWire.get()) {
-      for(GeomAPI_ShapeExplorer anExp(aFoundWire, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
+      for(GeomAPI_ShapeExplorer 
+          anExp(aFoundWire, GeomAPI_Shape::EDGE); anExp.more(); anExp.next()) {
         std::shared_ptr<GeomAPI_Edge> anEdgeOnFace(new GeomAPI_Edge(anExp.current()));
         ListOfShape::const_iterator anEdgesIt = anAddedEdges.cbegin();
         for(; anEdgesIt != anAddedEdges.cend(); ++anEdgesIt) {