Implement edge as top-level representation item #4924

This commit is contained in:
Thomas Krijnen
2024-06-28 16:19:30 +02:00
parent fecca6a8b2
commit e96b4c11a2
2 changed files with 14 additions and 0 deletions
@@ -136,6 +136,7 @@ public:
bool convert(const ifcopenshell::geometry::taxonomy::loft::ptr, TopoDS_Shape&);
bool convert(const ifcopenshell::geometry::taxonomy::bspline_surface::ptr bs, Handle(Geom_Surface) surf);
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::edge::ptr, IfcGeom::ConversionResults&);
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::loop::ptr, IfcGeom::ConversionResults&);
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::face::ptr, IfcGeom::ConversionResults&);
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::solid::ptr, IfcGeom::ConversionResults&);
+13
View File
@@ -365,3 +365,16 @@ bool OpenCascadeKernel::convert_impl(const taxonomy::loop::ptr loop, IfcGeom::Co
));
return true;
}
bool OpenCascadeKernel::convert_impl(const taxonomy::edge::ptr edge, IfcGeom::ConversionResults& results) {
edge->print(std::cout);
TopoDS_Wire shape = boost::get<TopoDS_Wire>(convert_curve(this, edge));
results.emplace_back(ConversionResult(
edge->instance->data().id(),
new OpenCascadeShape(shape),
edge->surface_style
));
return true;
}