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:
@@ -1083,16 +1083,25 @@ void ViewProviderPartExt::updateVisual()
|
||||
|
||||
|
||||
// cycling through the poly mesh
|
||||
#if OCC_VERSION_HEX < 0x070600
|
||||
const Poly_Array1OfTriangle& Triangles = mesh->Triangles();
|
||||
const TColgp_Array1OfPnt& Nodes = mesh->Nodes();
|
||||
TColgp_Array1OfDir Normals (Nodes.Lower(), Nodes.Upper());
|
||||
#else
|
||||
int numNodes = mesh->NbNodes();
|
||||
TColgp_Array1OfDir Normals (1, numNodes);
|
||||
#endif
|
||||
if (NormalsFromUV)
|
||||
Part::Tools::getPointNormals(actFace, mesh, Normals);
|
||||
|
||||
for (int g=1;g<=nbTriInFace;g++) {
|
||||
// Get the triangle
|
||||
Standard_Integer N1,N2,N3;
|
||||
#if OCC_VERSION_HEX < 0x070600
|
||||
Triangles(g).Get(N1,N2,N3);
|
||||
#else
|
||||
mesh->Triangle(g).Get(N1,N2,N3);
|
||||
#endif
|
||||
|
||||
// change orientation of the triangle if the face is reversed
|
||||
if ( orient != TopAbs_FORWARD ) {
|
||||
@@ -1102,7 +1111,11 @@ void ViewProviderPartExt::updateVisual()
|
||||
}
|
||||
|
||||
// get the 3 points of this triangle
|
||||
#if OCC_VERSION_HEX < 0x070600
|
||||
gp_Pnt V1(Nodes(N1)), V2(Nodes(N2)), V3(Nodes(N3));
|
||||
#else
|
||||
gp_Pnt V1(mesh->Node(N1)), V2(mesh->Node(N2)), V3(mesh->Node(N3));
|
||||
#endif
|
||||
|
||||
// get the 3 normals of this triangle
|
||||
gp_Vec NV1, NV2, NV3;
|
||||
@@ -1179,7 +1192,11 @@ void ViewProviderPartExt::updateVisual()
|
||||
// rare cases where some points are only referenced by the polygon
|
||||
// but not by any triangle. Thus, we must apply the coordinates to
|
||||
// make sure that everything is properly set.
|
||||
#if OCC_VERSION_HEX < 0x070600
|
||||
gp_Pnt p(Nodes(nodeIndex));
|
||||
#else
|
||||
gp_Pnt p(mesh->Node(nodeIndex));
|
||||
#endif
|
||||
if (!identity)
|
||||
p.Transform(myTransf);
|
||||
verts[index].setValue((float)(p.X()),(float)(p.Y()),(float)(p.Z()));
|
||||
|
||||
Reference in New Issue
Block a user