Use snake case conversion result APIs

Generated with the assistance of an AI coding tool.
This commit is contained in:
Thomas Krijnen
2026-08-08 16:09:30 +02:00
parent 2ba55ba984
commit 99a09a2a3c
26 changed files with 101 additions and 101 deletions
@@ -364,7 +364,7 @@ void ifcopenshell::geom::cgal_shape::to_nef() const {
}
#endif
void ifcopenshell::geom::cgal_shape::Triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger) const {
void ifcopenshell::geom::cgal_shape::triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger) const {
if (is_point() || is_wire()) {
return;
}
@@ -458,7 +458,7 @@ void ifcopenshell::geom::cgal_shape::Triangulate(ifcopenshell::geom::settings se
// std::map<cgal_vertex_descriptor, kernel_::Vector_3> vertex_normals;
// boost::associative_property_map<std::map<cgal_vertex_descriptor, kernel_::Vector_3>> vertex_normals_map(vertex_normals);
// Triangulate the shape and compute the normals
// triangulate the shape and compute the normals
std::map<facet_const_handle, kernel_::Vector_3> face_normals;
boost::associative_property_map<std::map<facet_const_handle, kernel_::Vector_3>> face_normals_map(face_normals);
@@ -586,7 +586,7 @@ void ifcopenshell::geom::cgal_shape::Triangulate(ifcopenshell::geom::settings se
}
void ifcopenshell::geom::cgal_shape::Serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string& r) const {
void ifcopenshell::geom::cgal_shape::serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string& r) const {
std::stringstream sstream;
if (is_point()) {
auto p = point();
@@ -1035,11 +1035,11 @@ bool ifcopenshell::geom::cgal_shape::surface_area_along_direction(double tol, co
#ifndef IFOPSH_SIMPLE_KERNEL
void ifcopenshell::geom::cgal_shape_half_space_decomposition::Triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger) const {
void ifcopenshell::geom::cgal_shape_half_space_decomposition::triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger) const {
throw std::runtime_error("Not implemented");
}
void ifcopenshell::geom::cgal_shape_half_space_decomposition::Serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string& r) const {
void ifcopenshell::geom::cgal_shape_half_space_decomposition::serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string& r) const {
throw std::runtime_error("Not implemented");
}
@@ -226,8 +226,8 @@ namespace ifcopenshell { namespace geom {
const cgal_point& point() const { return std::get<cgal_point>(*shape_); }
const cgal_wire& wire() const { return std::get<cgal_wire>(*shape_); }
virtual void Triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger = ifcopenshell::logger::root()) const;
virtual void Serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string&) const;
virtual void triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger = ifcopenshell::logger::root()) const;
virtual void serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string&) const;
virtual ifcopenshell::geom::conversion_result_shape* clone() const {
if (shape_) {
@@ -319,8 +319,8 @@ namespace ifcopenshell { namespace geom {
#endif
}
virtual void Triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger = ifcopenshell::logger::root()) const;
virtual void Serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string&) const;
virtual void triangulate(ifcopenshell::geom::settings settings, const ifcopenshell::geom::taxonomy::matrix4& place, ifcopenshell::geom::triangulation* t, int item_id, int surface_style_id, ifcopenshell::logger& logger = ifcopenshell::logger::root()) const;
virtual void serialize(const ifcopenshell::geom::taxonomy::matrix4& place, std::string&) const;
virtual int surface_genus() const;
virtual bool is_manifold() const;
+8 -8
View File
@@ -912,8 +912,8 @@ bool ifcopenshell::geom::kernels::cgal_kernel::convert_openings(const express::b
std::list<CGAL::Nef_polyhedron_3<kernel_>> first_operands_nef, second_operands_nef;
for (auto& shp : entity_shapes) {
cgal_polyhedron entity_shape = *std::static_pointer_cast<cgal_shape>(shp.Shape());
const auto& m = shp.Placement()->ccomponents();
cgal_polyhedron entity_shape = *std::static_pointer_cast<cgal_shape>(shp.shape());
const auto& m = shp.placement()->ccomponents();
if (!m.isIdentity()) {
cgal_placement trsf;
convert_placement(m, trsf);
@@ -943,9 +943,9 @@ bool ifcopenshell::geom::kernels::cgal_kernel::convert_openings(const express::b
abstract_kernel::convert(op.first, opening_shapes);
for (unsigned int i = 0; i < opening_shapes.size(); ++i) {
cgal_polyhedron entity_shape_unlocated = *std::static_pointer_cast<cgal_shape>(opening_shapes[i].Shape());
cgal_polyhedron entity_shape_unlocated = *std::static_pointer_cast<cgal_shape>(opening_shapes[i].shape());
cgal_polyhedron entity_shape(entity_shape_unlocated);
auto gtrsf = opening_shapes[i].Placement();
auto gtrsf = opening_shapes[i].placement();
// @todo check
Eigen::Matrix4d m = opening_trsf.ccomponents() * gtrsf->ccomponents();
if (!m.isIdentity()) {
@@ -1008,7 +1008,7 @@ bool ifcopenshell::geom::kernels::cgal_kernel::convert_openings(const express::b
return false;
}
cut_shapes.push_back(ifcopenshell::geom::conversion_result(it->ItemId(), new cgal_shape(a_poly), it->StylePtr()));
cut_shapes.push_back(ifcopenshell::geom::conversion_result(it->ItemId(), new cgal_shape(a_poly), it->style_ptr()));
it++;
nit++;
}
@@ -2068,11 +2068,11 @@ bool cgal_kernel::convert_impl(const taxonomy::boolean_result::ptr br, std::vect
}
for (auto it = cr.begin(); it != cr.end(); ++it) {
cgal_polyhedron entity_shape_unlocated = *std::static_pointer_cast<cgal_shape>(it->Shape());
cgal_polyhedron entity_shape_unlocated = *std::static_pointer_cast<cgal_shape>(it->shape());
cgal_polyhedron entity_shape(entity_shape_unlocated);
if (!it->Placement()->is_identity()) {
if (!it->placement()->is_identity()) {
cgal_placement trsf;
convert_placement(it->Placement(), trsf);
convert_placement(it->placement(), trsf);
for (auto &vertex : vertices(entity_shape)) {
vertex->point() = vertex->point().transform(trsf);
}