mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 12:43:43 +00:00
OCCT: avoid using deprecated Triangles method
Deprecated since OCCT 7.6.0
This commit is contained in:
@@ -187,12 +187,11 @@ void ifcopenshell::geom::open_cascade_shape::triangulate(ifcopenshell::geom::set
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const NCollection_Array1<Poly_Triangle>& triangles = tri->Triangles();
|
for (int i = 1; i <= tri->NbTriangles(); ++i) {
|
||||||
for (int i = 1; i <= triangles.Length(); ++i) {
|
|
||||||
int n1, n2, n3;
|
int n1, n2, n3;
|
||||||
if (face.Orientation() == TopAbs_REVERSED)
|
if (face.Orientation() == TopAbs_REVERSED)
|
||||||
triangles(i).Get(n3, n2, n1);
|
tri->Triangle(i).Get(n3, n2, n1);
|
||||||
else triangles(i).Get(n1, n2, n3);
|
else tri->Triangle(i).Get(n1, n2, n3);
|
||||||
|
|
||||||
if (dict[n1] == dict[n2] || dict[n2] == dict[n3] || dict[n3] == dict[n1]) {
|
if (dict[n1] == dict[n2] || dict[n2] == dict[n3] || dict[n3] == dict[n1]) {
|
||||||
logger.warning("GEO", 185, "Mesher generated a degenerate triangle, ignoring");
|
logger.warning("GEO", 185, "Mesher generated a degenerate triangle, ignoring");
|
||||||
@@ -656,14 +655,13 @@ namespace {
|
|||||||
coords.push_back(tri->Node(i).Transformed(loc).XYZ());
|
coords.push_back(tri->Node(i).Transformed(loc).XYZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
const NCollection_Array1<Poly_Triangle>& triangles = tri->Triangles();
|
for (int i = 1; i <= tri->NbTriangles(); ++i) {
|
||||||
for (int i = 1; i <= triangles.Length(); ++i) {
|
|
||||||
int n1, n2, n3;
|
int n1, n2, n3;
|
||||||
|
|
||||||
if (face.Orientation() == TopAbs_REVERSED) {
|
if (face.Orientation() == TopAbs_REVERSED) {
|
||||||
triangles(i).Get(n3, n2, n1);
|
tri->Triangle(i).Get(n3, n2, n1);
|
||||||
} else {
|
} else {
|
||||||
triangles(i).Get(n1, n2, n3);
|
tri->Triangle(i).Get(n1, n2, n3);
|
||||||
}
|
}
|
||||||
|
|
||||||
const gp_XYZ& pt1 = coords[n1 - 1];
|
const gp_XYZ& pt1 = coords[n1 - 1];
|
||||||
|
|||||||
@@ -812,10 +812,9 @@ express::base POSTFIX_SCHEMA(tesselate)(ifcopenshell::file& f, const TopoDS_Shap
|
|||||||
cpnt.setCoordinates(xyz);
|
cpnt.setCoordinates(xyz);
|
||||||
vertices.push_back(cpnt);
|
vertices.push_back(cpnt);
|
||||||
}
|
}
|
||||||
const NCollection_Array1<Poly_Triangle>& triangles = tri->Triangles();
|
for (int i = 1; i <= tri->NbTriangles(); ++i) {
|
||||||
for (int i = 1; i <= triangles.Length(); ++i) {
|
|
||||||
int n1, n2, n3;
|
int n1, n2, n3;
|
||||||
triangles(i).Get(n1, n2, n3);
|
tri->Triangle(i).Get(n1, n2, n3);
|
||||||
std::vector<IfcSchema::IfcCartesianPoint> points {
|
std::vector<IfcSchema::IfcCartesianPoint> points {
|
||||||
vertices[n1 - 1], vertices[n2 - 1], vertices[n3 - 1]
|
vertices[n1 - 1], vertices[n2 - 1], vertices[n3 - 1]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user