IfcFaceBasedSurfaceModel

This commit is contained in:
Ken Arroyo Ohori
2017-03-06 11:28:57 -06:00
parent 1d3732aa62
commit 033a2e7482
2 changed files with 16 additions and 0 deletions
@@ -35,6 +35,7 @@ SHAPES(IfcRepresentation);
// IfcAdvancedBrepWithVoids included
SHAPES(IfcManifoldSolidBrep);
SHAPES(IfcMappedItem);
SHAPES(IfcFaceBasedSurfaceModel);
SHAPE(IfcExtrudedAreaSolid);
SHAPE(IfcConnectedFaceSet);
@@ -84,6 +84,21 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcMappedItem* l, ConversionR
return b;
}
bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcFaceBasedSurfaceModel* l, ConversionResults& shapes) {
bool part_success = false;
IfcSchema::IfcConnectedFaceSet::list::ptr facesets = l->FbsmFaces();
const SurfaceStyle* collective_style = get_style(l);
for( IfcSchema::IfcConnectedFaceSet::list::it it = facesets->begin(); it != facesets->end(); ++ it ) {
cgal_shape_t s;
const SurfaceStyle* shell_style = get_style(*it);
if (convert_shape(*it,s)) {
shapes.push_back(ConversionResult(new CgalShape(s), shell_style ? shell_style : collective_style));
part_success |= true;
}
}
return part_success;
}
bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcExtrudedAreaSolid *l, cgal_shape_t &shape) {
const double height = l->Depth() * getValue(GV_LENGTH_UNIT);
if (height < getValue(GV_PRECISION)) {