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

Method addAxis

src/ifcparse/IfcHierarchyHelper.cpp:387–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385
386template <typename Schema>
387void IfcHierarchyHelper<Schema>::addAxis(typename Schema::IfcShapeRepresentation* rep, double l, typename Schema::IfcRepresentationContext* /*context*/) {
388 typename Schema::IfcCartesianPoint* p1 = addDoublet<typename Schema::IfcCartesianPoint>(-l / 2., 0.);
389 typename Schema::IfcCartesianPoint* p2 = addDoublet<typename Schema::IfcCartesianPoint>(+l / 2., 0.);
390 typename Schema::IfcCartesianPoint::list::ptr pts(new typename Schema::IfcCartesianPoint::list);
391 pts->push(p1);
392 pts->push(p2);
393 typename Schema::IfcPolyline* poly = new typename Schema::IfcPolyline(pts);
394 addEntity(poly);
395
396 typename Schema::IfcRepresentationItem::list::ptr items = rep->Items();
397 items->push(poly);
398 rep->setItems(items);
399}
400
401template <typename Schema>
402typename Schema::IfcProductDefinitionShape* IfcHierarchyHelper<Schema>::addBox(double w,

Callers 1

mainFunction · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected