1 // Copyright (C) 2014-2021 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include <ExchangePlugin_ImportFeature.h>
25 #include <Config_Common.h>
26 #include <Config_PropManager.h>
28 #include <GeomAlgoAPI_BREPImport.h>
29 #include <GeomAlgoAPI_IGESImport.h>
30 #include <GeomAlgoAPI_STEPImport.h>
31 #include <GeomAlgoAPI_Tools.h>
32 #include <GeomAlgoAPI_XAOImport.h>
34 #include <GeomAPI_Shape.h>
35 #include <GeomAPI_Face.h>
36 #include <GeomAPI_ShapeExplorer.h>
37 #include <GeomAPI_ShapeIterator.h>
39 #include <Locale_Convert.h>
41 #include <ModelAPI_AttributeRefList.h>
42 #include <ModelAPI_AttributeSelectionList.h>
43 #include <ModelAPI_AttributeString.h>
44 #include <ModelAPI_AttributeStringArray.h>
45 #include <ModelAPI_AttributeIntArray.h>
46 #include <ModelAPI_AttributeTables.h>
47 #include <ModelAPI_AttributeBoolean.h>
48 #include <ModelAPI_AttributeInteger.h>
49 #include <ModelAPI_BodyBuilder.h>
50 #include <ModelAPI_Data.h>
51 #include <ModelAPI_Document.h>
52 #include <ModelAPI_Events.h>
53 #include <ModelAPI_Object.h>
54 #include <ModelAPI_ResultBody.h>
55 #include <ModelAPI_ResultGroup.h>
56 #include <ModelAPI_Session.h>
57 #include <ModelAPI_Validator.h>
58 #include <ModelAPI_Tools.h>
60 #include <XAO_Xao.hxx>
61 #include <XAO_Group.hxx>
62 #include <XAO_Field.hxx>
63 #include <XAO_Step.hxx>
65 #include <ExchangePlugin_Tools.h>
69 ExchangePlugin_ImportFeature::ExchangePlugin_ImportFeature()
73 ExchangePlugin_ImportFeature::~ExchangePlugin_ImportFeature()
75 // TODO Auto-generated destructor stub
79 * Request for initialization of data model of the feature: adding all attributes
81 void ExchangePlugin_ImportFeature::initAttributes()
83 data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(),
84 ModelAPI_AttributeString::typeId());
85 AttributePtr aFeaturesAttribute =
86 data()->addAttribute(ExchangePlugin_ImportFeature::FEATURES_ID(),
87 ModelAPI_AttributeRefList::typeId());
88 data()->addAttribute(STEP_FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
89 data()->addAttribute(IMPORT_TYPE_ID(), ModelAPI_AttributeString::typeId());
90 data()->addAttribute(STEP_MATERIALS_ID(), ModelAPI_AttributeBoolean::typeId());
91 data()->addAttribute(STEP_COLORS_ID(), ModelAPI_AttributeBoolean::typeId());
92 data()->addAttribute(STEP_SCALE_INTER_UNITS_ID(), ModelAPI_AttributeBoolean::typeId());
94 aFeaturesAttribute->setIsArgument(false);
96 ModelAPI_Session::get()->validators()->registerNotObligatory(
97 getKind(), ExchangePlugin_ImportFeature::FEATURES_ID());
98 ModelAPI_Session::get()->validators()->registerNotObligatory(
99 getKind(), ExchangePlugin_ImportFeature::STEP_COLORS_ID());
100 ModelAPI_Session::get()->validators()->registerNotObligatory(
101 getKind(), ExchangePlugin_ImportFeature::STEP_MATERIALS_ID());
102 ModelAPI_Session::get()->validators()->registerNotObligatory(
103 getKind(), ExchangePlugin_ImportFeature::STEP_SCALE_INTER_UNITS_ID());
104 ModelAPI_Session::get()->validators()->registerNotObligatory(
105 getKind(), ExchangePlugin_ImportFeature::STEP_FILE_PATH_ID());
106 ModelAPI_Session::get()->validators()->registerNotObligatory(
107 getKind(), ExchangePlugin_ImportFeature::FILE_PATH_ID());
111 * Computes or recomputes the results
113 void ExchangePlugin_ImportFeature::execute()
115 AttributeStringPtr aImportTypeAttr = string(ExchangePlugin_ImportFeature::IMPORT_TYPE_ID());
116 std::string aFormat = aImportTypeAttr->value();
117 AttributeStringPtr aFilePathAttr;
118 if (aFormat == "STEP" || aFormat == "STP")
120 aFilePathAttr = string(ExchangePlugin_ImportFeature::STEP_FILE_PATH_ID());
122 aFilePathAttr = string(ExchangePlugin_ImportFeature::FILE_PATH_ID());
124 std::string aFilePath = aFilePathAttr->value();
125 if (aFilePath.empty()) {
126 setError("File path is empty.");
130 importFile(aFilePath);
133 std::shared_ptr<ModelAPI_ResultBody> ExchangePlugin_ImportFeature::createResultBody(
134 std::shared_ptr<GeomAPI_Shape> theGeomShape)
136 std::shared_ptr<ModelAPI_ResultBody> aResultBody = document()->createBody(data());
137 //LoadNamingDS of the imported shape
138 loadNamingDS(theGeomShape, aResultBody);
142 void ExchangePlugin_ImportFeature::importFile(const std::string& theFileName)
144 // "*.brep" -> "BREP"
145 std::string anExtension = GeomAlgoAPI_Tools::File_Tools::extension(theFileName);
147 if (anExtension == "XAO") {
148 importXAO(theFileName);
152 // Perform the import
154 std::shared_ptr<GeomAPI_Shape> aGeomShape;
156 std::map<std::wstring, std::list<std::wstring>> theMaterialShape;
158 std::string anObjectName = GeomAlgoAPI_Tools::File_Tools::name(theFileName);
159 data()->setName(Locale::Convert::toWString(anObjectName));
161 ResultBodyPtr aResult = document()->createBody(data());
163 bool anColorGroupSelected = boolean(ExchangePlugin_ImportFeature::STEP_COLORS_ID())->value();
164 bool anMaterialsGroupSelected =
165 boolean(ExchangePlugin_ImportFeature::STEP_MATERIALS_ID())->value();
167 if (anExtension == "BREP" || anExtension == "BRP") {
168 aGeomShape = BREPImport(theFileName, anExtension, anError);
169 } else if (anExtension == "STEP" || anExtension == "STP") {
170 bool anScalInterUnits =
171 boolean(ExchangePlugin_ImportFeature::STEP_SCALE_INTER_UNITS_ID())->value();
173 // Process groups/fields
174 std::shared_ptr<ModelAPI_AttributeRefList> aRefListOfGroups =
175 std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(data()->attribute(FEATURES_ID()));
177 // Remove previous groups/fields stored in RefList
178 std::list<ObjectPtr> anGroupList = aRefListOfGroups->list();
179 std::list<ObjectPtr>::iterator anGroupIt = anGroupList.begin();
180 for (; anGroupIt != anGroupList.end(); ++anGroupIt) {
181 std::shared_ptr<ModelAPI_Feature> aFeature = ModelAPI_Feature::feature(*anGroupIt);
183 document()->removeFeature(aFeature);
186 aGeomShape = STEPImportAttributs(theFileName, aResult, anScalInterUnits,
187 anMaterialsGroupSelected, anColorGroupSelected,
188 theMaterialShape, anError);
189 } else if (anExtension == "IGES" || anExtension == "IGS") {
190 aGeomShape = IGESImport(theFileName, anExtension, anError);
192 anError = "Unsupported format: " + anExtension;
195 // Check if shape is valid
196 if (!anError.empty()) {
197 setError("An error occurred while importing " + theFileName + ": " + anError);
201 // Pass the results into the model
203 loadNamingDS(aGeomShape, aResult);
205 // create color group
206 if (anColorGroupSelected)
208 setColorGroups(aResult);
211 // create Materiel group
212 if (anMaterialsGroupSelected){
213 setMaterielGroup(aResult,theMaterialShape);
217 aResult->clearShapeNameAndColor();
221 void ExchangePlugin_ImportFeature::setColorGroups(
222 std::shared_ptr<ModelAPI_ResultBody> theResultBody)
224 std::vector<int> aColor;
226 std::list<std::vector<int>> aColorsRead;
228 ModelAPI_Tools::getColor(theResultBody, aColor);
229 if (!aColor.empty() ){
230 std::wstringstream aColorName;
231 aColorName <<L"Color_"<< anIndice;
232 setColorGroup(theResultBody, aColor, aColorName.str());
234 aColorsRead.push_back(aColor);
237 std::list<ResultPtr> allRes;
238 ModelAPI_Tools::allSubs(theResultBody, allRes);
239 for(std::list<ResultPtr>::iterator aRes = allRes.begin(); aRes != allRes.end(); ++aRes) {
240 ModelAPI_Tools::getColor(*aRes, aColor);
241 if (!aColor.empty() ){
242 auto it = std::find(aColorsRead.begin(), aColorsRead.end(), aColor);
243 if ( it == aColorsRead.end() ){
244 std::wstringstream aColorName;
245 aColorName<<L"Color_"<< anIndice;
246 setColorGroup(theResultBody, aColor, aColorName.str());
248 aColorsRead.push_back(aColor);
254 void ExchangePlugin_ImportFeature::setColorGroup(
255 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
256 std::vector<int> &theColor,
257 const std::wstring& theName )
259 std::vector<int> aColor;
260 std::shared_ptr<ModelAPI_Feature> aGroupFeature = addFeature("Group");
263 aGroupFeature->data()->setName(theName);
266 AttributeSelectionListPtr aSelectionList = aGroupFeature->selectionList("group_list");
268 ModelAPI_Tools::getColor(theResultBody, aColor);
269 if (!aColor.empty()){
270 if (aColor == theColor) {
271 GeomShapePtr aShape = theResultBody->shape();
272 aSelectionList->setSelectionType(aShape->shapeTypeStr());
273 aSelectionList->append(theResultBody,aShape);
276 // add element with the same color
277 std::list<ResultPtr> allRes;
278 ModelAPI_Tools::allSubs(theResultBody, allRes);
279 for(std::list<ResultPtr>::iterator aRes = allRes.begin();
280 aRes != allRes.end(); ++aRes) {
281 ModelAPI_Tools::getColor(*aRes, aColor);
282 GeomShapePtr aShape = (*aRes)->shape();
284 if (!aColor.empty()){
285 if (aRes->get() && aColor == theColor) {
286 if (aShape->isCompound() || aShape->isCompSolid()) {
287 GeomAPI_ShapeIterator anIt(aShape);
288 for (; anIt.more(); anIt.next()) {
289 aSelectionList->setSelectionType(anIt.current()->shapeTypeStr());
290 aSelectionList->append(theResultBody,anIt.current());
293 aSelectionList->setSelectionType(aShape->shapeTypeStr());
294 aSelectionList->append(theResultBody,aShape);
300 // Create the group in the document to be able to set its color
301 ResultPtr aGroup = document()->createGroup(aGroupFeature->data());
302 aGroupFeature->setResult(aGroup);
304 ModelAPI_Tools::setColor(aGroupFeature->lastResult(),theColor);
306 if (aSelectionList->size() == 0) {
307 document()->removeFeature(aGroupFeature);
311 void ExchangePlugin_ImportFeature::setMaterielGroup(
312 std::shared_ptr<ModelAPI_ResultBody> theResultBody,
313 std::map< std::wstring,std::list<std::wstring>>& theMaterialShape)
315 std::map< std::wstring, std::list<std::wstring>>::iterator anIt;
316 for (anIt = theMaterialShape.begin(); anIt != theMaterialShape.end(); ++anIt) {
318 std::shared_ptr<ModelAPI_Feature> aGroupFeature = addFeature("Group");
320 aGroupFeature->data()->setName((*anIt).first);
323 AttributeSelectionListPtr aSelectionList = aGroupFeature->selectionList("group_list");
325 std::list<ResultPtr> allRes;
326 ModelAPI_Tools::allSubs(theResultBody, allRes);
327 for (std::list<ResultPtr>::iterator aRes = allRes.begin(); aRes != allRes.end(); ++aRes) {
329 GeomShapePtr aShape = (*aRes)->shape();
330 for (std::list<std::wstring>::iterator aResMat = anIt->second.begin();
331 aResMat != anIt->second.end(); ++aResMat) {
332 if (aRes->get() && ((*aRes)->data()->name() == (*aResMat)))
334 if (aShape->isCompound() || aShape->isCompSolid()) {
335 GeomAPI_ShapeIterator anIt(aShape);
336 for (; anIt.more(); anIt.next()) {
337 aSelectionList->setSelectionType(anIt.current()->shapeTypeStr());
338 aSelectionList->append(theResultBody,anIt.current());
341 aSelectionList->setSelectionType(aShape->shapeTypeStr());
342 aSelectionList->append(theResultBody,aShape);
348 if (aSelectionList->size() == 0){
349 document()->removeFeature(aGroupFeature);
354 void ExchangePlugin_ImportFeature::importXAO(const std::string& theFileName)
360 std::shared_ptr<GeomAPI_Shape> aGeomShape = XAOImport(theFileName, anError, &aXao);
362 if (!anError.empty()) {
363 setError("An error occurred while importing " + theFileName + ": " + anError);
367 XAO::Geometry* aXaoGeometry = aXao.getGeometry();
369 // use the geometry name or the file name for the feature
370 std::string aBodyName = aXaoGeometry->getName();
371 if (aBodyName.empty())
372 aBodyName = GeomAlgoAPI_Tools::File_Tools::name(theFileName);
373 data()->setName(Locale::Convert::toWString(aBodyName));
375 ResultBodyPtr aResultBody = createResultBody(aGeomShape);
376 setResult(aResultBody);
378 // Process groups/fields
379 std::shared_ptr<ModelAPI_AttributeRefList> aRefListOfGroups =
380 std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(data()->attribute(FEATURES_ID()));
382 // Remove previous groups/fields stored in RefList
383 std::list<ObjectPtr> anGroupList = aRefListOfGroups->list();
384 std::list<ObjectPtr>::iterator anGroupIt = anGroupList.begin();
385 for (; anGroupIt != anGroupList.end(); ++anGroupIt) {
386 std::shared_ptr<ModelAPI_Feature> aFeature = ModelAPI_Feature::feature(*anGroupIt);
388 document()->removeFeature(aFeature);
392 for (int aGroupIndex = 0; aGroupIndex < aXao.countGroups(); ++aGroupIndex) {
393 XAO::Group* aXaoGroup = aXao.getGroup(aGroupIndex);
395 std::shared_ptr<ModelAPI_Feature> aGroupFeature = addFeature("Group");
398 if (!aXaoGroup->getName().empty())
399 aGroupFeature->data()->setName(Locale::Convert::toWString(aXaoGroup->getName()));
402 AttributeSelectionListPtr aSelectionList = aGroupFeature->selectionList("group_list");
404 // conversion of dimension
405 std::string aDimensionString = XAO::XaoUtils::dimensionToString(aXaoGroup->getDimension());
406 std::string aSelectionType =
407 ExchangePlugin_Tools::xaoDimension2selectionType(aDimensionString);
409 aSelectionList->setSelectionType(aSelectionType);
410 for (int anElementIndex = 0; anElementIndex < aXaoGroup->count(); ++anElementIndex) {
411 aSelectionList->append(aResultBody, GeomShapePtr());
412 // complex conversion of element index to reference id
413 int anElementID = aXaoGroup->get(anElementIndex);
414 std::string aReferenceString =
415 aXaoGeometry->getElementReference(aXaoGroup->getDimension(), anElementID);
416 int aReferenceID = XAO::XaoUtils::stringToInt(aReferenceString);
418 aSelectionList->value(anElementIndex)->setId(aReferenceID);
422 for (int aFieldIndex = 0; aFieldIndex < aXao.countFields(); ++aFieldIndex) {
423 XAO::Field* aXaoField = aXao.getField(aFieldIndex);
425 std::shared_ptr<ModelAPI_Feature> aFieldFeature = addFeature("Field");
428 if (!aXaoField->getName().empty())
429 aFieldFeature->data()->setName(Locale::Convert::toWString(aXaoField->getName()));
432 AttributeSelectionListPtr aSelectionList = aFieldFeature->selectionList("selected");
434 // conversion of dimension
435 std::string aDimensionString = XAO::XaoUtils::dimensionToString(aXaoField->getDimension());
436 std::string aSelectionType =
437 ExchangePlugin_Tools::xaoDimension2selectionType(aDimensionString);
438 aSelectionList->setSelectionType(aSelectionType);
439 // limitation: now in XAO fields are related to everything, so, iterate all sub-shapes to fill
440 int aCountSelected = aXaoField->countElements();
441 std::list<ResultPtr>::const_iterator aResIter = results().begin();
442 for(; aResIter != results().end() && aCountSelected; aResIter++) {
443 ResultBodyPtr aBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(*aResIter);
446 // check that only results that were created before this field are used
447 FeaturePtr aResultFeature = document()->feature(aBody);
448 if (!aResultFeature.get())
450 GeomShapePtr aShape = aBody->shape();
451 if (!aShape.get() || aShape->isNull())
453 GeomAPI_ShapeExplorer anExp(aShape, GeomAPI_Shape::shapeTypeByStr(aSelectionType));
454 for(; anExp.more(); anExp.next()) {
455 aSelectionList->append(aBody, anExp.current());
457 if (aCountSelected == 0)
462 // conversion of type
463 XAO::Type aFieldType = aXaoField->getType();
464 std::string aTypeString = XAO::XaoUtils::fieldTypeToString(aFieldType);
465 ModelAPI_AttributeTables::ValueType aType =
466 ExchangePlugin_Tools::xaoType2valuesType(aTypeString);
467 // set components names
468 AttributeStringArrayPtr aComponents = aFieldFeature->stringArray("components_names");
469 aComponents->setSize(aXaoField->countComponents());
470 for(int aComp = 0; aComp < aXaoField->countComponents(); aComp++) {
471 aComponents->setValue(aComp, aXaoField->getComponentName(aComp));
474 AttributeIntArrayPtr aStamps = aFieldFeature->intArray("stamps");
475 aStamps->setSize(aXaoField->countSteps());
476 std::shared_ptr<ModelAPI_AttributeTables> aTables = aFieldFeature->tables("values");
478 aXaoField->countElements() + 1, aXaoField->countComponents(), aXaoField->countSteps());
479 aTables->setType(aType);
481 XAO::stepIterator aStepIter = aXaoField->begin();
482 for(int aStepIndex = 0; aStepIter != aXaoField->end(); aStepIter++, aStepIndex++) {
483 aStamps->setValue(aStepIndex, (*aStepIter)->getStamp());
484 for(int aRow = 1; aRow <= aXaoField->countElements(); aRow++) {
485 for(int aCol = 0; aCol < aXaoField->countComponents(); aCol++) {
486 ModelAPI_AttributeTables::Value aVal;
487 std::string aValStr = (*aStepIter)->getStringValue(aRow - 1, aCol);
489 case ModelAPI_AttributeTables::BOOLEAN:
490 aVal.myBool = aValStr == "true";
492 case ModelAPI_AttributeTables::INTEGER:
493 aVal.myInt = atoi(aValStr.c_str());
495 case ModelAPI_AttributeTables::DOUBLE:
496 aVal.myDouble = atof(aValStr.c_str());
498 case ModelAPI_AttributeTables::STRING:
499 aVal.myStr = aValStr;
502 aTables->setValue(aVal, aRow, aCol, aStepIndex);
506 // remove everything with zero-values: zeroes are treated as defaults
507 std::set<int> aRowsToRemove;
508 for(int aRow = 1; aRow < aTables->rows(); aRow++) {
510 for(int aCol = 0; aCol < aTables->columns() && isZero; aCol++) {
511 for(int aStepIndex = 0; aStepIndex != aTables->tables() && isZero; aStepIndex++) {
512 if (aTables->valueStr(aRow, aCol, aStepIndex) != aTables->valueStr(0, aCol, aStepIndex))
517 aRowsToRemove.insert(aRow - 1); // -1 to make prepared for remove from SelectionList
519 if (!aRowsToRemove.empty()) { // move usefull rows on bottom to the up of the tables
520 // number of rows passed during going through: the current rows will
521 // be moved up for this value
522 int aRemovedPassed = 0;
523 for(int aRow = 1; aRow < aTables->rows(); aRow++) {
524 if (aRowsToRemove.find(aRow - 1) != aRowsToRemove.end()) {
526 } else if (aRemovedPassed != 0) { // copy the line up
527 for(int aCol = 0; aCol < aTables->columns(); aCol++) {
528 for(int aTable = 0; aTable != aTables->tables(); aTable++) {
530 aTables->value(aRow, aCol, aTable), aRow - aRemovedPassed, aCol, aTable);
535 aTables->setSize(aTables->rows() - aRemovedPassed, aTables->columns(), aTables->tables());
536 aSelectionList->remove(aRowsToRemove); // remove also selected elements
539 // Top avoid problems in Object Browser update: issue #1647.
540 ModelAPI_EventCreator::get()->sendReordered(
541 std::dynamic_pointer_cast<ModelAPI_Feature>(aRefListOfGroups->owner()));
544 } catch (XAO::XAO_Exception& e) {
545 std::string anError = e.what();
546 setError("An error occurred while importing " + theFileName + ": " + anError);
552 //============================================================================
553 std::shared_ptr<ModelAPI_Feature> ExchangePlugin_ImportFeature::addFeature(
556 std::shared_ptr<ModelAPI_Feature> aNew = document()->addFeature(theID, false);
558 data()->reflist(FEATURES_ID())->append(aNew);
559 // set as current also after it becomes sub to set correctly enabled for other subs
560 //document()->setCurrentFeature(aNew, false);
565 void ExchangePlugin_ImportFeature::removeFeature(
566 std::shared_ptr<ModelAPI_Feature> theFeature)
568 if (!data()->isValid())
570 AttributeRefListPtr aList = reflist(FEATURES_ID());
571 aList->remove(theFeature);
575 int ExchangePlugin_ImportFeature::numberOfSubs(bool /*forTree*/) const
577 return data()->reflist(FEATURES_ID())->size(true);
580 std::shared_ptr<ModelAPI_Feature> ExchangePlugin_ImportFeature::subFeature(
581 const int theIndex, bool /*forTree*/)
583 ObjectPtr anObj = data()->reflist(FEATURES_ID())->object(theIndex, false);
584 FeaturePtr aRes = std::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
589 int ExchangePlugin_ImportFeature::subFeatureId(const int theIndex) const
591 std::shared_ptr<ModelAPI_AttributeRefList> aRefList = std::dynamic_pointer_cast<
592 ModelAPI_AttributeRefList>(data()->attribute(FEATURES_ID()));
593 std::list<ObjectPtr> aFeatures = aRefList->list();
594 std::list<ObjectPtr>::const_iterator anIt = aFeatures.begin();
595 int aResultIndex = 1; // number of the counted (created) features, started from 1
596 int aFeatureIndex = -1; // number of the not-empty features in the list
597 for (; anIt != aFeatures.end(); anIt++) {
600 if (aFeatureIndex == theIndex)
608 bool ExchangePlugin_ImportFeature::isSub(ObjectPtr theObject) const
610 // check is this feature of result
611 FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
613 return data()->reflist(FEATURES_ID())->isInList(aFeature);
617 //============================================================================
618 void ExchangePlugin_ImportFeature::loadNamingDS(
619 std::shared_ptr<GeomAPI_Shape> theGeomShape,
620 std::shared_ptr<ModelAPI_ResultBody> theResultBody)
623 theResultBody->store(theGeomShape);
624 std::string aNameMS = "Shape";
625 theResultBody->loadFirstLevel(theGeomShape, aNameMS);