From 6e057567dcc1ef71cbebd0486bc501f459bb5cf7 Mon Sep 17 00:00:00 2001 From: RSM92 Date: Wed, 13 Nov 2024 21:48:09 +0100 Subject: [PATCH] Replaced deprecated method Replaced deprecated method --- src/Tesselator/ShapeTesselator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tesselator/ShapeTesselator.cpp b/src/Tesselator/ShapeTesselator.cpp index 5795e7925..f6673a53e 100644 --- a/src/Tesselator/ShapeTesselator.cpp +++ b/src/Tesselator/ShapeTesselator.cpp @@ -158,11 +158,11 @@ void ShapeTesselator::Tesselate(bool compute_edges, float mesh_quality, bool par //write triangle buffer TopAbs_Orientation orient = myFace.Orientation(); - const Poly_Array1OfTriangle& triangles = myT->Triangles(); - this_face->tri_indexes = new int[triangles.Length()* 3]; - for (Standard_Integer nt = 1; nt <= myT->NbTriangles(); nt++) { + const Standard_Integer trianglesNb = myT->NbTriangles(); + this_face->tri_indexes = new int[trianglesNb * 3]; + for (Standard_Integer nt = 1; nt <= trianglesNb; nt++) { Standard_Integer n0 , n1 , n2; - triangles(nt).Get(n0, n1, n2); + myT->Triangle(nt).Get(n0, n1, n2); if (orient == TopAbs_REVERSED) { Standard_Integer tmp=n1; n1 = n2;