mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Merge branch 'master' into v0.6.0
This commit is contained in:
@@ -234,11 +234,10 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) {
|
|||||||
process_wire:
|
process_wire:
|
||||||
|
|
||||||
if (face_surface.IsNull()) {
|
if (face_surface.IsNull()) {
|
||||||
if (count(wire, TopAbs_EDGE) > 128) {
|
gp_Pln 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?
|
||||||
gp_Pln pln;
|
|
||||||
approximate_plane_through_wire(wire, pln);
|
|
||||||
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);
|
||||||
@@ -261,7 +260,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) {
|
|||||||
|
|
||||||
// In case of (non-planar) face surface, p-curves need to be computed.
|
// In case of (non-planar) face surface, p-curves need to be computed.
|
||||||
// For planar faces, Open Cascade generates p-curves on the fly.
|
// For planar faces, Open Cascade generates p-curves on the fly.
|
||||||
if (!face_surface.IsNull()) {
|
if (!face_surface.IsNull() && face_surface->DynamicType() != STANDARD_TYPE(Geom_Plane)) {
|
||||||
TopExp_Explorer exp(outer_face_bound, TopAbs_EDGE);
|
TopExp_Explorer exp(outer_face_bound, TopAbs_EDGE);
|
||||||
for (; exp.More(); exp.Next()) {
|
for (; exp.More(); exp.Next()) {
|
||||||
const TopoDS_Edge& edge = TopoDS::Edge(exp.Current());
|
const TopoDS_Edge& edge = TopoDS::Edge(exp.Current());
|
||||||
|
|||||||
@@ -3381,7 +3381,7 @@ bool IfcGeom::Kernel::wire_intersections(const TopoDS_Wire& wire, TopTools_ListO
|
|||||||
TopoDS_Edge e = wd->Edge(k + 1);
|
TopoDS_Edge e = wd->Edge(k + 1);
|
||||||
|
|
||||||
TopoDS_Vertex v1, v2;
|
TopoDS_Vertex v1, v2;
|
||||||
TopExp::Vertices(e, v1, v2);
|
TopExp::Vertices(e, v1, v2, true);
|
||||||
const TopoDS_Vertex* v = first == forward ? &v2 : &v1;
|
const TopoDS_Vertex* v = first == forward ? &v2 : &v1;
|
||||||
|
|
||||||
// gp_Pnt p2 = points3d.Value(1);
|
// gp_Pnt p2 = points3d.Value(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user