MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / createShape

Method createShape

src/Mod/Import/App/ImportOCAFAssembly.cpp:223–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223void ImportOCAFAssembly::createShape(
224 const TDF_Label& label,
225 const TopLoc_Location& loc,
226 const std::string& name
227)
228{
229 Base::Console().log("-create Shape\n");
230 const TopoDS_Shape& aShape = aShapeTool->GetShape(label);
231 if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPOUND) {
232 TopExp_Explorer xp;
233 int ctSolids = 0, ctShells = 0;
234 for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) {
235 createShape(xp.Current(), loc, name);
236 }
237 for (xp.Init(aShape, TopAbs_SHELL, TopAbs_SOLID); xp.More(); xp.Next(), ctShells++) {
238 createShape(xp.Current(), loc, name);
239 }
240 if (ctSolids > 0 || ctShells > 0) {
241 return;
242 }
243 }
244 createShape(aShape, loc, name);
245}
246
247void ImportOCAFAssembly::createShape(
248 const TopoDS_Shape& aShape,

Callers

nothing calls this directly

Calls 14

GetShapeMethod · 0.80
GetColorMethod · 0.80
applyColorsFunction · 0.70
logMethod · 0.45
IsNullMethod · 0.45
ShapeTypeMethod · 0.45
InitMethod · 0.45
MoreMethod · 0.45
NextMethod · 0.45
setValueMethod · 0.45
push_backMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected