From 8f1c05afbf0da9d72ba1640b83ee0abc2a4f1a7a Mon Sep 17 00:00:00 2001 From: Sven Goldberg Date: Tue, 26 Nov 2024 13:15:42 +0100 Subject: [PATCH 1/6] Throw error when sections are added in segments containing gc The CPACS creator currently allows adding sections in segments (or at their boundaries) when they contain guide curves. However this leads to crashes or undefined behaviour. As it might be hard to discuss reasonable behaviour or predict what the user wants in complex examples, we do not allow this right now. (At least partly) fixes issue #626 --- src/fuselage/CCPACSFuselage.cpp | 32 +++++++++++++++++++++++++++++ src/wing/CCPACSWing.cpp | 32 +++++++++++++++++++++++++++++ tests/unittests/creatorFuselage.cpp | 10 +++++++++ tests/unittests/creatorWing.cpp | 11 ++++++++++ 4 files changed, 85 insertions(+) diff --git a/src/fuselage/CCPACSFuselage.cpp b/src/fuselage/CCPACSFuselage.cpp index ccb402776..ff79d874c 100644 --- a/src/fuselage/CCPACSFuselage.cpp +++ b/src/fuselage/CCPACSFuselage.cpp @@ -748,6 +748,10 @@ void CCPACSFuselage::SetFuselageHelper(CTiglFuselageHelper& cache) const void CCPACSFuselage::CreateNewConnectedElementBetween(std::string startElementUID, std::string endElementUID) { + if(GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetGuideCurves()) + { + throw tigl::CTiglError("Adding sections in fuselage segments containing guide curves is not supported", TIGL_UID_ERROR); + } std::string segmentToSplit = GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetUID(); CTiglFuselageSectionElement* startElement = fuselageHelper->GetCTiglElementOfFuselage(startElementUID); @@ -797,6 +801,20 @@ void CCPACSFuselage::CreateNewConnectedElementAfter(std::string startElementUID) if ( elementsBefore.size() < 2) { throw CTiglError("Impossible to add a element after if there is no previous element"); } + + // Iterate over segments to find the one ending in startElementUID + // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported + for (int i=1; i <= GetSegmentCount(); i++) + { + if (GetSegment(i).GetEndSectionElementUID() == startElementUID) + { + if(GetSegment(i).GetGuideCurves()) + { + throw tigl::CTiglError("Adding sections after fuselage segments containing guide curves is not supported", TIGL_UID_ERROR); + } + } + } + std::string previousElementUID = elementsBefore[elementsBefore.size()-2]; CTiglFuselageSectionElement* previousElement = fuselageHelper->GetCTiglElementOfFuselage(previousElementUID); @@ -848,6 +866,20 @@ void CCPACSFuselage::CreateNewConnectedElementBefore(std::string startElementUID if (elementsAfter.size() < 1 ) { throw CTiglError("Impossible to add a element before if there is no previous element"); } + + // Iterate over segments to find the one starting in startElementUID + // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported + for (int i=1; i <= GetSegmentCount(); i++) + { + if (GetSegment(i).GetStartSectionElementUID() == startElementUID) + { + if(GetSegment(i).GetGuideCurves()) + { + throw tigl::CTiglError("Adding sections before fuselage segments containing guide curves is not supported", TIGL_UID_ERROR); + } + } + } + std::string previousElementUID = elementsAfter[0]; CTiglFuselageSectionElement* previousElement = fuselageHelper->GetCTiglElementOfFuselage(previousElementUID); diff --git a/src/wing/CCPACSWing.cpp b/src/wing/CCPACSWing.cpp index 575c35706..3b3c17a2d 100644 --- a/src/wing/CCPACSWing.cpp +++ b/src/wing/CCPACSWing.cpp @@ -1407,6 +1407,10 @@ void CCPACSWing::SetARKeepArea(double newAR) void CCPACSWing::CreateNewConnectedElementBetween(std::string startElementUID, std::string endElementUID) { + if(GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetGuideCurves()) + { + throw tigl::CTiglError("Adding sections in wing segments containing guide curves is not supported", TIGL_UID_ERROR); + } std::string segmentToSplit = GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetUID(); CTiglWingSectionElement *startElement = wingHelper->GetCTiglElementOfWing(startElementUID); @@ -1454,6 +1458,20 @@ void CCPACSWing::CreateNewConnectedElementAfter(std::string startElementUID) if ( elementsBefore.size() < 2) { throw CTiglError("Impossible to add a element after if there is no previous element"); } + + // Iterate over segments to find the one ending in startElementUID + // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported + for (int i=1; i <= GetSegmentCount(); i++) + { + if (GetSegment(i).GetOuterSectionElementUID() == startElementUID) + { + if(GetSegment(i).GetGuideCurves()) + { + throw tigl::CTiglError("Adding sections after wing segments containing guide curves is not supported", TIGL_UID_ERROR); + } + } + } + std::string previousElementUID = elementsBefore[elementsBefore.size()-2]; CTiglWingSectionElement* previousElement = wingHelper->GetCTiglElementOfWing(previousElementUID); @@ -1506,6 +1524,20 @@ void CCPACSWing::CreateNewConnectedElementBefore(std::string startElementUID) if (elementsAfter.size() < 1 ) { throw CTiglError("Impossible to add a element before if there is no previous element"); } + + // Iterate over segments to find the one starting in startElementUID + // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported + for (int i=1; i <= GetSegmentCount(); i++) + { + if (GetSegment(i).GetInnerSectionElementUID() == startElementUID) + { + if(GetSegment(i).GetGuideCurves()) + { + throw tigl::CTiglError("Adding sections before wing segments containing guide curves is not supported", TIGL_UID_ERROR); + } + } + } + std::string previousElementUID = elementsAfter[0]; CTiglWingSectionElement* previousElement = wingHelper->GetCTiglElementOfWing(previousElementUID); diff --git a/tests/unittests/creatorFuselage.cpp b/tests/unittests/creatorFuselage.cpp index c3c8fba67..b7e2d3a84 100644 --- a/tests/unittests/creatorFuselage.cpp +++ b/tests/unittests/creatorFuselage.cpp @@ -330,6 +330,16 @@ TEST_F(creatorFuselage, setRotation_MultipleFuselagesModel) } +TEST_F(creatorFuselage, createSection_FuselageSegmentGuideCurves) +{ + + setVariables("TestData/simple_test_guide_curves.xml", "Fuselage"); + + EXPECT_THROW(fuselage->CreateNewConnectedElementBefore("GuideCurveModel_Fuselage_Sec1_El1"), tigl::CTiglError); + EXPECT_THROW(fuselage->CreateNewConnectedElementBetween("GuideCurveModel_Fuselage_Sec1_El1", "GuideCurveModel_Fuselage_Sec2_El1"), tigl::CTiglError); + EXPECT_THROW(fuselage->CreateNewConnectedElementAfter("GuideCurveModel_Fuselage_Sec3_El1"), tigl::CTiglError); +} + TEST_F(creatorFuselage, createSection_MultipleFuselageModel) { diff --git a/tests/unittests/creatorWing.cpp b/tests/unittests/creatorWing.cpp index 43095e283..bb7df66b2 100644 --- a/tests/unittests/creatorWing.cpp +++ b/tests/unittests/creatorWing.cpp @@ -998,6 +998,17 @@ TEST_F(creatorWing, MultipleWings_SetARKeepArea) { } +TEST_F(creatorWing, createSection_WingSegmentGuideCurves) +{ + + setVariables("TestData/simple_test_guide_curves.xml", "Wing"); + + EXPECT_THROW(wing->CreateNewConnectedElementBefore("GuideCurveModel_Wing_Sec1_El1"), tigl::CTiglError); + EXPECT_THROW(wing->CreateNewConnectedElementBetween("GuideCurveModel_Wing_Sec1_El1", "GuideCurveModel_Wing_Sec2_El1"), tigl::CTiglError); + EXPECT_THROW(wing->CreateNewConnectedElementAfter("GuideCurveModel_Wing_Sec4_El1"), tigl::CTiglError); +} + + TEST_F(creatorWing, MultipleWings_CreateSections) { setVariables("TestData/multiple_wings.xml", "Wing"); From ee2bd0d0f3e1a63bfe013c4c56c1233bb93d2988 Mon Sep 17 00:00:00 2001 From: Sven Goldberg Date: Tue, 26 Nov 2024 13:52:06 +0100 Subject: [PATCH 2/6] Formulate error message more verbose --- src/fuselage/CCPACSFuselage.cpp | 9 ++++++--- src/wing/CCPACSWing.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/fuselage/CCPACSFuselage.cpp b/src/fuselage/CCPACSFuselage.cpp index ff79d874c..1cc835371 100644 --- a/src/fuselage/CCPACSFuselage.cpp +++ b/src/fuselage/CCPACSFuselage.cpp @@ -750,7 +750,8 @@ void CCPACSFuselage::CreateNewConnectedElementBetween(std::string startElementUI { if(GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetGuideCurves()) { - throw tigl::CTiglError("Adding sections in fuselage segments containing guide curves is not supported", TIGL_UID_ERROR); + throw tigl::CTiglError("Adding sections in fuselage segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); } std::string segmentToSplit = GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetUID(); @@ -810,7 +811,8 @@ void CCPACSFuselage::CreateNewConnectedElementAfter(std::string startElementUID) { if(GetSegment(i).GetGuideCurves()) { - throw tigl::CTiglError("Adding sections after fuselage segments containing guide curves is not supported", TIGL_UID_ERROR); + throw tigl::CTiglError("Adding sections after fuselage segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); } } } @@ -875,7 +877,8 @@ void CCPACSFuselage::CreateNewConnectedElementBefore(std::string startElementUID { if(GetSegment(i).GetGuideCurves()) { - throw tigl::CTiglError("Adding sections before fuselage segments containing guide curves is not supported", TIGL_UID_ERROR); + throw tigl::CTiglError("Adding sections before fuselage segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); } } } diff --git a/src/wing/CCPACSWing.cpp b/src/wing/CCPACSWing.cpp index 3b3c17a2d..88a7d2b93 100644 --- a/src/wing/CCPACSWing.cpp +++ b/src/wing/CCPACSWing.cpp @@ -1409,7 +1409,8 @@ void CCPACSWing::CreateNewConnectedElementBetween(std::string startElementUID, s { if(GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetGuideCurves()) { - throw tigl::CTiglError("Adding sections in wing segments containing guide curves is not supported", TIGL_UID_ERROR); + throw tigl::CTiglError("Adding sections in wing segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); } std::string segmentToSplit = GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetUID(); @@ -1467,7 +1468,8 @@ void CCPACSWing::CreateNewConnectedElementAfter(std::string startElementUID) { if(GetSegment(i).GetGuideCurves()) { - throw tigl::CTiglError("Adding sections after wing segments containing guide curves is not supported", TIGL_UID_ERROR); + throw tigl::CTiglError("Adding sections after wing segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); } } } @@ -1533,7 +1535,8 @@ void CCPACSWing::CreateNewConnectedElementBefore(std::string startElementUID) { if(GetSegment(i).GetGuideCurves()) { - throw tigl::CTiglError("Adding sections before wing segments containing guide curves is not supported", TIGL_UID_ERROR); + throw tigl::CTiglError("Adding sections before wing segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); } } } From c43564782094216d2e14b025c952de167b3191c7 Mon Sep 17 00:00:00 2001 From: merakulix Date: Tue, 26 Nov 2024 13:52:55 +0100 Subject: [PATCH 3/6] add includes for CCPACSWalls --- bindings/python_internal/configuration.i | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bindings/python_internal/configuration.i b/bindings/python_internal/configuration.i index d7049d34a..b438b9e08 100644 --- a/bindings/python_internal/configuration.i +++ b/bindings/python_internal/configuration.i @@ -40,7 +40,9 @@ #include "CCPACSExternalObject.h" #include "CTiglShapeCache.h" #include "CTiglError.h" +#include "CCPACSWalls.h" #include "CCPACSWallPosition.h" +#include "CCPACSFuselageWallSegment.h" #include "CCPACSWingSegment.h" #include "CCPACSFuselageSegment.h" #include "CTiglWingConnection.h" @@ -87,6 +89,7 @@ #include "generated/CPACSBoundingElementUIDs.h" #include "generated/CPACSStructuralWallElement.h" #include "generated/CPACSStructuralWallElements.h" +#include "generated/CPACSWalls.h" #include "generated/CPACSWallPositionUIDs.h" #include "generated/CPACSWallPosition.h" #include "generated/CPACSWallPositions.h" @@ -177,7 +180,6 @@ %include "generated/CPACSLateralCap_placement.h" %boost_optional(tigl::generated::CPACSLateralCap) %include "generated/CPACSLateralCap.h" - %boost_optional(tigl::generated::CPACSBoundingElementUIDs) %include "generated/CPACSBoundingElementUIDs.h" %include "generated/CPACSStructuralWallElement.h" @@ -187,8 +189,14 @@ %include "generated/CPACSWallPositions.h" %include "generated/CPACSWallSegment.h" %include "generated/CPACSWallSegments.h" +%boost_optional(tigl::CCPACSWalls) %boost_optional(tigl::generated::CPACSWalls) +%boost_optional(tigl::CCPACSWallPosition) +%boost_optional(tigl::CCPACSFuselageWallSegment) %include "generated/CPACSWalls.h" +%include "CCPACSWalls.h" +%include "CCPACSWallPosition.h" +%include "CCPACSFuselageWallSegment.h" // ----------------- Engines ---------------------------// %boost_optional(tigl::CCPACSEngines) @@ -516,6 +524,7 @@ class CCPACSWingRibsPositioning; %factory(tigl::ITiglGeometricComponent& tigl::CTiglUIDManager::GetGeometricComponent, tigl::CCPACSFuselage, tigl::CCPACSFuselageSegment, + tigl::CCPACSFuselageWallSegment, tigl::CCPACSWing, tigl::CCPACSWingSegment, tigl::CCPACSWingComponentSegment, From 0c6165c47093a654daabf1c5fa3f96876ed7390c Mon Sep 17 00:00:00 2001 From: merakulix Date: Thu, 28 Nov 2024 10:16:20 +0100 Subject: [PATCH 4/6] add missing macros --- src/structural_elements/CCPACSFuselageWallSegment.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/structural_elements/CCPACSFuselageWallSegment.h b/src/structural_elements/CCPACSFuselageWallSegment.h index 9c0b6961c..8cf8bdbee 100644 --- a/src/structural_elements/CCPACSFuselageWallSegment.h +++ b/src/structural_elements/CCPACSFuselageWallSegment.h @@ -36,22 +36,22 @@ class CCPACSFuselageWallSegment : public generated::CPACSWallSegment, public CTi public: TIGL_EXPORT CCPACSFuselageWallSegment(CCPACSWallSegments* parent, CTiglUIDManager* uidMgr); - std::string GetDefaultedUID() const override + TIGL_EXPORT std::string GetDefaultedUID() const override { return GetUID().value_or("UnknownWallSegment"); } - TiglGeometricComponentIntent GetComponentIntent() const override + TIGL_EXPORT TiglGeometricComponentIntent GetComponentIntent() const override { return TIGL_INTENT_INNER_STRUCTURE | TIGL_INTENT_PHYSICAL; } - TiglGeometricComponentType GetComponentType() const override + TIGL_EXPORT TiglGeometricComponentType GetComponentType() const override { return TIGL_COMPONENT_FUSELAGE_WALL; } - TopoDS_Compound GetCutPlanes() const; + TIGL_EXPORT TopoDS_Compound GetCutPlanes() const; TIGL_EXPORT void SetPhi(const double& value) override; TIGL_EXPORT void SetDoubleSidedExtrusion(const boost::optional& value) override; From bc1edbfaff2bc4f6319ce506711acbd7a6ff3436 Mon Sep 17 00:00:00 2001 From: merakulix Date: Thu, 28 Nov 2024 11:00:22 +0100 Subject: [PATCH 5/6] add missing macros --- src/structural_elements/CCPACSWalls.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/structural_elements/CCPACSWalls.h b/src/structural_elements/CCPACSWalls.h index 8f685b579..533591776 100644 --- a/src/structural_elements/CCPACSWalls.h +++ b/src/structural_elements/CCPACSWalls.h @@ -32,12 +32,12 @@ namespace tigl class CCPACSWalls : public generated::CPACSWalls { public: - CCPACSWalls(CCPACSFuselageStructure* parent, CTiglUIDManager* uidMgr); + TIGL_EXPORT CCPACSWalls(CCPACSFuselageStructure* parent, CTiglUIDManager* uidMgr); - const CCPACSFuselageWallSegment& GetWallSegment(const std::string& uid) const; - const CCPACSWallPosition& GetWallPosition(const std::string& uid) const; + TIGL_EXPORT const CCPACSFuselageWallSegment& GetWallSegment(const std::string& uid) const; + TIGL_EXPORT const CCPACSWallPosition& GetWallPosition(const std::string& uid) const; - void Invalidate(const boost::optional& source = boost::none) const; + TIGL_EXPORT void Invalidate(const boost::optional& source = boost::none) const; }; } // namespace tigl From 2466e1d47cd6c1bca2e27027c55d8af82f51d795 Mon Sep 17 00:00:00 2001 From: Sven Goldberg Date: Fri, 29 Nov 2024 14:40:51 +0100 Subject: [PATCH 6/6] Change error type and flatten logic to detect error when added section touches GC segments --- src/fuselage/CCPACSFuselage.cpp | 20 +++++++------------- src/wing/CCPACSWing.cpp | 20 +++++++------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/src/fuselage/CCPACSFuselage.cpp b/src/fuselage/CCPACSFuselage.cpp index 1cc835371..0cd041882 100644 --- a/src/fuselage/CCPACSFuselage.cpp +++ b/src/fuselage/CCPACSFuselage.cpp @@ -751,7 +751,7 @@ void CCPACSFuselage::CreateNewConnectedElementBetween(std::string startElementUI if(GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetGuideCurves()) { throw tigl::CTiglError("Adding sections in fuselage segments containing guide curves is currently not supported.\n" - "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_ERROR); } std::string segmentToSplit = GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetUID(); @@ -807,13 +807,10 @@ void CCPACSFuselage::CreateNewConnectedElementAfter(std::string startElementUID) // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported for (int i=1; i <= GetSegmentCount(); i++) { - if (GetSegment(i).GetEndSectionElementUID() == startElementUID) + if(GetSegment(i).GetGuideCurves()) { - if(GetSegment(i).GetGuideCurves()) - { - throw tigl::CTiglError("Adding sections after fuselage segments containing guide curves is currently not supported.\n" - "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); - } + throw tigl::CTiglError("Adding sections after fuselage segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_ERROR); } } @@ -873,13 +870,10 @@ void CCPACSFuselage::CreateNewConnectedElementBefore(std::string startElementUID // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported for (int i=1; i <= GetSegmentCount(); i++) { - if (GetSegment(i).GetStartSectionElementUID() == startElementUID) + if(GetSegment(i).GetGuideCurves()) { - if(GetSegment(i).GetGuideCurves()) - { - throw tigl::CTiglError("Adding sections before fuselage segments containing guide curves is currently not supported.\n" - "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); - } + throw tigl::CTiglError("Adding sections before fuselage segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_ERROR); } } diff --git a/src/wing/CCPACSWing.cpp b/src/wing/CCPACSWing.cpp index 88a7d2b93..0867f0331 100644 --- a/src/wing/CCPACSWing.cpp +++ b/src/wing/CCPACSWing.cpp @@ -1410,7 +1410,7 @@ void CCPACSWing::CreateNewConnectedElementBetween(std::string startElementUID, s if(GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetGuideCurves()) { throw tigl::CTiglError("Adding sections in wing segments containing guide curves is currently not supported.\n" - "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_ERROR); } std::string segmentToSplit = GetSegments().GetSegmentFromTo(startElementUID, endElementUID).GetUID(); @@ -1464,13 +1464,10 @@ void CCPACSWing::CreateNewConnectedElementAfter(std::string startElementUID) // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported for (int i=1; i <= GetSegmentCount(); i++) { - if (GetSegment(i).GetOuterSectionElementUID() == startElementUID) + if(GetSegment(i).GetGuideCurves()) { - if(GetSegment(i).GetGuideCurves()) - { - throw tigl::CTiglError("Adding sections after wing segments containing guide curves is currently not supported.\n" - "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); - } + throw tigl::CTiglError("Adding sections after wing segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_ERROR); } } @@ -1531,13 +1528,10 @@ void CCPACSWing::CreateNewConnectedElementBefore(std::string startElementUID) // If the corresponding segment contains guide curves -> Throw error, since adding elements after gc-segments is not supported for (int i=1; i <= GetSegmentCount(); i++) { - if (GetSegment(i).GetInnerSectionElementUID() == startElementUID) + if(GetSegment(i).GetGuideCurves()) { - if(GetSegment(i).GetGuideCurves()) - { - throw tigl::CTiglError("Adding sections before wing segments containing guide curves is currently not supported.\n" - "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_UID_ERROR); - } + throw tigl::CTiglError("Adding sections before wing segments containing guide curves is currently not supported.\n" + "In general, guide curves should only be added when all sections are already defined, since the guide curves depend on them.", TIGL_ERROR); } }