mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 04:16:25 +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)) {
|
||||||
@@ -1252,4 +1281,4 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBSplineSurfaceWithKnots* l, To
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -161,4 +162,4 @@ CLASS(IfcCartesianTransformationOperator2D,gp_Trsf2d);
|
|||||||
CLASS(IfcCartesianTransformationOperator3D,gp_Trsf);
|
CLASS(IfcCartesianTransformationOperator3D,gp_Trsf);
|
||||||
CLASS(IfcObjectPlacement,gp_Trsf);
|
CLASS(IfcObjectPlacement,gp_Trsf);
|
||||||
CLASS(IfcVector,gp_Vec);
|
CLASS(IfcVector,gp_Vec);
|
||||||
CLASS(IfcPlane,gp_Pln);
|
CLASS(IfcPlane,gp_Pln);
|
||||||
|
|||||||
Reference in New Issue
Block a user