]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2560: Fix Python dump, fix indentation.
authormzn <mzn@opencascade.com>
Fri, 20 Jul 2018 11:39:20 +0000 (14:39 +0300)
committermzn <mzn@opencascade.com>
Fri, 20 Jul 2018 11:39:20 +0000 (14:39 +0300)
src/BuildAPI/BuildAPI_Interpolation.cpp
src/BuildPlugin/CMakeLists.txt
src/GeomAPI/CMakeLists.txt
src/GeomAlgoAPI/CMakeLists.txt

index 201151d82c8f9c86c89f900ee088949a00dc9db3..6333fa0ae6e345bf6cd8a095541c6d5993d6c7ef 100644 (file)
@@ -115,15 +115,18 @@ void BuildAPI_Interpolation::dump(ModelHighAPI_Dumper& theDumper) const
 
   AttributeSelectionListPtr anAttrBaseObjects =
     aBase->selectionList(BuildPlugin_Interpolation::BASE_OBJECTS_ID());
-  AttributeSelectionPtr anAttrStartTangent =
-    aBase->selection(BuildPlugin_Interpolation::TANGENT_START_ID());
-  AttributeSelectionPtr anAttrEndTangent =
-    aBase->selection(BuildPlugin_Interpolation::TANGENT_END_ID());
 
   theDumper << aBase << " = model.addInterpolation(" << aPartName << ", "
             << anAttrBaseObjects << ", ";
 
-  if (anAttrStartTangent->isInitialized() && anAttrEndTangent->isInitialized()) {
+  AttributeStringPtr useTangentsAttr = useTangents();
+  std::string useTangents = useTangentsAttr->value();
+  if (!useTangents.empty()) {
+    AttributeSelectionPtr anAttrStartTangent =
+      aBase->selection(BuildPlugin_Interpolation::TANGENT_START_ID());
+    AttributeSelectionPtr anAttrEndTangent =
+      aBase->selection(BuildPlugin_Interpolation::TANGENT_END_ID());
+
     theDumper << anAttrStartTangent << ", " << anAttrEndTangent << ", ";
   }
 
index 9668399c7e7d22a422ed62f5a7ca086990053d3a..d99d69f68f1a0d26372648c8174d0a180d8beaee 100644 (file)
@@ -35,8 +35,8 @@ SET(PROJECT_HEADERS
     BuildPlugin_Vertex.h
     BuildPlugin_Edge.h
     BuildPlugin_Wire.h
-       BuildPlugin_Polyline.h
-       BuildPlugin_Interpolation.h
+    BuildPlugin_Polyline.h
+    BuildPlugin_Interpolation.h
     BuildPlugin_Face.h
     BuildPlugin_Shell.h
     BuildPlugin_Solid.h
@@ -52,8 +52,8 @@ SET(PROJECT_SOURCES
     BuildPlugin_Vertex.cpp
     BuildPlugin_Edge.cpp
     BuildPlugin_Wire.cpp
-       BuildPlugin_Polyline.cpp
-       BuildPlugin_Interpolation.cpp
+    BuildPlugin_Polyline.cpp
+    BuildPlugin_Interpolation.cpp
     BuildPlugin_Face.cpp
     BuildPlugin_Shell.cpp
     BuildPlugin_Solid.cpp
@@ -69,8 +69,8 @@ SET(XML_RESOURCES
     vertex_widget.xml
     edge_widget.xml
     wire_widget.xml
-       polyline_widget.xml
-       interpolation_widget.xml
+    polyline_widget.xml
+    interpolation_widget.xml
     face_widget.xml
     shell_widget.xml
     solid_widget.xml
@@ -108,7 +108,7 @@ ADD_UNIT_TESTS(TestVertex.py
                TestEdge.py
                TestWire.py
                TestPolyline.py
-                          TestInterpolation.py
+               TestInterpolation.py
                TestFace.py
                TestShell.py
                TestSolid.py
index 7cc297767586e1fa6c14536f6478e7b804ca1eb9..01594414d72d757a34602d7ed554f58abf7c0976 100644 (file)
@@ -59,7 +59,7 @@ SET(PROJECT_HEADERS
     GeomAPI_Wire.h
     GeomAPI_Ellipse.h
     GeomAPI_Ellipse2d.h
-       GeomAPI_Tools.h
+    GeomAPI_Tools.h
 )
 
 SET(PROJECT_SOURCES
@@ -97,7 +97,7 @@ SET(PROJECT_SOURCES
     GeomAPI_Wire.cpp
     GeomAPI_Ellipse.cpp
     GeomAPI_Ellipse2d.cpp
-       GeomAPI_Tools.cpp
+    GeomAPI_Tools.cpp
 )
 
 SET(PROJECT_LIBRARIES
index 5fc7a547909b81515d445e06718717af50e3062e..f24b06d6964359864346f5aa3a0ae79d6984452b 100644 (file)
@@ -77,7 +77,7 @@ SET(PROJECT_HEADERS
     GeomAlgoAPI_Fillet.h
     GeomAlgoAPI_SortListOfShapes.h
     GeomAlgoAPI_Filling.h
-       GeomAlgoAPI_CurveBuilder.h
+    GeomAlgoAPI_CurveBuilder.h
 )
 
 SET(PROJECT_SOURCES
@@ -133,7 +133,7 @@ SET(PROJECT_SOURCES
     GeomAlgoAPI_Fillet.cpp
     GeomAlgoAPI_SortListOfShapes.cpp
     GeomAlgoAPI_Filling.cpp
-       GeomAlgoAPI_CurveBuilder.cpp
+    GeomAlgoAPI_CurveBuilder.cpp
 )
 
 SET(PROJECT_LIBRARIES