MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / addAxisBox

Method addAxisBox

src/ifcparse/IfcHierarchyHelper.cpp:422–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420
421template <typename Schema>
422typename Schema::IfcProductDefinitionShape* IfcHierarchyHelper<Schema>::addAxisBox(double w, double d, double h, typename Schema::IfcRepresentationContext* context) {
423 typename Schema::IfcRepresentation::list::ptr reps(new typename Schema::IfcRepresentation::list);
424 typename Schema::IfcRepresentationItem::list::ptr body_items(new typename Schema::IfcRepresentationItem::list);
425 typename Schema::IfcRepresentationItem::list::ptr axis_items(new typename Schema::IfcRepresentationItem::list);
426 typename Schema::IfcShapeRepresentation* body_rep = new typename Schema::IfcShapeRepresentation(
427 context ? context : getRepresentationContext("Model"), std::string("Body"), std::string("SweptSolid"), body_items);
428
429 typename Schema::IfcShapeRepresentation* axis_rep = new typename Schema::IfcShapeRepresentation(
430 context ? context : getRepresentationContext("Plan"), std::string("Axis"), std::string("Curve2D"), axis_items);
431
432 reps->push(axis_rep);
433 reps->push(body_rep);
434
435 typename Schema::IfcProductDefinitionShape* shape = new typename Schema::IfcProductDefinitionShape(boost::none, boost::none, reps);
436 addEntity(shape);
437 addEntity(body_rep);
438 addBox(body_rep, w, d, h, 0, 0, 0, context);
439 addEntity(axis_rep);
440 addAxis(axis_rep, w);
441
442 return shape;
443}
444
445template <typename Schema>
446void IfcHierarchyHelper<Schema>::clipRepresentation(typename Schema::IfcProductRepresentation* shape,

Callers 1

mainFunction · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected