mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 15:38:03 +00:00
Merge branch 'IfcOpenShell:v0.8.0' into v0.8.0
This commit is contained in:
@@ -18,6 +18,21 @@ using ifcopenshell::geometry::NumberEpeck;
|
|||||||
#define NumberType NumberEpeck
|
#define NumberType NumberEpeck
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef IFOPSH_SIMPLE_KERNEL
|
||||||
|
void ifcopenshell::geometry::CgalShape::to_poly() const {
|
||||||
|
if (!shape_) {
|
||||||
|
shape_.emplace();
|
||||||
|
nef_->convert_to_polyhedron(*shape_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ifcopenshell::geometry::CgalShape::to_nef() const {
|
||||||
|
if (!nef_) {
|
||||||
|
nef_ = utils::create_nef_polyhedron(*shape_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void ifcopenshell::geometry::CgalShape::Triangulate(ifcopenshell::geometry::Settings settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int surface_style_id) const {
|
void ifcopenshell::geometry::CgalShape::Triangulate(ifcopenshell::geometry::Settings settings, const ifcopenshell::geometry::taxonomy::matrix4& place, IfcGeom::Representation::Triangulation* t, int surface_style_id) const {
|
||||||
// Copy is made because triangulate_faces() obviously does not accept a const argument
|
// Copy is made because triangulate_faces() obviously does not accept a const argument
|
||||||
// ... also becuase of transforming the vertex positions, right?
|
// ... also becuase of transforming the vertex positions, right?
|
||||||
|
|||||||
@@ -182,18 +182,9 @@ namespace ifcopenshell { namespace geometry {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef IFOPSH_SIMPLE_KERNEL
|
#ifndef IFOPSH_SIMPLE_KERNEL
|
||||||
void to_poly() const {
|
void to_poly() const;
|
||||||
if (!shape_) {
|
|
||||||
shape_.emplace();
|
|
||||||
nef_->convert_to_polyhedron(*shape_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void to_nef() const {
|
void to_nef() const;
|
||||||
if (!nef_) {
|
|
||||||
nef_.emplace(*shape_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
operator const CGAL::Nef_polyhedron_3<Kernel_>& () const { to_nef(); return *nef_; }
|
operator const CGAL::Nef_polyhedron_3<Kernel_>& () const { to_nef(); return *nef_; }
|
||||||
const CGAL::Nef_polyhedron_3<Kernel_>& nef() const { to_nef(); return *nef_; }
|
const CGAL::Nef_polyhedron_3<Kernel_>& nef() const { to_nef(); return *nef_; }
|
||||||
|
|||||||
@@ -97,6 +97,12 @@ class settings_mixin:
|
|||||||
def get(self, k):
|
def get(self, k):
|
||||||
return self.get_(self.name(k))
|
return self.get_(self.name(k))
|
||||||
|
|
||||||
|
def __getattr__(self, k):
|
||||||
|
if k in map(self.rname, self.setting_names()):
|
||||||
|
return k
|
||||||
|
else:
|
||||||
|
raise AttributeError("'Settings' object has no attribute '%s'" % k)
|
||||||
|
|
||||||
|
|
||||||
class serializer_settings(settings_mixin, ifcopenshell_wrapper.SerializerSettings):
|
class serializer_settings(settings_mixin, ifcopenshell_wrapper.SerializerSettings):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user