mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Add revolve as top-level item in occt kernel
This commit is contained in:
@@ -391,6 +391,31 @@ bool IfcGeom::OpenCascadeKernel::convert_openings(const IfcUtil::IfcBaseEntity*
|
||||
return true;
|
||||
}
|
||||
|
||||
#include <BRepPrimAPI_MakeRevol.hxx>
|
||||
|
||||
bool IfcGeom::OpenCascadeKernel::convert_impl(const taxonomy::revolve::ptr r, IfcGeom::ConversionResults& results) {
|
||||
|
||||
|
||||
gp_Ax1 ax(
|
||||
convert_xyz<gp_Pnt>(*r->axis_origin),
|
||||
convert_xyz<gp_Dir>(*r->direction));
|
||||
|
||||
TopoDS_Shape face;
|
||||
if (!convert(taxonomy::cast<taxonomy::face>(r->basis), face)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TopoDS_Shape shape = BRepPrimAPI_MakeRevol(face, ax);
|
||||
|
||||
results.emplace_back(ConversionResult(
|
||||
r->instance->data().id(),
|
||||
r->matrix,
|
||||
new OpenCascadeShape(shape),
|
||||
r->surface_style
|
||||
));
|
||||
return true;
|
||||
}
|
||||
|
||||
// IfcSchema::IfcRelVoidsElement::list::ptr IfcGeom::Kernel::find_openings(IfcSchema::IfcProduct* product) {
|
||||
// std::vector<IfcSchema::IfcRelVoidsElement*> rs;
|
||||
//
|
||||
|
||||
@@ -143,6 +143,7 @@ public:
|
||||
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::solid::ptr, IfcGeom::ConversionResults&);
|
||||
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::shell::ptr, IfcGeom::ConversionResults&);
|
||||
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::extrusion::ptr, IfcGeom::ConversionResults&);
|
||||
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::revolve::ptr, IfcGeom::ConversionResults&);
|
||||
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::boolean_result::ptr, IfcGeom::ConversionResults&);
|
||||
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::loft::ptr, IfcGeom::ConversionResults&);
|
||||
virtual bool convert_impl(const ifcopenshell::geometry::taxonomy::sweep_along_curve::ptr, IfcGeom::ConversionResults&);
|
||||
|
||||
Reference in New Issue
Block a user