mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix for OCCT 7.4 and older
This commit is contained in:
parent
08993ae5e2
commit
56fb4a72fc
@ -105,8 +105,8 @@ void ExtractEdgeData( const TopoDS_Edge & edge, int index, std::vector<double> *
|
||||
int nbnodes = poly -> NbNodes();
|
||||
for (int j = 1; j < nbnodes; j++)
|
||||
{
|
||||
auto p0 = occ2ng((T -> Node(poly->Node(j))).Transformed(loc));
|
||||
auto p1 = occ2ng((T -> Node(poly->Node(j+1))).Transformed(loc));
|
||||
auto p0 = occ2ng((T -> Node(poly->Nodes()(j))).Transformed(loc));
|
||||
auto p1 = occ2ng((T -> Node(poly->Nodes()(j+1))).Transformed(loc));
|
||||
for(auto k : Range(3))
|
||||
{
|
||||
p[0].push_back(p0[k]);
|
||||
|
@ -463,8 +463,11 @@ namespace netgen
|
||||
glBegin (GL_LINE_STRIP);
|
||||
for (int j = 1; j <= nbnodes; j++)
|
||||
{
|
||||
// gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc);
|
||||
gp_Pnt p = (T -> Node(aEdgePoly->Nodes()(j))).Transformed(aEdgeLoc);
|
||||
#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
|
||||
glVertex3f (p.X(), p.Y(), p.Z());
|
||||
}
|
||||
glEnd ();
|
||||
@ -511,8 +514,11 @@ namespace netgen
|
||||
glBegin (GL_LINE_STRIP);
|
||||
for (int j = 1; j <= nbnodes; j++)
|
||||
{
|
||||
// gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc);
|
||||
gp_Pnt p = (T -> Node(aEdgePoly->Node(j))).Transformed(aEdgeLoc);
|
||||
#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
|
||||
glVertex3f (p.X(), p.Y(), p.Z());
|
||||
}
|
||||
glEnd ();
|
||||
@ -587,15 +593,23 @@ namespace netgen
|
||||
int ntriangles = triangulation -> NbTriangles();
|
||||
for (int j = 1; j <= ntriangles; j++)
|
||||
{
|
||||
Poly_Triangle triangle = (triangulation -> Triangle(j));
|
||||
#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5
|
||||
Poly_Triangle triangle = triangulation -> Triangle(j);
|
||||
#else
|
||||
Poly_Triangle triangle = triangulation -> Triangles()(j);
|
||||
#endif
|
||||
|
||||
gp_Pnt p[3];
|
||||
for (int k = 1; k <= 3; k++)
|
||||
p[k-1] = (triangulation -> Node(triangle(k))).Transformed(loc);
|
||||
|
||||
for (int k = 1; k <= 3; k++)
|
||||
{
|
||||
// uv = (triangulation -> UVNodes())(triangle(k));
|
||||
#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5
|
||||
uv = triangulation -> UVNode(triangle(k));
|
||||
#else
|
||||
uv = triangulation -> UVNodes())(triangle(k);
|
||||
#endif
|
||||
prop.SetParameters (uv.X(), uv.Y());
|
||||
|
||||
// surf->D0 (uv.X(), uv.Y(), pnt);
|
||||
|
Loading…
Reference in New Issue
Block a user