mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
OCC - version compatibility fixes
This commit is contained in:
parent
69f6a9cc90
commit
36a7b24315
@ -223,15 +223,15 @@ DLL_HEADER void ExportNgOCC(py::module &m)
|
||||
normals.reserve(normals.size() + triangulation->NbTriangles()*3*3);
|
||||
for (int j = 1; j < triangulation->NbTriangles()+1; j++)
|
||||
{
|
||||
auto triangle = (triangulation->Triangles())(j);
|
||||
auto triangle = triangulation->Triangle(j);
|
||||
for (int k = 1; k < 4; k++)
|
||||
p[k-1] = (triangulation->Nodes())(triangle(k)).Transformed(loc);
|
||||
p[k-1] = triangulation->Node(triangle(k)).Transformed(loc);
|
||||
for (int k = 1; k < 4; k++)
|
||||
{
|
||||
vertices.insert(vertices.end(),{float(p[k-1].X()), float(p[k-1].Y()), float(p[k-1].Z())});
|
||||
trigs.insert(trigs.end(),{count, count+1, count+2,i});
|
||||
count += 3;
|
||||
uv = (triangulation->UVNodes())(triangle(k));
|
||||
uv = triangulation->UVNode(triangle(k));
|
||||
prop.SetParameters(uv.X(), uv.Y());
|
||||
if (prop.IsNormalDefined())
|
||||
n = prop.Normal();
|
||||
|
@ -463,11 +463,14 @@ namespace netgen
|
||||
glBegin (GL_LINE_STRIP);
|
||||
for (int j = 1; j <= nbnodes; j++)
|
||||
{
|
||||
/*
|
||||
#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5
|
||||
gp_Pnt p = T -> Node(aEdgePoly->Node(j)).Transformed(aEdgeLoc);
|
||||
gp_Pnt p = T -> Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc);
|
||||
#else
|
||||
gp_Pnt p = T -> Nodes()(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc);
|
||||
#endif
|
||||
*/
|
||||
gp_Pnt p = T -> Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc);
|
||||
glVertex3f (p.X(), p.Y(), p.Z());
|
||||
}
|
||||
glEnd ();
|
||||
@ -514,11 +517,14 @@ namespace netgen
|
||||
glBegin (GL_LINE_STRIP);
|
||||
for (int j = 1; j <= nbnodes; j++)
|
||||
{
|
||||
/*
|
||||
#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5
|
||||
gp_Pnt p = T -> Node(aEdgePoly->Node(j)).Transformed(aEdgeLoc);
|
||||
#else
|
||||
gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc);
|
||||
#endif
|
||||
*/
|
||||
gp_Pnt p = T -> Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc);
|
||||
glVertex3f (p.X(), p.Y(), p.Z());
|
||||
}
|
||||
glEnd ();
|
||||
@ -593,11 +599,14 @@ namespace netgen
|
||||
int ntriangles = triangulation -> NbTriangles();
|
||||
for (int j = 1; j <= ntriangles; j++)
|
||||
{
|
||||
/*
|
||||
#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5
|
||||
Poly_Triangle triangle = triangulation -> Triangle(j);
|
||||
#else
|
||||
Poly_Triangle triangle = triangulation -> Triangles()(j);
|
||||
#endif
|
||||
*/
|
||||
Poly_Triangle triangle = triangulation -> Triangle(j);
|
||||
|
||||
gp_Pnt p[3];
|
||||
for (int k = 1; k <= 3; k++)
|
||||
|
Loading…
Reference in New Issue
Block a user