OCCT: port FreeCAD sources to version 7.6

SMESH is not yet ported
Although FreeCAD code compiles with OCCT 7.6 it doesn't work at the moment
This commit is contained in:
wmayer
2021-10-09 13:49:02 +02:00
parent f628050732
commit 74639da997
13 changed files with 138 additions and 93 deletions

View File

@@ -493,6 +493,15 @@ PyObject* TopoShapeFacePy::getUVNodes(PyObject *args)
return Py::new_reference_to(list);
}
#if OCC_VERSION_HEX >= 0x070600
for (int i=1; i<=mesh->NbNodes(); i++) {
gp_Pnt2d pt2d = mesh->UVNode(i);
Py::Tuple uv(2);
uv.setItem(0, Py::Float(pt2d.X()));
uv.setItem(1, Py::Float(pt2d.Y()));
list.append(uv);
}
#else
const TColgp_Array1OfPnt2d& aNodesUV = mesh->UVNodes();
for (int i=aNodesUV.Lower(); i<=aNodesUV.Upper(); i++) {
gp_Pnt2d pt2d = aNodesUV(i);
@@ -501,6 +510,7 @@ PyObject* TopoShapeFacePy::getUVNodes(PyObject *args)
uv.setItem(1, Py::Float(pt2d.Y()));
list.append(uv);
}
#endif
return Py::new_reference_to(list);
}