mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 11:53:44 +00:00
Fix #5763 use OuterWire
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Wire.hxx>
|
#include <TopoDS_Wire.hxx>
|
||||||
#include <BRepMesh_IncrementalMesh.hxx>
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
|
#include <BRepTools.hxx>
|
||||||
|
|
||||||
#include "../../../ifcparse/macros.h"
|
#include "../../../ifcparse/macros.h"
|
||||||
#include "../../../ifcparse/IfcParse.h"
|
#include "../../../ifcparse/IfcParse.h"
|
||||||
@@ -529,13 +530,14 @@ int convert_to_ifc(const TopoDS_Face& f, IfcSchema::IfcFace*& face, bool advance
|
|||||||
TopExp_Explorer exp(f, TopAbs_WIRE);
|
TopExp_Explorer exp(f, TopAbs_WIRE);
|
||||||
IfcSchema::IfcFaceBound::list::ptr bounds(new IfcSchema::IfcFaceBound::list);
|
IfcSchema::IfcFaceBound::list::ptr bounds(new IfcSchema::IfcFaceBound::list);
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
auto outer = BRepTools::OuterWire(f);
|
||||||
for (; exp.More(); exp.Next(), ++index) {
|
for (; exp.More(); exp.Next(), ++index) {
|
||||||
IfcSchema::IfcLoop* loop;
|
IfcSchema::IfcLoop* loop;
|
||||||
if (!convert_to_ifc(TopoDS::Wire(exp.Current()), loop, advanced)) {
|
if (!convert_to_ifc(TopoDS::Wire(exp.Current()), loop, advanced)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
IfcSchema::IfcFaceBound* bnd;
|
IfcSchema::IfcFaceBound* bnd;
|
||||||
if (index == 0) {
|
if (outer == f) {
|
||||||
bnd = new IfcSchema::IfcFaceOuterBound(loop, true);
|
bnd = new IfcSchema::IfcFaceOuterBound(loop, true);
|
||||||
} else {
|
} else {
|
||||||
bnd = new IfcSchema::IfcFaceBound(loop, true);
|
bnd = new IfcSchema::IfcFaceBound(loop, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user