mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 11:46:33 +00:00
process IfcIndexedPolyCurve without segments #549
This commit is contained in:
@@ -873,6 +873,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcIndexedPolyCurve* l, TopoDS_Wi
|
|||||||
|
|
||||||
BRepBuilderAPI_MakeWire w;
|
BRepBuilderAPI_MakeWire w;
|
||||||
|
|
||||||
|
if(l->hasSegments()) {
|
||||||
IfcEntityList::ptr segments = l->Segments();
|
IfcEntityList::ptr segments = l->Segments();
|
||||||
for (IfcEntityList::it it = segments->begin(); it != segments->end(); ++it) {
|
for (IfcEntityList::it it = segments->begin(); it != segments->end(); ++it) {
|
||||||
IfcUtil::IfcBaseClass* segment = *it;
|
IfcUtil::IfcBaseClass* segment = *it;
|
||||||
@@ -911,6 +912,13 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcIndexedPolyCurve* l, TopoDS_Wi
|
|||||||
throw IfcParse::IfcException("Unexpected IfcIndexedPolyCurve segment of type " + IfcSchema::Type::ToString(segment->type()));
|
throw IfcParse::IfcException("Unexpected IfcIndexedPolyCurve segment of type " + IfcSchema::Type::ToString(segment->type()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
std::vector<gp_Pnt>::const_iterator previous = points.begin();
|
||||||
|
for (std::vector<gp_Pnt>::const_iterator current = previous+1; current < points.end(); ++current){
|
||||||
|
w.Add(BRepBuilderAPI_MakeEdge(*previous, *current));
|
||||||
|
previous = current;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result = w.Wire();
|
result = w.Wire();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user