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
+29
View File
@@ -455,6 +455,35 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcArbitraryClosedProfileDef* l,
return success; 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) { bool IfcGeom::Kernel::convert(const IfcSchema::IfcArbitraryProfileDefWithVoids* l, TopoDS_Shape& face) {
TopoDS_Wire profile; TopoDS_Wire profile;
if (!convert_wire(l->OuterCurve(), profile)) { if (!convert_wire(l->OuterCurve(), profile)) {
+1
View File
@@ -98,6 +98,7 @@ SHAPE(IfcRectangularTrimmedSurface);
SHAPE(IfcSurfaceCurveSweptAreaSolid); SHAPE(IfcSurfaceCurveSweptAreaSolid);
SHAPE(IfcSweptDiskSolid); SHAPE(IfcSweptDiskSolid);
FACE(IfcAnnotationFillArea);
FACE(IfcArbitraryProfileDefWithVoids); FACE(IfcArbitraryProfileDefWithVoids);
FACE(IfcArbitraryClosedProfileDef); FACE(IfcArbitraryClosedProfileDef);
FACE(IfcRoundedRectangleProfileDef); FACE(IfcRoundedRectangleProfileDef);