Add support for IfcAnnotationFillArea. See #1291.

This commit is contained in:
Dion Moult
2021-09-22 17:54:08 +10:00
committed by Thomas Krijnen
parent 38a0c71060
commit b60ce80eb4
2 changed files with 32 additions and 2 deletions
+30 -1
View File
@@ -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
#endif
+2 -1
View File
@@ -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);
CLASS(IfcPlane,gp_Pln);