From 766f6d810b4472a17a33492a5086dbf9348a7a17 Mon Sep 17 00:00:00 2001 From: mzn Date: Fri, 20 Jul 2018 14:39:20 +0300 Subject: [PATCH] Issue #2560: Fix Python dump, fix indentation. --- src/BuildAPI/BuildAPI_Interpolation.cpp | 13 ++++++++----- src/BuildPlugin/CMakeLists.txt | 14 +++++++------- src/GeomAPI/CMakeLists.txt | 4 ++-- src/GeomAlgoAPI/CMakeLists.txt | 4 ++-- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/BuildAPI/BuildAPI_Interpolation.cpp b/src/BuildAPI/BuildAPI_Interpolation.cpp index 201151d82..6333fa0ae 100644 --- a/src/BuildAPI/BuildAPI_Interpolation.cpp +++ b/src/BuildAPI/BuildAPI_Interpolation.cpp @@ -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 << ", "; } diff --git a/src/BuildPlugin/CMakeLists.txt b/src/BuildPlugin/CMakeLists.txt index 9668399c7..d99d69f68 100644 --- a/src/BuildPlugin/CMakeLists.txt +++ b/src/BuildPlugin/CMakeLists.txt @@ -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 diff --git a/src/GeomAPI/CMakeLists.txt b/src/GeomAPI/CMakeLists.txt index 7cc297767..01594414d 100644 --- a/src/GeomAPI/CMakeLists.txt +++ b/src/GeomAPI/CMakeLists.txt @@ -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 diff --git a/src/GeomAlgoAPI/CMakeLists.txt b/src/GeomAlgoAPI/CMakeLists.txt index 5fc7a5479..f24b06d69 100644 --- a/src/GeomAlgoAPI/CMakeLists.txt +++ b/src/GeomAlgoAPI/CMakeLists.txt @@ -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 -- 2.39.2