mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 12:26:26 +00:00
Add support for IfcAnnotationFillArea. See #1291.
This commit is contained in:
committed by
Thomas Krijnen
parent
38a0c71060
commit
b60ce80eb4
@@ -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)) {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user