mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
Fix for UVs in python binding #5592
This commit is contained in:
@@ -133,8 +133,8 @@ namespace IfcGeom {
|
||||
const std::vector<std::vector<std::vector<int>>>& polyhedral_faces_with_holes() const { return polyhedral_faces_with_holes_; }
|
||||
const std::vector<int>& edges() const { return edges_; }
|
||||
const std::vector<double>& normals() const { return normals_; }
|
||||
std::vector<double>& uvs() { return uvs_; }
|
||||
const std::vector<double>& uvs() const { return uvs_; }
|
||||
std::vector<double>& uvs_ref() { return uvs_; }
|
||||
const std::vector<int>& material_ids() const { return material_ids_; }
|
||||
const std::vector<ifcopenshell::geometry::taxonomy::style::ptr>& materials() const { return materials_; }
|
||||
const std::vector<int>& item_ids() const { return item_ids_; }
|
||||
|
||||
@@ -218,7 +218,7 @@ void ifcopenshell::geometry::OpenCascadeShape::Triangulate(ifcopenshell::geometr
|
||||
}
|
||||
|
||||
if (!t->normals().empty() && settings.get<settings::GenerateUvs>().get()) {
|
||||
t->uvs() = IfcGeom::Representation::Triangulation::box_project_uvs(t->verts(), t->normals());
|
||||
t->uvs_ref() = IfcGeom::Representation::Triangulation::box_project_uvs(t->verts(), t->normals());
|
||||
}
|
||||
|
||||
if (num_faces == 0) {
|
||||
|
||||
@@ -703,6 +703,7 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
verts = property(verts)
|
||||
normals = property(normals)
|
||||
item_ids = property(item_ids)
|
||||
uvs = property(uvs)
|
||||
|
||||
faces_buffer = property(faces_buffer)
|
||||
edges_buffer = property(edges_buffer)
|
||||
|
||||
Reference in New Issue
Block a user