diff --git a/src/ifcgeom/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp index 687d2e1bf4..d18c16a629 100644 --- a/src/ifcgeom/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -455,6 +455,35 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcArbitraryClosedProfileDef* l, return success; } +bool IfcGeom::Kernel::convert(const IfcSchema::IfcAnnotationFillArea* l, TopoDS_Shape& face) { + TopoDS_Wire outer_boundary; + if (!convert_wire(l->OuterBoundary(), outer_boundary)) { + return false; + } + + assert_closed_wire(outer_boundary); + + BRepBuilderAPI_MakeFace mf(outer_boundary); + + if (l->InnerBoundaries()) { + IfcSchema::IfcCurve::list::ptr inner_boundaries = *l->InnerBoundaries(); + + for(IfcSchema::IfcCurve::list::it it = inner_boundaries->begin(); it != inner_boundaries->end(); ++it) { + TopoDS_Wire hole; + if (convert_wire(*it, hole)) { + assert_closed_wire(hole); + mf.Add(hole); + } + } + } + + ShapeFix_Shape sfs(mf.Face()); + sfs.Perform(); + face = sfs.Shape(); + + return true; +} + bool IfcGeom::Kernel::convert(const IfcSchema::IfcArbitraryProfileDefWithVoids* l, TopoDS_Shape& face) { TopoDS_Wire profile; if (!convert_wire(l->OuterCurve(), profile)) { @@ -1252,4 +1281,4 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBSplineSurfaceWithKnots* l, To return true; } -#endif \ No newline at end of file +#endif diff --git a/src/ifcgeom/IfcRegister.h b/src/ifcgeom/IfcRegister.h index 1f9f195ec6..ab48b7b875 100644 --- a/src/ifcgeom/IfcRegister.h +++ b/src/ifcgeom/IfcRegister.h @@ -98,6 +98,7 @@ SHAPE(IfcRectangularTrimmedSurface); SHAPE(IfcSurfaceCurveSweptAreaSolid); SHAPE(IfcSweptDiskSolid); +FACE(IfcAnnotationFillArea); FACE(IfcArbitraryProfileDefWithVoids); FACE(IfcArbitraryClosedProfileDef); FACE(IfcRoundedRectangleProfileDef); @@ -161,4 +162,4 @@ CLASS(IfcCartesianTransformationOperator2D,gp_Trsf2d); CLASS(IfcCartesianTransformationOperator3D,gp_Trsf); CLASS(IfcObjectPlacement,gp_Trsf); CLASS(IfcVector,gp_Vec); -CLASS(IfcPlane,gp_Pln); \ No newline at end of file +CLASS(IfcPlane,gp_Pln);