mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Major update to halfspace algorithm, conversion result shape analysis
This commit is contained in:
@@ -39,6 +39,9 @@
|
||||
namespace ifcopenshell {
|
||||
namespace geometry {
|
||||
|
||||
using IfcGeom::OpaqueCoordinate;
|
||||
using IfcGeom::OpaqueNumber;
|
||||
|
||||
class OpenCascadeShape : public IfcGeom::ConversionResultShape {
|
||||
public:
|
||||
OpenCascadeShape(const TopoDS_Shape& shape)
|
||||
@@ -48,28 +51,51 @@ namespace ifcopenshell {
|
||||
operator const TopoDS_Shape& () { return shape_; }
|
||||
|
||||
virtual void Triangulate(const IfcGeom::IteratorSettings& settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int surface_style_id) const;
|
||||
|
||||
virtual void Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string&) const;
|
||||
|
||||
virtual IfcGeom::ConversionResultShape* clone() const {
|
||||
return new OpenCascadeShape(shape_);
|
||||
}
|
||||
|
||||
virtual bool is_manifold() const;
|
||||
|
||||
virtual double bounding_box(void*&) const {
|
||||
throw std::runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
virtual int num_vertices() const {
|
||||
throw std::runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
virtual void set_box(void*) {
|
||||
throw std::runtime_error("Not implemented");
|
||||
}
|
||||
|
||||
virtual int surface_genus() const;
|
||||
virtual bool is_manifold() const;
|
||||
|
||||
virtual int num_vertices() const;
|
||||
virtual int num_edges() const;
|
||||
virtual int num_faces() const;
|
||||
|
||||
// @todo this must be something with a virtual dtor so that we can delete it.
|
||||
virtual std::pair<OpaqueCoordinate<3>, OpaqueCoordinate<3>> bounding_box() const;
|
||||
|
||||
virtual std::shared_ptr<OpaqueNumber> length();
|
||||
virtual std::shared_ptr<OpaqueNumber> area();
|
||||
virtual std::shared_ptr<OpaqueNumber> volume();
|
||||
|
||||
virtual OpaqueCoordinate<3> position();
|
||||
virtual OpaqueCoordinate<3> axis();
|
||||
virtual OpaqueCoordinate<4> plane_equation();
|
||||
|
||||
virtual std::vector<ConversionResultShape*> convex_decomposition();
|
||||
virtual ConversionResultShape* halfspaces();
|
||||
virtual ConversionResultShape* solid();
|
||||
virtual ConversionResultShape* box();
|
||||
virtual std::vector<ConversionResultShape*> edges();
|
||||
virtual std::vector<ConversionResultShape*> facets();
|
||||
|
||||
virtual ConversionResultShape* add(ConversionResultShape*);
|
||||
virtual ConversionResultShape* subtract(ConversionResultShape*);
|
||||
virtual ConversionResultShape* intersect(ConversionResultShape*);
|
||||
|
||||
virtual void map(OpaqueCoordinate<4>& from, OpaqueCoordinate<4>& to);
|
||||
virtual ConversionResultShape* moved(ifcopenshell::geometry::taxonomy::matrix4::ptr) const;
|
||||
private:
|
||||
TopoDS_Shape shape_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user