diff --git a/src/exports/CTiglCADExporter.cpp b/src/exports/CTiglCADExporter.cpp index b5c0e56d7..5403def14 100644 --- a/src/exports/CTiglCADExporter.cpp +++ b/src/exports/CTiglCADExporter.cpp @@ -68,22 +68,18 @@ bool CTiglCADExporter::AddConfiguration(CCPACSConfiguration& config, const Shape for (int w = 1; w <= config.GetWingCount(); w++) { CCPACSWing& wing = config.GetWing(w); - for (int i = 1; i <= wing.GetSegmentCount(); i++) { - CCPACSWingSegment& segment = (tigl::CCPACSWingSegment &) wing.GetSegment(i); - - try { - PNamedShape loft = segment.GetLoft(); - AddShape(loft, &config, options); + try { + PNamedShape loft = wing.GetLoft(); + AddShape(loft, &config, options); - if (GlobalExportOptions().Get("ApplySymmetries") && segment.GetSymmetryAxis() != TIGL_NO_SYMMETRY) { - AddShape(segment.GetMirroredLoft(), &config, options); - } - } - catch (const CTiglError& err) { - LOG(ERROR) << "Unable to export wing segment '" + segment.GetUID() << "': " << err.what(); - success = false; + if (GlobalExportOptions().Get("ApplySymmetries") && wing.GetSymmetryAxis() != TIGL_NO_SYMMETRY) { + AddShape(wing.GetMirroredLoft(), &config, options); } } + catch (const CTiglError& err) { + LOG(ERROR) << "Unable to export wing '" + wing.GetUID() << "': " << err.what(); + success = false; + } } if (config.GetEnginePylons()) { @@ -138,21 +134,18 @@ bool CTiglCADExporter::AddConfiguration(CCPACSConfiguration& config, const Shape for (int f = 1; f <= config.GetFuselageCount(); f++) { CCPACSFuselage& fuselage = config.GetFuselage(f); - for (int i = 1; i <= fuselage.GetSegmentCount(); i++) { - CCPACSFuselageSegment& segment = (tigl::CCPACSFuselageSegment &) fuselage.GetSegment(i); - try { - PNamedShape loft = segment.GetLoft(); - AddShape(loft, &config, options); + try { + PNamedShape loft = fuselage.GetLoft(); + AddShape(loft, &config, options); - if (GlobalExportOptions().Get("ApplySymmetries") && segment.GetSymmetryAxis() != TIGL_NO_SYMMETRY) { - AddShape(segment.GetMirroredLoft(), &config, options); - } - } - catch (const CTiglError& err) { - LOG(ERROR) << "Unable to fuselage segment '" + segment.GetUID() << "': " << err.what(); - success = false; + if (GlobalExportOptions().Get("ApplySymmetries") && fuselage.GetSymmetryAxis() != TIGL_NO_SYMMETRY) { + AddShape(fuselage.GetMirroredLoft(), &config, options); } } + catch (const CTiglError& err) { + LOG(ERROR) << "Unable to fuselage '" + fuselage.GetUID() << "': " << err.what(); + success = false; + } } // Export external objects