mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 03:33:48 +00:00
First slice plug-in refactor
This commit is contained in:
@@ -208,6 +208,13 @@ namespace ifcopenshell { namespace geometry {
|
||||
|
||||
operator const cgal_shape_t& () const { to_poly(); return *shape_; }
|
||||
const cgal_shape_t& poly() const { to_poly(); return *shape_; }
|
||||
virtual std::string_view backend_id() const {
|
||||
#ifdef IFOPSH_SIMPLE_KERNEL
|
||||
return "cgal-simple";
|
||||
#else
|
||||
return "cgal";
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void Triangulate(ifcopenshell::geometry::Settings settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int item_id, int surface_style_id) const;
|
||||
virtual void Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string&) const;
|
||||
@@ -284,6 +291,13 @@ namespace ifcopenshell { namespace geometry {
|
||||
shape_.reset(new halfspace_tree_plane<Kernel_>(shape));
|
||||
planes_.push_back(shape);
|
||||
}
|
||||
virtual std::string_view backend_id() const {
|
||||
#ifdef IFOPSH_SIMPLE_KERNEL
|
||||
return "cgal-simple";
|
||||
#else
|
||||
return "cgal";
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void Triangulate(ifcopenshell::geometry::Settings settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int item_id, int surface_style_id) const;
|
||||
virtual void Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string&) const;
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
|
||||
const std::vector<ManifoldPart>& parts() const { return parts_; }
|
||||
std::optional<manifold::Manifold> as_manifold() const;
|
||||
virtual std::string_view backend_id() const { return "manifold"; }
|
||||
|
||||
virtual void Triangulate(ifcopenshell::geometry::Settings settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int item_id, int surface_style_id) const;
|
||||
virtual void Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string&) const;
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace ifcopenshell {
|
||||
|
||||
const TopoDS_Shape& shape() const { return shape_; }
|
||||
operator const TopoDS_Shape& () { return shape_; }
|
||||
virtual std::string_view backend_id() const { return "opencascade"; }
|
||||
|
||||
virtual void Triangulate(ifcopenshell::geometry::Settings settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int item_id, int surface_style_id) const;
|
||||
virtual void Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string&) const;
|
||||
@@ -113,4 +114,4 @@ namespace ifcopenshell {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
explicit PassthroughShape(std::vector<PassthroughPart>&& parts);
|
||||
|
||||
const std::vector<PassthroughPart>& parts() const { return parts_; }
|
||||
virtual std::string_view backend_id() const { return "passthrough"; }
|
||||
|
||||
virtual void Triangulate(ifcopenshell::geometry::Settings settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int item_id, int surface_style_id) const;
|
||||
virtual void Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string&) const;
|
||||
|
||||
Reference in New Issue
Block a user