How to get OdBrBrep from manifold_solid_brep instance of STEP?

  1. FAQ
  2. »
  3. STEP

 Here is sample code to get OdBrBrep from manifold_solid_brep. Code:

#include "Entities/StepGeometricRepresentationItemMD.h"  
...
  OdDAIObjectId idManifoldSolidBrep = pDatabase->getModel()->getEntityInstance((OdUInt64)440); // Get manifold_solid_brep, here it is taken by handle for "known" instance.
  OdDAI::OdCompoundPtr compound = pDatabase->getCompound(idManifoldSolidBrep); // Get compound that composes geometry for it.
  OdStep::OdStepGeometricRepresentationItemMDPtr representationItem = compound; // Convert into RepresentationItemMD
  OdStep::OdStepModelerGeometryPtr modeler = representationItem->getModeler(); // Get modeler.
  const OdBrBrep &brBrep = modeler->bodyContainer().brBrep(); // And finally access OdBrBrep.