// Exports the whole configuration as one fused part to an IGES file void CTiglExportIges::ExportFusedIGES(const std::string& filename) { if (filename.empty()) { LOG(ERROR) << "Error: Empty filename in ExportFusedIGES."; return; } PTiglFusePlane fuser = _config.AircraftFusingAlgo(); fuser->SetResultMode(HALF_PLANE_TRIMMED_FF); assert(fuser); PNamedShape fusedAirplane = fuser->FusedPlane(); PNamedShape farField = fuser->FarField(); if (!fusedAirplane) { throw CTiglError("Error computing fused airplane.", TIGL_NULL_POINTER); } try { ListPNamedShape l; l.push_back(fusedAirplane); l.push_back(farField); // add intersections const ListPNamedShape& ints = fuser->Intersections(); ListPNamedShape::const_iterator it; for (it = ints.begin(); it != ints.end(); ++it) { l.push_back(*it); } ExportShapes(l, filename); } catch (CTiglError&) { throw CTiglError("Cannot export fused Airplane as IGES", TIGL_ERROR); } }
void CTiglExportBrep::AddFusedConfiguration(CCPACSConfiguration& config) { PTiglFusePlane fuser = config.AircraftFusingAlgo(); fuser->SetResultMode(HALF_PLANE_TRIMMED_FF); assert(fuser); PNamedShape fusedAirplane = fuser->FusedPlane(); PNamedShape farField = fuser->FarField(); if (!fusedAirplane) { throw CTiglError("Error computing fused airplane.", TIGL_NULL_POINTER); } AddShape(fusedAirplane); AddShape(farField); // add intersections const ListPNamedShape& ints = fuser->Intersections(); ListPNamedShape::const_iterator it; for (it = ints.begin(); it != ints.end(); ++it) { AddShape(*it); } }