403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/science/elmerfem/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/science/elmerfem/files/patch-ElmerGUI_Application_cad_cadview.cpp
- includes workaround for https://github.com/ElmerCSC/elmerfem/issues/304

--- ElmerGUI/Application/cad/cadview.cpp.orig	2021-11-10 14:49:01 UTC
+++ ElmerGUI/Application/cad/cadview.cpp
@@ -74,7 +74,7 @@
 #include <BRepAdaptor_Curve2d.hxx>
 #include <BRepBndLib.hxx>
 #include <BRepGProp.hxx>
-#include <BRepMesh.hxx>
+#include <BRepMesh_IncrementalMesh.hxx>
 #include <BRepTools.hxx>
 #include <BRep_Builder.hxx>
 #include <BRep_Tool.hxx>
@@ -343,9 +343,6 @@ bool CadView::readFile(QString fileName) {
 
     const gp_Trsf &Transformation = Location.Transformation();
 
-    const Poly_Array1OfTriangle &Triangles = Triangulation->Triangles();
-    const TColgp_Array1OfPnt &Nodes = Triangulation->Nodes();
-
     int nofTriangles = Triangulation->NbTriangles();
     int nofNodes = Triangulation->NbNodes();
 
@@ -366,8 +363,8 @@ bool CadView::readFile(QString fileName) {
     vtkTriangle *triangle = vtkTriangle::New();
     partGrid->Allocate(nofTriangles, nofTriangles);
 
-    for (int i = Triangles.Lower(); i <= Triangles.Upper(); i++) {
-      Triangles(i).Get(n0, n1, n2);
+    for (int i = 1; i <= nofTriangles; i++) {
+      Triangulation->Triangle(i).Get(n0, n1, n2);
 
       if (Face.Orientation() != TopAbs_FORWARD) {
         int tmp = n2;
@@ -375,9 +372,9 @@ bool CadView::readFile(QString fileName) {
         n1 = tmp;
       }
 
-      triangle->GetPointIds()->SetId(0, n0 - Nodes.Lower());
-      triangle->GetPointIds()->SetId(1, n1 - Nodes.Lower());
-      triangle->GetPointIds()->SetId(2, n2 - Nodes.Lower());
+      triangle->GetPointIds()->SetId(0, n0 - 1);
+      triangle->GetPointIds()->SetId(1, n1 - 1);
+      triangle->GetPointIds()->SetId(2, n2 - 1);
 
       partGrid->InsertNextCell(triangle->GetCellType(),
                                triangle->GetPointIds());
@@ -385,13 +382,13 @@ bool CadView::readFile(QString fileName) {
 
     double x[3];
     vtkPoints *partPoints = vtkPoints::New();
-    for (int i = Nodes.Lower(); i <= Nodes.Upper(); i++) {
-      gp_XYZ XYZ = Nodes(i).Coord();
+    for (int i = 1; i <= nofNodes; i++) {
+      gp_XYZ XYZ = Triangulation->Node(i).Coord();
       Transformation.Transforms(XYZ);
       x[0] = XYZ.X();
       x[1] = XYZ.Y();
       x[2] = XYZ.Z();
-      partPoints->InsertPoint(i - Nodes.Lower(), x);
+      partPoints->InsertPoint(i - 1, x);
     }
 
     partGrid->SetPoints(partPoints);

Youez - 2016 - github.com/yon3zu
LinuXploit