mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
Skeleton for IfcEdgeLoop and IfcOrientedEdge
This commit is contained in:
@@ -56,6 +56,8 @@ FACE(IfcRoundedRectangleProfileDef);
|
|||||||
FACE(IfcTrapeziumProfileDef);
|
FACE(IfcTrapeziumProfileDef);
|
||||||
FACE(IfcEllipseProfileDef);
|
FACE(IfcEllipseProfileDef);
|
||||||
|
|
||||||
|
WIRE(IfcEdgeLoop);
|
||||||
|
WIRE(IfcOrientedEdge);
|
||||||
WIRE(IfcPolyLoop);
|
WIRE(IfcPolyLoop);
|
||||||
WIRE(IfcPolyline);
|
WIRE(IfcPolyline);
|
||||||
|
|
||||||
|
|||||||
@@ -59,3 +59,29 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcPolyline* l, cgal_wire_t&
|
|||||||
result = polygon;
|
result = polygon;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcEdgeLoop* l, cgal_wire_t& result) {
|
||||||
|
IfcSchema::IfcOrientedEdge::list::ptr li = l->EdgeList();
|
||||||
|
cgal_wire_t mw;
|
||||||
|
for (IfcSchema::IfcOrientedEdge::list::it it = li->begin(); it != li->end(); ++it) {
|
||||||
|
cgal_wire_t w;
|
||||||
|
if (convert_wire(*it, w)) {
|
||||||
|
// TODO: What to do here?
|
||||||
|
// mw.Add(TopoDS::Edge(TopoDS_Iterator(w).Value()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = mw;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcOrientedEdge* l, cgal_wire_t& result) {
|
||||||
|
if (convert_wire(l->EdgeElement(), result)) {
|
||||||
|
if (!l->Orientation()) {
|
||||||
|
std::reverse(result.begin(),result.end());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user