mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Small changes to convert(face)
This commit is contained in:
@@ -198,6 +198,8 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) {
|
|||||||
for (; exp.More(); exp.Next(), count++) {
|
for (; exp.More(); exp.Next(), count++) {
|
||||||
if (count < 2) {
|
if (count < 2) {
|
||||||
edges[count] = TopoDS::Edge(exp.Current());
|
edges[count] = TopoDS::Edge(exp.Current());
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,8 +219,9 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gp_Pln pln;
|
gp_Pln pln;
|
||||||
approximate_plane_through_wire(wire, pln);
|
if (approximate_plane_through_wire(wire, pln)) {
|
||||||
face_surface = new Geom_Plane(pln);
|
face_surface = new Geom_Plane(pln);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,6 +241,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) {
|
|||||||
if (count(wire, TopAbs_EDGE) > 128 && approximate_plane_through_wire(wire, pln)) {
|
if (count(wire, TopAbs_EDGE) > 128 && approximate_plane_through_wire(wire, pln)) {
|
||||||
// tfk: optimization find the underlying surface ourselves since it's going
|
// tfk: optimization find the underlying surface ourselves since it's going
|
||||||
// to be planar in IFC if no explicit surface is given. Should we always do this?
|
// to be planar in IFC if no explicit surface is given. Should we always do this?
|
||||||
|
// @todo is this still relevant considering the code above
|
||||||
mf = new BRepBuilderAPI_MakeFace(pln, wire, true);
|
mf = new BRepBuilderAPI_MakeFace(pln, wire, true);
|
||||||
} else {
|
} else {
|
||||||
mf = new BRepBuilderAPI_MakeFace(wire);
|
mf = new BRepBuilderAPI_MakeFace(wire);
|
||||||
|
|||||||
Reference in New Issue
Block a user