Compare commits
3 Commits
master
...
uhz/master
Author | SHA1 | Date | |
---|---|---|---|
|
8ec905f8fb | ||
|
5fdbcc8205 | ||
|
e8c5186e15 |
@ -31,11 +31,11 @@ ENDIF(WIN32)
|
||||
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
|
||||
|
||||
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
|
||||
SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
|
||||
SET(${PROJECT_NAME_UC}_MINOR_VERSION 4)
|
||||
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
|
||||
SET(${PROJECT_NAME_UC}_VERSION
|
||||
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
|
||||
SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
|
||||
SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
|
||||
|
||||
# Common CMake macros
|
||||
# ===================
|
||||
|
@ -1,48 +1,63 @@
|
||||
# ------------------------------------------------------------------
|
||||
# ------------------------------------------------------------------
|
||||
# Notes for Netgen >= 4.9.13
|
||||
# ------------------------------------------------------------------
|
||||
# Notes about usage of Netgen with SALOME
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Netgen home page: http://sourceforge.net/apps/mediawiki/netgen-mesher.
|
||||
-------------------
|
||||
1. Netgen home page
|
||||
-------------------
|
||||
|
||||
1. Minimal requirements
|
||||
Netgen mesher's home page is: https://sourceforge.net/projects/netgen-mesher/.
|
||||
|
||||
Minimal version of Netgen required for SALOME is 4.9.13.
|
||||
-----------------------
|
||||
2. Minimal requirements
|
||||
-----------------------
|
||||
|
||||
2. How to build Netgen for SALOME NETGEN Plugin
|
||||
-----------------------------------------
|
||||
Minimal version of Netgen required for SALOME is 5.3.1.
|
||||
|
||||
2.1. Download Netgen archive (here netgen-4.9.13.tar.gz) and unpack it
|
||||
----------------------------------------
|
||||
3. Build Netgen for SALOME NETGEN Plugin
|
||||
----------------------------------------
|
||||
|
||||
2.2. Patch the Netgen distribution for SALOME
|
||||
3.1. Download Netgen archive (here netgen-5.3.1.tar.gz) from the project's site:
|
||||
|
||||
$ cd netgen45
|
||||
$ patch -p1 < patch_directory/netgen49ForSalome.patch
|
||||
$ wget https://vorboss.dl.sourceforge.net/project/netgen-mesher/netgen-mesher/5.3/netgen-5.3.1.tar.gz
|
||||
|
||||
Note that patch corresponds to the version of Netgen you use.
|
||||
For example, netgen49ForSalome.patch mentioned above is a patch
|
||||
file for Netgen 4.9.13. The patch for Netgen can be found in
|
||||
NETGENPLUGIN_SRC/src/NETGEN directory.
|
||||
3.2. Unpack an archive:
|
||||
|
||||
2.3. Configure the netgen compilation. For example
|
||||
$ tar xfz netgen-5.3.1.tar.gz
|
||||
|
||||
$ cd netgen-4.9.13
|
||||
$ ./configure --prefix=THE_INSTALLATION_PATH \
|
||||
--with-occ=${CASROOT} \
|
||||
3.3. Patch the Netgen distribution for SALOME
|
||||
|
||||
$ cd netgen-5.3.1
|
||||
$ patch -p1 < /path/to/netgenplugin_src_dir/src/NETGEN/netgen53ForSalome.patch
|
||||
|
||||
Here, "/path/to/netgenplugin_src_dir" is a path to NETGENPLUGIN source directory.
|
||||
This is the same directory where this Readme file is located.
|
||||
Netgen plugin sources can be retrieved from the Git repository:
|
||||
|
||||
$ git clone http://git.salome-platform.org/gitpub/plugins/netgenplugin.git
|
||||
|
||||
3.4. Configure the netgen compilation:
|
||||
|
||||
$ cd netgen-5.3.1
|
||||
$ ./configure --prefix=/path/to/the/installation/directory \
|
||||
--with-occ=${CAS_ROOT_DIR} \
|
||||
--with-tcl=${TCLHOME}/lib --with-tk=${TCLHOME}/lib \
|
||||
--with-tclinclude=${TCLHOME}/include
|
||||
|
||||
Note that Netgen depends on some products like Open CASCADE
|
||||
Technology and Tcl/Tk. These products should be specified
|
||||
to the configure script via options.
|
||||
Note: Netgen depends on some products like Open CASCADE Technology and Tcl/Tk.
|
||||
These products should be specified to the configure script via options.
|
||||
|
||||
2.4. Compile the netgen product
|
||||
$ make
|
||||
$ make install
|
||||
3.5. Compile and install netgen mesher:
|
||||
|
||||
2.5. Patch the installation directory by copying include files
|
||||
needed by NETGEN Plugin. Use the script
|
||||
NETGENPLUGIN_SRC/src/NETGEN/netgen_copy_include_for_salome
|
||||
to achieve that. The first argument is the directory containing
|
||||
the Netgen sources. The second argument is THE_INSTALLATION_PATH
|
||||
$ make install
|
||||
|
||||
3.6. Patch the installation directory by copying header files
|
||||
needed by NETGEN Plugin. For this purpose you can use the script
|
||||
/path/to/netgenplugin_src_dir/src/NETGEN/netgen_copy_include_for_salome.
|
||||
|
||||
$ /path/to/netgenplugin_src_dir/src/NETGEN/netgen_copy_include_for_salome \
|
||||
. /path/to/the/installation/directory
|
||||
|
||||
The first argument is the directory containing the Netgen sources.
|
||||
The second argument is the installation directory of Netgen mesher.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,897 +0,0 @@
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/meshing/meshtype.cpp netgen-5.0.0.patched/libsrc/meshing/meshtype.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/meshing/meshtype.cpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/meshing/meshtype.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <mystdlib.h>
|
||||
+#include <float.h> // to get DBL_MIN defined
|
||||
|
||||
#include "meshing.hpp"
|
||||
|
||||
@@ -666,7 +667,8 @@
|
||||
|
||||
double det = trans.Det();
|
||||
|
||||
- if (det <= 0)
|
||||
+ // if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob / det;
|
||||
@@ -722,7 +724,8 @@
|
||||
|
||||
double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1);
|
||||
|
||||
- if (det <= 0)
|
||||
+ // if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
{
|
||||
dd = 0;
|
||||
return 1e12;
|
||||
@@ -806,7 +809,8 @@
|
||||
= dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0)
|
||||
+ trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0);
|
||||
|
||||
- if (det <= 0)
|
||||
+ // if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
{
|
||||
@@ -856,7 +860,8 @@
|
||||
frob /= 2;
|
||||
|
||||
double det = trans.Det();
|
||||
- if (det <= 0)
|
||||
+ //if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob / det;
|
||||
@@ -1864,7 +1869,8 @@
|
||||
case PYRAMID:
|
||||
{
|
||||
double noz = 1-p(2);
|
||||
- if (noz == 0.0) noz = 1e-10;
|
||||
+ //if (noz == 0.0) noz = 1e-10;
|
||||
+ if (noz <= DBL_MIN) noz = 1e-10; // avoid FPE
|
||||
|
||||
double xi = p(0) / noz;
|
||||
double eta = p(1) / noz;
|
||||
@@ -2030,7 +2036,8 @@
|
||||
|
||||
double det = -trans.Det();
|
||||
|
||||
- if (det <= 0)
|
||||
+ //if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob * frob / det;
|
||||
@@ -2102,7 +2109,8 @@
|
||||
ddet *= -1;
|
||||
|
||||
|
||||
- if (det <= 0)
|
||||
+ //if (det <= 0)
|
||||
+ if (det <= DBL_MIN) // avoid FPE
|
||||
err += 1e12;
|
||||
else
|
||||
{
|
||||
@@ -2184,7 +2192,7 @@
|
||||
|
||||
det *= -1;
|
||||
|
||||
- if (det <= 0)
|
||||
+ if (det <= DBL_MIN)
|
||||
err += 1e12;
|
||||
else
|
||||
{
|
||||
@@ -2513,10 +2521,10 @@
|
||||
|
||||
MeshingParameters :: MeshingParameters ()
|
||||
{
|
||||
- optimize3d = "cmdmustm";
|
||||
+ optimize3d = (char*)"cmdmustm"; // optimize3d = "cmdmustm";
|
||||
//optimize3d = "cmdmstm";
|
||||
optsteps3d = 3;
|
||||
- optimize2d = "smsmsmSmSmSm";
|
||||
+ optimize2d = (char*)"smsmsmSmSmSm"; // optimize2d = "smsmsmSmSmSm";
|
||||
optsteps2d = 3;
|
||||
opterrpow = 2;
|
||||
blockfill = 1;
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/meshing/meshtype.hpp netgen-5.0.0.patched/libsrc/meshing/meshtype.hpp
|
||||
--- netgen-5.0.0.orig/libsrc/meshing/meshtype.hpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/meshing/meshtype.hpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -15,6 +15,7 @@
|
||||
Classes for NETGEN
|
||||
*/
|
||||
|
||||
+class Mesh; // added due to compilation errors on some platforms
|
||||
|
||||
|
||||
enum ELEMENT_TYPE {
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/meshing/smoothing2.cpp netgen-5.0.0.patched/libsrc/meshing/smoothing2.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/meshing/smoothing2.cpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/meshing/smoothing2.cpp 2013-02-25 11:20:05.000000000 +0400
|
||||
@@ -200,7 +200,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
|
||||
|
||||
// meshthis -> ProjectPoint (surfi, pp1);
|
||||
@@ -258,7 +259,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
|
||||
pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
|
||||
|
||||
@@ -417,7 +419,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
|
||||
pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
|
||||
|
||||
@@ -489,7 +492,8 @@
|
||||
vgrad = 0;
|
||||
badness = 0;
|
||||
|
||||
- ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
|
||||
+ n = ld.normal;
|
||||
|
||||
// pp1 = sp1;
|
||||
// pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
|
||||
@@ -916,7 +920,7 @@
|
||||
{
|
||||
mesh[pi] = Point<3> (origp);
|
||||
}
|
||||
-
|
||||
+ break; // exit as <fact> is not used anymore
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/Partition_Inter3d.cxx netgen-5.0.0.patched/libsrc/occ/Partition_Inter3d.cxx
|
||||
--- netgen-5.0.0.orig/libsrc/occ/Partition_Inter3d.cxx 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/Partition_Inter3d.cxx 2013-02-25 13:51:48.000000000 +0400
|
||||
@@ -243,9 +243,11 @@
|
||||
Standard_Integer i, nbExt = anExtPS.NbExt();
|
||||
Extrema_POnSurf aPOnSurf;
|
||||
for (i = 1; i <= nbExt; ++i )
|
||||
- if (anExtPS.Value( i ) <= TolE) // V6.3
|
||||
- // if (anExtPS.SquareDistance( i ) <= TolE) // V6.5
|
||||
- {
|
||||
+ // porting to OCCT6.5.1
|
||||
+ //if (anExtPS.Value( i ) <= TolE) // V6.3
|
||||
+ // if (anExtPS.SquareDistance( i ) <= TolE) // V6.5
|
||||
+ if (anExtPS.SquareDistance( i ) <= TolE * TolE)
|
||||
+ {
|
||||
aPOnSurf = anExtPS.Point( i );
|
||||
break;
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/Partition_Loop2d.cxx netgen-5.0.0.patched/libsrc/occ/Partition_Loop2d.cxx
|
||||
--- netgen-5.0.0.orig/libsrc/occ/Partition_Loop2d.cxx 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/Partition_Loop2d.cxx 2013-02-25 13:48:15.000000000 +0400
|
||||
@@ -210,7 +210,7 @@
|
||||
Cc->D1(uc, PC, CTg1);
|
||||
if (!isForward) CTg1.Reverse();
|
||||
|
||||
- Standard_Real anglemin = 3 * PI, tolAng = 1.e-8;
|
||||
+ Standard_Real anglemin = 3 * M_PI, tolAng = 1.e-8;
|
||||
|
||||
// select an edge whose first derivative is most left of CTg1
|
||||
// ie an angle between Tg1 and CTg1 is least
|
||||
@@ -234,7 +234,7 @@
|
||||
// -PI < angle < PI
|
||||
Standard_Real angle = Tg1.Angle(CTg1);
|
||||
|
||||
- if (PI - Abs(angle) <= tolAng)
|
||||
+ if (M_PI - Abs(angle) <= tolAng)
|
||||
{
|
||||
// an angle is too close to PI; assure that an angle sign really
|
||||
// reflects an edge position: +PI - an edge is worst,
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/Partition_Spliter.cxx netgen-5.0.0.patched/libsrc/occ/Partition_Spliter.cxx
|
||||
--- netgen-5.0.0.orig/libsrc/occ/Partition_Spliter.cxx 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/Partition_Spliter.cxx 2013-02-25 13:55:10.000000000 +0400
|
||||
@@ -1169,8 +1169,10 @@
|
||||
for (; j<=nbj && ok; ++j) {
|
||||
if (Extrema.IsMin(j)) {
|
||||
hasMin = Standard_True;
|
||||
- ok = Extrema.Value(j) <= tol; // V6.3
|
||||
+ // porting to OCCT6.5.1
|
||||
+ //ok = Extrema.Value(j) <= tol; // V6.3
|
||||
// ok = Extrema.SquareDistance(j) <= tol; // V6.5
|
||||
+ ok = Extrema.SquareDistance(j) <= tol * tol;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occconstruction.cpp netgen-5.0.0.patched/libsrc/occ/occconstruction.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occconstruction.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occconstruction.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <BRepAlgoAPI_Common.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
#include <BRepAlgoAPI_Section.hxx>
|
||||
-#include <BRepOffsetAPI_Sewing.hxx>
|
||||
+//#include <BRepOffsetAPI_Sewing.hxx>
|
||||
//#include <BRepAlgo_Sewing.hxx>
|
||||
#include <BRepOffsetAPI_MakeOffsetShape.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occgenmesh.cpp netgen-5.0.0.patched/libsrc/occ/occgenmesh.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occgenmesh.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occgenmesh.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -57,6 +57,8 @@
|
||||
|
||||
|
||||
|
||||
+
|
||||
+ static // useless out of this file
|
||||
double ComputeH (double kappa)
|
||||
{
|
||||
double hret;
|
||||
@@ -74,8 +76,7 @@
|
||||
}
|
||||
|
||||
|
||||
-
|
||||
-
|
||||
+ static // useless out of this file
|
||||
void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2,
|
||||
BRepLProp_SLProps * prop, Mesh & mesh, int depth, double h = 0)
|
||||
{
|
||||
@@ -171,8 +172,8 @@
|
||||
if(h < 1e-4*maxside)
|
||||
return;
|
||||
|
||||
-
|
||||
- if (h > 30) return;
|
||||
+ // commented to restrict H on a large sphere for example
|
||||
+ //if (h > 30) return;
|
||||
}
|
||||
|
||||
if (h < maxside && depth < 10)
|
||||
@@ -231,6 +232,7 @@
|
||||
|
||||
|
||||
|
||||
+ static // useless out of this file
|
||||
void DivideEdge (TopoDS_Edge & edge, Array<MeshPoint> & ps,
|
||||
Array<double> & params, Mesh & mesh)
|
||||
{
|
||||
@@ -250,8 +252,8 @@
|
||||
hvalue[0] = 0;
|
||||
pnt = c->Value(s0);
|
||||
|
||||
- double olddist = 0;
|
||||
- double dist = 0;
|
||||
+ //double olddist = 0; -- useless variables
|
||||
+ //double dist = 0;
|
||||
|
||||
int tmpVal = (int)(DIVIDEEDGESECTIONS);
|
||||
|
||||
@@ -259,15 +261,19 @@
|
||||
{
|
||||
oldpnt = pnt;
|
||||
pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0));
|
||||
+ // -- no more than 1 segment per <edge length>/DIVIDEEDGESECTIONS
|
||||
hvalue[i] = hvalue[i-1] +
|
||||
- 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
|
||||
- pnt.Distance(oldpnt);
|
||||
+ // 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
|
||||
+ // pnt.Distance(oldpnt);
|
||||
+ min( 1.0,
|
||||
+ 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
|
||||
+ pnt.Distance(oldpnt));
|
||||
|
||||
//(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))
|
||||
// << " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl;
|
||||
|
||||
- olddist = dist;
|
||||
- dist = pnt.Distance(oldpnt);
|
||||
+ //olddist = dist; -- useless variables
|
||||
+ //dist = pnt.Distance(oldpnt);
|
||||
}
|
||||
|
||||
// nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS]));
|
||||
@@ -282,7 +288,10 @@
|
||||
{
|
||||
if (hvalue[i1]/hvalue[DIVIDEEDGESECTIONS]*nsubedges >= i)
|
||||
{
|
||||
- params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0);
|
||||
+ // -- for nsubedges comparable to DIVIDEEDGESECTIONS
|
||||
+ //params[i] = s0+(i1/double(DIVIDEEDGESECTIONS))*(s1-s0);
|
||||
+ double d1 = i1 - (hvalue[i1] - i*hvalue[DIVIDEEDGESECTIONS]/nsubedges)/(hvalue[i1]-hvalue[i1-1]);
|
||||
+ params[i] = s0+(d1/double(DIVIDEEDGESECTIONS))*(s1-s0);
|
||||
pnt = c->Value(params[i]);
|
||||
ps[i-1] = MeshPoint (Point3d(pnt.X(), pnt.Y(), pnt.Z()));
|
||||
i++;
|
||||
@@ -326,6 +335,7 @@
|
||||
(*testout) << "nedges = " << nedges << endl;
|
||||
|
||||
double eps = 1e-6 * geom.GetBoundingBox().Diam();
|
||||
+ const double eps2 = eps * eps; // -- small optimization
|
||||
|
||||
for (int i = 1; i <= nvertices; i++)
|
||||
{
|
||||
@@ -335,7 +345,8 @@
|
||||
bool exists = 0;
|
||||
if (merge_solids)
|
||||
for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++)
|
||||
- if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)
|
||||
+ //if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)
|
||||
+ if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2 ) // -- small optimization
|
||||
{
|
||||
exists = 1;
|
||||
break;
|
||||
@@ -365,6 +376,7 @@
|
||||
{
|
||||
TopoDS_Face face = TopoDS::Face(exp1.Current());
|
||||
int facenr = geom.fmap.FindIndex(face);
|
||||
+ if ( facenr < 1 ) continue; // -- to support SALOME sub-meshes
|
||||
|
||||
if (face2solid[0][facenr-1] == 0)
|
||||
face2solid[0][facenr-1] = solidnr;
|
||||
@@ -384,6 +396,7 @@
|
||||
int facenr = 0;
|
||||
int edgenr = 0;
|
||||
|
||||
+ edgenr = mesh.GetNSeg(); // to support SALOME sub-meshes
|
||||
|
||||
(*testout) << "faces = " << geom.fmap.Extent() << endl;
|
||||
int curr = 0;
|
||||
@@ -445,6 +458,7 @@
|
||||
//(*testout) << "ignoring degenerated edge" << endl;
|
||||
continue;
|
||||
}
|
||||
+ if ( geom.emap.FindIndex(edge) < 1 ) continue; // to support SALOME sub-meshes
|
||||
|
||||
if (geom.vmap.FindIndex(TopExp::FirstVertex (edge)) ==
|
||||
geom.vmap.FindIndex(TopExp::LastVertex (edge)))
|
||||
@@ -482,15 +496,64 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- Point<3> fp = occ2ng (BRep_Tool::Pnt (TopExp::FirstVertex (edge)));
|
||||
- Point<3> lp = occ2ng (BRep_Tool::Pnt (TopExp::LastVertex (edge)));
|
||||
+ TopoDS_Iterator vIt( edge, false );
|
||||
+ TopoDS_Vertex v1 = TopoDS::Vertex( vIt.Value() ); vIt.Next();
|
||||
+ TopoDS_Vertex v2 = TopoDS::Vertex( vIt.Value() );
|
||||
+ if ( v1.Orientation() == TopAbs_REVERSED )
|
||||
+ std::swap( v1, v2 );
|
||||
+ const bool isClosedEdge = v1.IsSame( v2 );
|
||||
+
|
||||
+ Point<3> fp = occ2ng (BRep_Tool::Pnt (v1));
|
||||
+ Point<3> lp = occ2ng (BRep_Tool::Pnt (v2));
|
||||
+ double tol2 = std::min( eps*eps, 1e-6 * Dist2( fp, lp ));
|
||||
+ if ( isClosedEdge )
|
||||
+ tol2 = BRep_Tool::Tolerance( v1 ) * BRep_Tool::Tolerance( v1 );
|
||||
|
||||
pnums[0] = -1;
|
||||
pnums.Last() = -1;
|
||||
for (PointIndex pi = 1; pi < first_ep; pi++)
|
||||
{
|
||||
- if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi;
|
||||
- if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi;
|
||||
+ if (Dist2 (mesh[pi], fp) < tol2) pnums[0] = pi;
|
||||
+ if (Dist2 (mesh[pi], lp) < tol2) pnums.Last() = pi;
|
||||
+ }
|
||||
+ if (( isClosedEdge && pnums[0] != pnums.Last() ) ||
|
||||
+ ( !isClosedEdge && pnums[0] == pnums.Last() ))
|
||||
+ pnums[0] = pnums.Last() = -1;
|
||||
+ if ( pnums[0] == -1 || pnums.Last() == -1 )
|
||||
+ {
|
||||
+ // take into account a possible large gap between a vertex and an edge curve
|
||||
+ // end and a large vertex tolerance covering the whole edge
|
||||
+ if ( pnums[0] == -1 )
|
||||
+ {
|
||||
+ double tol = BRep_Tool::Tolerance( v1 );
|
||||
+ for (PointIndex pi = 1; pi < first_ep; pi++)
|
||||
+ if (pi != pnums.Last() && Dist2 (mesh[pi], fp) < 2*tol*tol)
|
||||
+ pnums[0] = pi;
|
||||
+
|
||||
+ if ( pnums[0] == -1 )
|
||||
+ pnums[0] = first_ep-1- nvertices + geom.vmap.FindIndex ( v1 );
|
||||
+ }
|
||||
+ if ( isClosedEdge )
|
||||
+ {
|
||||
+ pnums.Last() = pnums[0];
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if ( pnums.Last() == -1 )
|
||||
+ {
|
||||
+ double tol = BRep_Tool::Tolerance( v2 );
|
||||
+ for (PointIndex pi = 1; pi < first_ep; pi++)
|
||||
+ if (pi != pnums[0] && Dist2 (mesh[pi], lp) < 2*tol*tol)
|
||||
+ pnums.Last() = pi;
|
||||
+
|
||||
+ if ( pnums.Last() == -1 )
|
||||
+ pnums.Last() = first_ep-1-nvertices + geom.vmap.FindIndex ( v2 );
|
||||
+ }
|
||||
+
|
||||
+ if ( Dist2( fp, mesh[PointIndex(pnums[0])]) >
|
||||
+ Dist2( lp, mesh[PointIndex(pnums.Last())]))
|
||||
+ std::swap( pnums[0], pnums.Last() );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1458,3 +1521,4 @@
|
||||
}
|
||||
|
||||
#endif
|
||||
+
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occgeom.cpp netgen-5.0.0.patched/libsrc/occ/occgeom.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occgeom.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occgeom.cpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "ShapeAnalysis_CheckSmallFace.hxx"
|
||||
#include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"
|
||||
#include "ShapeAnalysis_Surface.hxx"
|
||||
+#include <BRepTopAdaptor_FClass2d.hxx> // -- to optimize Project() and FastProject()
|
||||
+#include <TopAbs_State.hxx>
|
||||
#include "BRepAlgoAPI_Fuse.hxx"
|
||||
#include "BRepCheck_Analyzer.hxx"
|
||||
#include "BRepLib.hxx"
|
||||
@@ -16,10 +18,17 @@
|
||||
#include "ShapeFix_FixSmallFace.hxx"
|
||||
#include "Partition_Spliter.hxx"
|
||||
|
||||
-
|
||||
namespace netgen
|
||||
{
|
||||
- void OCCGeometry :: PrintNrShapes ()
|
||||
+ // free data used to optimize Project() and FastProject()
|
||||
+ OCCGeometry::~OCCGeometry()
|
||||
+ {
|
||||
+ NCollection_DataMap<int,BRepTopAdaptor_FClass2d*>::Iterator it(fclsmap);
|
||||
+ for (; it.More(); it.Next())
|
||||
+ delete it.Value();
|
||||
+ }
|
||||
+
|
||||
+ void OCCGeometry :: PrintNrShapes ()
|
||||
{
|
||||
TopExp_Explorer e;
|
||||
int count = 0;
|
||||
@@ -951,25 +960,58 @@
|
||||
}
|
||||
|
||||
|
||||
+ // returns a projector and a classifier for the given surface
|
||||
+ void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
|
||||
+ BRepTopAdaptor_FClass2d*& cls) const
|
||||
+ {
|
||||
+ //MSV: organize caching projector in the map
|
||||
+ if (fprjmap.IsBound(surfi))
|
||||
+ {
|
||||
+ proj = fprjmap.Find(surfi);
|
||||
+ cls = fclsmap.Find(surfi);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi));
|
||||
+ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
|
||||
+ proj = new ShapeAnalysis_Surface(aSurf);
|
||||
+ fprjmap.Bind(surfi, proj);
|
||||
+ cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion());
|
||||
+ fclsmap.Bind(surfi, cls);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
-
|
||||
- void OCCGeometry :: Project (int surfi, Point<3> & p) const
|
||||
+ // void OCCGeometry :: Project (int surfi, Point<3> & p) const
|
||||
+ bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const
|
||||
{
|
||||
static int cnt = 0;
|
||||
if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl;
|
||||
|
||||
gp_Pnt pnt(p(0), p(1), p(2));
|
||||
|
||||
- double u,v;
|
||||
- Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
- Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf );
|
||||
- gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) );
|
||||
- suval.Coord( u, v);
|
||||
- pnt = thesurf->Value( u, v );
|
||||
-
|
||||
-
|
||||
+ // -- Optimization: use cached projector and classifier
|
||||
+ // double u,v;
|
||||
+ // Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
+ // Handle( ShapeAnalysis_Surface ) su = new ShapeAnalysis_Surface( thesurf );
|
||||
+ // gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) );
|
||||
+ // suval.Coord( u, v);
|
||||
+ // pnt = thesurf->Value( u, v );
|
||||
+
|
||||
+ Handle(ShapeAnalysis_Surface) proj;
|
||||
+ BRepTopAdaptor_FClass2d *cls;
|
||||
+ GetFaceTools(surfi, proj, cls);
|
||||
+
|
||||
+ gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion());
|
||||
+ if (cls->Perform(p2d) == TopAbs_OUT)
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ pnt = proj->Value(p2d);
|
||||
+ p2d.Coord(u, v);
|
||||
+
|
||||
p = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
|
||||
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -979,54 +1021,69 @@
|
||||
{
|
||||
gp_Pnt p(ap(0), ap(1), ap(2));
|
||||
|
||||
- Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
-
|
||||
- gp_Pnt x = surface->Value (u,v);
|
||||
-
|
||||
- if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;
|
||||
-
|
||||
- gp_Vec du, dv;
|
||||
-
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- int count = 0;
|
||||
-
|
||||
- gp_Pnt xold;
|
||||
- gp_Vec n;
|
||||
- double det, lambda, mu;
|
||||
-
|
||||
- do {
|
||||
- count++;
|
||||
-
|
||||
- n = du^dv;
|
||||
-
|
||||
- det = Det3 (n.X(), du.X(), dv.X(),
|
||||
- n.Y(), du.Y(), dv.Y(),
|
||||
- n.Z(), du.Z(), dv.Z());
|
||||
-
|
||||
- if (det < 1e-15) return false;
|
||||
-
|
||||
- lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
|
||||
- n.Y(), p.Y()-x.Y(), dv.Y(),
|
||||
- n.Z(), p.Z()-x.Z(), dv.Z())/det;
|
||||
-
|
||||
- mu = Det3 (n.X(), du.X(), p.X()-x.X(),
|
||||
- n.Y(), du.Y(), p.Y()-x.Y(),
|
||||
- n.Z(), du.Z(), p.Z()-x.Z())/det;
|
||||
-
|
||||
- u += lambda;
|
||||
- v += mu;
|
||||
-
|
||||
- xold = x;
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
|
||||
-
|
||||
- // (*testout) << "FastProject count: " << count << endl;
|
||||
-
|
||||
- if (count == 50) return false;
|
||||
-
|
||||
- ap = Point<3> (x.X(), x.Y(), x.Z());
|
||||
+ // -- Optimization: use cached projector and classifier
|
||||
+ // Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
+ //
|
||||
+ // gp_Pnt x = surface->Value (u,v);
|
||||
+ //
|
||||
+ // if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;
|
||||
+ //
|
||||
+ // gp_Vec du, dv;
|
||||
+ //
|
||||
+ // surface->D1(u,v,x,du,dv);
|
||||
+ //
|
||||
+ // int count = 0;
|
||||
+ //
|
||||
+ // gp_Pnt xold;
|
||||
+ // gp_Vec n;
|
||||
+ // double det, lambda, mu;
|
||||
+ //
|
||||
+ // do {
|
||||
+ // count++;
|
||||
+ //
|
||||
+ // n = du^dv;
|
||||
+ //
|
||||
+ // det = Det3 (n.X(), du.X(), dv.X(),
|
||||
+ // n.Y(), du.Y(), dv.Y(),
|
||||
+ // n.Z(), du.Z(), dv.Z());
|
||||
+ //
|
||||
+ // if (det < 1e-15) return false;
|
||||
+ //
|
||||
+ // lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
|
||||
+ // n.Y(), p.Y()-x.Y(), dv.Y(),
|
||||
+ // n.Z(), p.Z()-x.Z(), dv.Z())/det;
|
||||
+ //
|
||||
+ // mu = Det3 (n.X(), du.X(), p.X()-x.X(),
|
||||
+ // n.Y(), du.Y(), p.Y()-x.Y(),
|
||||
+ // n.Z(), du.Z(), p.Z()-x.Z())/det;
|
||||
+ //
|
||||
+ // u += lambda;
|
||||
+ // v += mu;
|
||||
+ //
|
||||
+ // xold = x;
|
||||
+ // surface->D1(u,v,x,du,dv);
|
||||
+ //
|
||||
+ // } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
|
||||
+ //
|
||||
+ // // (*testout) << "FastProject count: " << count << endl;
|
||||
+ //
|
||||
+ // if (count == 50) return false;
|
||||
+ //
|
||||
+ // ap = Point<3> (x.X(), x.Y(), x.Z());
|
||||
+ Handle(ShapeAnalysis_Surface) proj;
|
||||
+ BRepTopAdaptor_FClass2d *cls;
|
||||
+ GetFaceTools(surfi, proj, cls);
|
||||
+
|
||||
+ gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion());
|
||||
+ if (cls->Perform(p2d) == TopAbs_OUT)
|
||||
+ {
|
||||
+ //cout << "Projection fails" << endl;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ p = proj->Value(p2d);
|
||||
+ p2d.Coord(u, v);
|
||||
+ ap = Point<3> (p.X(), p.Y(), p.Z());
|
||||
|
||||
return true;
|
||||
}
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occgeom.hpp netgen-5.0.0.patched/libsrc/occ/occgeom.hpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occgeom.hpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occgeom.hpp 2013-02-21 17:46:13.000000000 +0400
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "Geom_Curve.hxx"
|
||||
#include "Geom2d_Curve.hxx"
|
||||
#include "Geom_Surface.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
#include "BRepTools.hxx"
|
||||
#include "TopExp.hxx"
|
||||
#include "BRepBuilderAPI_MakeVertex.hxx"
|
||||
@@ -42,8 +42,8 @@
|
||||
#include "Geom_Curve.hxx"
|
||||
#include "Geom2d_Curve.hxx"
|
||||
#include "Geom_Surface.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
-#include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnSurf.hxx"
|
||||
+// #include "GeomAPI_ProjectPointOnCurve.hxx"
|
||||
#include "TopoDS_Wire.hxx"
|
||||
#include "BRepTools_WireExplorer.hxx"
|
||||
#include "BRepTools.hxx"
|
||||
@@ -68,7 +68,7 @@
|
||||
#include "IGESToBRep_Reader.hxx"
|
||||
#include "Interface_Static.hxx"
|
||||
#include "GeomAPI_ExtremaCurveCurve.hxx"
|
||||
-#include "Standard_ErrorHandler.hxx"
|
||||
+//#include "Standard_ErrorHandler.hxx"
|
||||
#include "Standard_Failure.hxx"
|
||||
#include "ShapeUpgrade_ShellSewing.hxx"
|
||||
#include "ShapeFix_Shape.hxx"
|
||||
@@ -80,6 +80,10 @@
|
||||
#include "ShapeAnalysis.hxx"
|
||||
#include "ShapeBuild_ReShape.hxx"
|
||||
|
||||
+// -- Optimization: to use cached projector and classifier
|
||||
+#include <NCollection_DataMap.hxx>
|
||||
+class Handle_ShapeAnalysis_Surface;
|
||||
+class BRepTopAdaptor_FClass2d;
|
||||
|
||||
// Philippose - 29/01/2009
|
||||
// OpenCascade XDE Support
|
||||
@@ -192,6 +196,9 @@
|
||||
class OCCGeometry : public NetgenGeometry
|
||||
{
|
||||
Point<3> center;
|
||||
+ // -- Optimization: to use cached projector and classifier
|
||||
+ mutable NCollection_DataMap<int,Handle_ShapeAnalysis_Surface> fprjmap;
|
||||
+ mutable NCollection_DataMap<int,BRepTopAdaptor_FClass2d*> fclsmap;
|
||||
|
||||
public:
|
||||
TopoDS_Shape shape;
|
||||
@@ -247,6 +254,8 @@
|
||||
virtual void Save (string filename) const;
|
||||
|
||||
|
||||
+ ~OCCGeometry(); // -- to free cached projector and classifier
|
||||
+
|
||||
void BuildFMap();
|
||||
|
||||
Box<3> GetBoundingBox()
|
||||
@@ -266,9 +275,14 @@
|
||||
Point<3> Center()
|
||||
{ return center;}
|
||||
|
||||
- void Project (int surfi, Point<3> & p) const;
|
||||
+ // void Project (int surfi, Point<3> & p) const; -- optimization
|
||||
+ bool Project (int surfi, Point<3> & p, double& u, double& v) const;
|
||||
bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const;
|
||||
|
||||
+ // -- Optimization: to use cached projector and classifier
|
||||
+ void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
|
||||
+ BRepTopAdaptor_FClass2d*& cls) const;
|
||||
+
|
||||
OCCSurface GetSurface (int surfi)
|
||||
{
|
||||
cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/occmeshsurf.cpp netgen-5.0.0.patched/libsrc/occ/occmeshsurf.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/occ/occmeshsurf.cpp 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/occmeshsurf.cpp 2013-02-25 13:27:49.000000000 +0400
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <meshing.hpp>
|
||||
#include <GeomLProp_SLProps.hxx>
|
||||
#include <ShapeAnalysis_Surface.hxx>
|
||||
+#include <GeomAPI_ProjectPointOnCurve.hxx> // -- moved here from occgeom.hpp
|
||||
|
||||
|
||||
namespace netgen
|
||||
@@ -434,23 +435,33 @@
|
||||
|
||||
void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const
|
||||
{
|
||||
- geometry.Project (surfind, p);
|
||||
+ // geometry.Project (surfind, p); -- signature of Project() changed for optimization
|
||||
+ double u, v;
|
||||
+ geometry.Project (surfind, p, u, v);
|
||||
}
|
||||
|
||||
|
||||
int MeshOptimize2dOCCSurfaces :: ProjectPointGI (INDEX surfind, Point<3> & p, PointGeomInfo & gi) const
|
||||
{
|
||||
- double u = gi.u;
|
||||
- double v = gi.v;
|
||||
+ //double u = gi.u;
|
||||
+ //double v = gi.v;
|
||||
|
||||
Point<3> hp = p;
|
||||
- if (geometry.FastProject (surfind, hp, u, v))
|
||||
- {
|
||||
- p = hp;
|
||||
- return 1;
|
||||
- }
|
||||
- ProjectPoint (surfind, p);
|
||||
- return CalcPointGeomInfo (surfind, gi, p);
|
||||
+ // -- u and v are computed by FastProject() and Project(), no need to call CalcPointGeomInfo()
|
||||
+ // if (geometry.FastProject (surfind, hp, u, v))
|
||||
+ // {
|
||||
+ // p = hp;
|
||||
+ // return 1;
|
||||
+ // }
|
||||
+ // ProjectPoint (surfind, p);
|
||||
+ // return CalcPointGeomInfo (surfind, gi, p);
|
||||
+ bool ok;
|
||||
+ if (gi.trignum > 0)
|
||||
+ ok = geometry.FastProject (surfind, hp, gi.u, gi.v);
|
||||
+ else
|
||||
+ ok = geometry.Project (surfind, hp, gi.u, gi.v);
|
||||
+ p = hp;
|
||||
+ return ok;
|
||||
}
|
||||
|
||||
|
||||
@@ -680,7 +691,8 @@
|
||||
if (!geometry.FastProject (surfi, hnewp, u, v))
|
||||
{
|
||||
// cout << "Fast projection to surface fails! Using OCC projection" << endl;
|
||||
- geometry.Project (surfi, hnewp);
|
||||
+ // geometry.Project (surfi, hnewp); -- Project() changed for optimization
|
||||
+ geometry.Project (surfi, hnewp, u, v);
|
||||
}
|
||||
|
||||
newgi.trignum = 1;
|
||||
@@ -689,7 +701,7 @@
|
||||
}
|
||||
|
||||
newp = hnewp;
|
||||
- }
|
||||
+ }//; -- to compile with -Wall -pedantic
|
||||
|
||||
|
||||
void OCCRefinementSurfaces ::
|
||||
@@ -708,14 +720,18 @@
|
||||
hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
|
||||
newp = hnewp;
|
||||
newgi = ap1;
|
||||
- };
|
||||
+ }
|
||||
|
||||
|
||||
void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) const
|
||||
{
|
||||
if (surfi > 0)
|
||||
- geometry.Project (surfi, p);
|
||||
- };
|
||||
+ // geometry.Project (surfi, p); -- Project() changed for optimization
|
||||
+ {
|
||||
+ double u, v;
|
||||
+ geometry.Project (surfi, p, u, v);
|
||||
+ }
|
||||
+ }//; -- to compile with -Wall -pedantic
|
||||
|
||||
void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const
|
||||
{
|
||||
@@ -723,9 +739,10 @@
|
||||
if (!geometry.FastProject (surfi, p, gi.u, gi.v))
|
||||
{
|
||||
cout << "Fast projection to surface fails! Using OCC projection" << endl;
|
||||
- geometry.Project (surfi, p);
|
||||
+ double u, v;
|
||||
+ geometry.Project (surfi, p, u, v);
|
||||
}
|
||||
- };
|
||||
+ }
|
||||
|
||||
|
||||
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/occ/utilities.h netgen-5.0.0.patched/libsrc/occ/utilities.h
|
||||
--- netgen-5.0.0.orig/libsrc/occ/utilities.h 2012-11-09 19:15:02.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/occ/utilities.h 2013-02-21 17:47:08.000000000 +0400
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
+#include <iomanip>
|
||||
#include <cstdlib>
|
||||
// #include "SALOME_Log.hxx"
|
||||
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/libsrc/stlgeom/stlgeommesh.cpp netgen-5.0.0.patched/libsrc/stlgeom/stlgeommesh.cpp
|
||||
--- netgen-5.0.0.orig/libsrc/stlgeom/stlgeommesh.cpp 2012-11-09 19:15:04.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/libsrc/stlgeom/stlgeommesh.cpp 2013-02-21 17:52:07.000000000 +0400
|
||||
@@ -1435,7 +1435,8 @@
|
||||
/*
|
||||
if (!optstring || strlen(optstring) == 0)
|
||||
{
|
||||
- mparam.optimize2d = "smcm";
|
||||
+ //mparam.optimize2d = (char*)"smcm";
|
||||
+ mparam.optimize2d = (char*)"smcm";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1453,7 +1454,7 @@
|
||||
mesh -> LoadLocalMeshSize (mparam.meshsizefilename);
|
||||
mesh -> CalcLocalHFromSurfaceCurvature (mparam.grading,
|
||||
stlparam.resthsurfmeshcurvfac);
|
||||
- mparam.optimize2d = "cmsmSm";
|
||||
+ mparam.optimize2d = "(char*)cmsmSm";
|
||||
STLSurfaceOptimization (*stlgeometry, *mesh, mparam);
|
||||
#ifdef STAT_STREAM
|
||||
(*statout) << GetTime() << " & ";
|
||||
@@ -1560,7 +1561,8 @@
|
||||
/*
|
||||
if (!optstring || strlen(optstring) == 0)
|
||||
{
|
||||
- mparam.optimize3d = "cmdmstm";
|
||||
+ //mparam.optimize3d = "cmdmstm";
|
||||
+ mparam.optimize3d = (char*)"cmdmstm";
|
||||
}
|
||||
else
|
||||
{
|
||||
diff -Naur --exclude=CVS netgen-5.0.0.orig/nglib/nglib.h netgen-5.0.0.patched/nglib/nglib.h
|
||||
--- netgen-5.0.0.orig/nglib/nglib.h 2012-11-09 19:15:00.000000000 +0400
|
||||
+++ netgen-5.0.0.patched/nglib/nglib.h 2013-02-21 17:47:08.000000000 +0400
|
||||
@@ -24,7 +24,7 @@
|
||||
// Philippose - 14.02.2009
|
||||
// Modifications for creating a DLL in Windows
|
||||
#ifdef WIN32
|
||||
- #ifdef NGLIB_EXPORTS || nglib_EXPORTS
|
||||
+ #if defined NGLIB_EXPORTS || defined nglib_EXPORTS
|
||||
#define DLL_HEADER __declspec(dllexport)
|
||||
#else
|
||||
#define DLL_HEADER __declspec(dllimport)
|
@ -1,6 +1,6 @@
|
||||
diff -NaurwB netgen-5.3.1_orig/Makefile.am netgen-5.3.1_new/Makefile.am
|
||||
--- netgen-5.3.1_orig/Makefile.am 2016-10-21 17:32:01.000000000 +0300
|
||||
+++ netgen-5.3.1_new/Makefile.am 2016-10-21 17:31:54.000000000 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/Makefile.am netgen-5.3.1_SRC_modif/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/Makefile.am 2014-08-29 13:55:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/Makefile.am 2017-09-11 18:08:21.217313702 +0300
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
METASOURCES = AUTO
|
||||
@ -10,9 +10,9 @@ diff -NaurwB netgen-5.3.1_orig/Makefile.am netgen-5.3.1_new/Makefile.am
|
||||
|
||||
# TESTS = ng/netgen -batchmode
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/Makefile.in netgen-5.3.1_new/Makefile.in
|
||||
--- netgen-5.3.1_orig/Makefile.in 2014-10-06 15:04:37.000000000 +0400
|
||||
+++ netgen-5.3.1_new/Makefile.in 2016-10-03 16:17:10.164707368 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/Makefile.in netgen-5.3.1_SRC_modif/Makefile.in
|
||||
--- netgen-5.3.1_SRC_orig/Makefile.in 2014-10-06 15:04:37.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/Makefile.in 2017-09-11 18:08:21.225312838 +0300
|
||||
@@ -280,7 +280,7 @@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
@ -22,9 +22,9 @@ diff -NaurwB netgen-5.3.1_orig/Makefile.in netgen-5.3.1_new/Makefile.in
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/configure.ac netgen-5.3.1_new/configure.ac
|
||||
--- netgen-5.3.1_orig/configure.ac 2014-10-06 15:00:17.000000000 +0400
|
||||
+++ netgen-5.3.1_new/configure.ac 2016-09-29 14:34:11.957389447 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/configure.ac netgen-5.3.1_SRC_modif/configure.ac
|
||||
--- netgen-5.3.1_SRC_orig/configure.ac 2014-10-06 15:00:17.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/configure.ac 2017-09-11 18:08:21.226312730 +0300
|
||||
@@ -20,7 +20,7 @@
|
||||
CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
|
||||
# LDFLAGS="$LDFLAGS $OPENMP_CXXFLAGS"
|
||||
@ -45,9 +45,98 @@ diff -NaurwB netgen-5.3.1_orig/configure.ac netgen-5.3.1_new/configure.ac
|
||||
|
||||
# -lTKDCAF
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/findip.hpp netgen-5.3.1_new/libsrc/meshing/findip.hpp
|
||||
--- netgen-5.3.1_orig/libsrc/meshing/findip.hpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/meshing/findip.hpp 2016-09-30 20:38:56.662234111 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/csg/Makefile.am netgen-5.3.1_SRC_modif/libsrc/csg/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/csg/Makefile.am 2014-08-29 13:54:06.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/csg/Makefile.am 2017-09-11 18:08:21.234311865 +0300
|
||||
@@ -8,7 +8,7 @@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libcsg.la
|
||||
+noinst_LTLIBRARIES = libcsg.la
|
||||
|
||||
|
||||
libcsg_la_SOURCES = algprim.cpp brick.cpp \
|
||||
@@ -17,12 +17,9 @@
|
||||
manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp \
|
||||
solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp
|
||||
|
||||
-libcsg_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
-
|
||||
-
|
||||
|
||||
if NGGUI
|
||||
-lib_LTLIBRARIES += libcsgvis.la
|
||||
+lib_LTLIBRARIES = libcsgvis.la
|
||||
|
||||
libcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
|
||||
libcsgvis_la_LIBADD = libcsg.la
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/geom2d/Makefile.am netgen-5.3.1_SRC_modif/libsrc/geom2d/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/geom2d/Makefile.am 2014-08-29 13:54:06.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/geom2d/Makefile.am 2017-09-11 18:08:21.234311865 +0300
|
||||
@@ -4,16 +4,15 @@
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libgeom2d.la
|
||||
+noinst_LTLIBRARIES = libgeom2d.la
|
||||
|
||||
if NGGUI
|
||||
-lib_LTLIBRARIES += libgeom2dvis.la
|
||||
+lib_LTLIBRARIES = libgeom2dvis.la
|
||||
endif
|
||||
|
||||
|
||||
|
||||
libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
|
||||
-libgeom2d_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
|
||||
libgeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp
|
||||
libgeom2dvis_la_LIBADD = libgeom2d.la
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/interface/Makefile.am netgen-5.3.1_SRC_modif/libsrc/interface/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/interface/Makefile.am 2014-08-29 13:54:02.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/interface/Makefile.am 2017-09-11 18:08:21.234311865 +0300
|
||||
@@ -2,14 +2,11 @@
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface $(MPI_INCLUDES) $(TCL_INCLUDES) -DOPENGL
|
||||
METASOURCES = AUTO
|
||||
-lib_LTLIBRARIES = libinterface.la
|
||||
+noinst_LTLIBRARIES = libinterface.la
|
||||
libinterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
|
||||
read_fnf_mesh.cpp readtetmesh.cpp readuser.cpp writeabaqus.cpp writediffpack.cpp \
|
||||
writedolfin.cpp writeelmer.cpp writefeap.cpp writefluent.cpp writegmsh.cpp writejcm.cpp \
|
||||
writepermas.cpp writetecplot.cpp writetet.cpp writetochnog.cpp writeuser.cpp \
|
||||
wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp
|
||||
|
||||
-
|
||||
-libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
-
|
||||
# libinterface_la_LDFLAGS = -rdynamic
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/meshing/Makefile.am netgen-5.3.1_SRC_modif/libsrc/meshing/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/meshing/Makefile.am 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/meshing/Makefile.am 2017-09-11 18:08:21.234311865 +0300
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libmesh.la
|
||||
+noinst_LTLIBRARIES = libmesh.la
|
||||
|
||||
libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
|
||||
clusters.cpp curvedelems.cpp delaunay.cpp delaunay2d.cpp \
|
||||
@@ -30,8 +30,5 @@
|
||||
topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp \
|
||||
parallelmesh.cpp paralleltop.cpp paralleltop.hpp basegeom.cpp
|
||||
|
||||
-libmesh_la_LIBADD = $(top_builddir)/libsrc/linalg/libla.la \
|
||||
- $(top_builddir)/libsrc/gprim/libgprim.la \
|
||||
- $(top_builddir)/libsrc/general/libgen.la \
|
||||
- -lz
|
||||
+libmesh_la_LIBADD = -lz
|
||||
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/meshing/findip.hpp netgen-5.3.1_SRC_modif/libsrc/meshing/findip.hpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/meshing/findip.hpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/meshing/findip.hpp 2017-09-11 18:08:21.226312730 +0300
|
||||
@@ -75,6 +75,9 @@
|
||||
static int timer = NgProfiler::CreateTimer ("FindInnerPoint");
|
||||
NgProfiler::RegionTimer reg (timer);
|
||||
@ -58,9 +147,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/findip.hpp netgen-5.3.1_new/libsrc
|
||||
Array<Vec3d> a;
|
||||
Array<double> c;
|
||||
Mat<3> m, inv;
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/improve3.cpp netgen-5.3.1_new/libsrc/meshing/improve3.cpp
|
||||
--- netgen-5.3.1_orig/libsrc/meshing/improve3.cpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/meshing/improve3.cpp 2016-10-03 16:16:57.636639300 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/meshing/improve3.cpp netgen-5.3.1_SRC_modif/libsrc/meshing/improve3.cpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/meshing/improve3.cpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/meshing/improve3.cpp 2017-09-11 18:08:21.227312622 +0300
|
||||
@@ -1219,6 +1219,7 @@
|
||||
|
||||
tetused = 0;
|
||||
@ -83,9 +172,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/improve3.cpp netgen-5.3.1_new/libs
|
||||
|
||||
bad1 = 0;
|
||||
for (int k = 0; k < nsuround; k++)
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/meshtype.cpp netgen-5.3.1_new/libsrc/meshing/meshtype.cpp
|
||||
--- netgen-5.3.1_orig/libsrc/meshing/meshtype.cpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/meshing/meshtype.cpp 2016-09-29 14:04:51.500148293 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/meshing/meshtype.cpp netgen-5.3.1_SRC_modif/libsrc/meshing/meshtype.cpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/meshing/meshtype.cpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/meshing/meshtype.cpp 2017-09-11 18:08:21.227312622 +0300
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <mystdlib.h>
|
||||
+#include <float.h> // to get DBL_MIN defined
|
||||
@ -171,9 +260,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/meshtype.cpp netgen-5.3.1_new/libs
|
||||
err += 1e12;
|
||||
else
|
||||
{
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/meshtype.hpp netgen-5.3.1_new/libsrc/meshing/meshtype.hpp
|
||||
--- netgen-5.3.1_orig/libsrc/meshing/meshtype.hpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/meshing/meshtype.hpp 2016-09-30 14:28:09.147575801 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/meshing/meshtype.hpp netgen-5.3.1_SRC_modif/libsrc/meshing/meshtype.hpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/meshing/meshtype.hpp 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/meshing/meshtype.hpp 2017-09-11 18:08:21.228312514 +0300
|
||||
@@ -15,6 +15,7 @@
|
||||
Classes for NETGEN
|
||||
*/
|
||||
@ -209,9 +298,25 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/meshing/meshtype.hpp netgen-5.3.1_new/libs
|
||||
#endif
|
||||
;
|
||||
}
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.cxx netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.cxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.cxx 2016-09-29 14:44:01.996464598 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Makefile.am netgen-5.3.1_SRC_modif/libsrc/occ/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Makefile.am 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Makefile.am 2017-09-11 18:08:21.234311865 +0300
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libocc.la
|
||||
+noinst_LTLIBRARIES = libocc.la
|
||||
|
||||
if NGGUI
|
||||
-lib_LTLIBRARIES += liboccvis.la
|
||||
+lib_LTLIBRARIES = liboccvis.la
|
||||
endif
|
||||
|
||||
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter2d.cxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter2d.cxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter2d.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter2d.cxx 2017-09-11 18:08:21.228312514 +0300
|
||||
@@ -47,9 +47,7 @@
|
||||
#include <TopOpeBRep_EdgesIntersector.hxx>
|
||||
#include <TopOpeBRep_Point2d.hxx>
|
||||
@ -222,9 +327,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.cxx netgen-5.3.1_new
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.hxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Inter2d.hxx 2016-09-29 14:44:01.996464598 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter2d.hxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter2d.hxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter2d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter2d.hxx 2017-09-11 18:08:21.228312514 +0300
|
||||
@@ -27,7 +27,9 @@
|
||||
#ifndef _Partition_Inter2d_HeaderFile
|
||||
#define _Partition_Inter2d_HeaderFile
|
||||
@ -252,9 +357,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter2d.hxx netgen-5.3.1_new
|
||||
class TopoDS_Edge;
|
||||
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.cxx netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.cxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.cxx 2016-09-29 14:44:02.000464619 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter3d.cxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter3d.cxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter3d.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter3d.cxx 2017-09-11 18:08:21.229312406 +0300
|
||||
@@ -48,7 +48,6 @@
|
||||
#include <TopOpeBRepTool_BoxSort.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
|
||||
@ -272,9 +377,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.cxx netgen-5.3.1_new
|
||||
}
|
||||
if (!S->IsUPeriodic() && !S->IsVPeriodic())
|
||||
return;
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.hxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Inter3d.hxx 2016-09-29 14:44:02.000464619 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter3d.hxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter3d.hxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Inter3d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Inter3d.hxx 2017-09-11 18:08:21.229312406 +0300
|
||||
@@ -27,7 +27,9 @@
|
||||
#ifndef _Partition_Inter3d_HeaderFile
|
||||
#define _Partition_Inter3d_HeaderFile
|
||||
@ -337,9 +442,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Inter3d.hxx netgen-5.3.1_new
|
||||
TopTools_DataMapOfShapeListOfShape mySameDomainFM;
|
||||
TopTools_DataMapOfShapeShape mySameDomainVM;
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop.hxx netgen-5.3.1_new/libsrc/occ/Partition_Loop.hxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Loop.hxx 2016-09-29 14:44:02.000464619 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop.hxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop.hxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop.hxx 2017-09-11 18:08:21.229312406 +0300
|
||||
@@ -38,8 +38,6 @@
|
||||
#endif
|
||||
class TopoDS_Face;
|
||||
@ -349,9 +454,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop.hxx netgen-5.3.1_new/li
|
||||
|
||||
#ifndef _Standard_HeaderFile
|
||||
#include <Standard.hxx>
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.cxx netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.cxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.cxx 2016-09-29 14:04:51.504148314 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop2d.cxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop2d.cxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop2d.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop2d.cxx 2017-09-11 18:08:21.229312406 +0300
|
||||
@@ -210,7 +210,7 @@
|
||||
Cc->D1(uc, PC, CTg1);
|
||||
if (!isForward) CTg1.Reverse();
|
||||
@ -370,9 +475,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.cxx netgen-5.3.1_new/
|
||||
{
|
||||
// an angle is too close to PI; assure that an angle sign really
|
||||
// reflects an edge position: +PI - an edge is worst,
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.hxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Loop2d.hxx 2016-09-29 14:44:02.000464619 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop2d.hxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop2d.hxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop2d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop2d.hxx 2017-09-11 18:08:21.230312298 +0300
|
||||
@@ -24,7 +24,6 @@
|
||||
#endif
|
||||
class TopoDS_Face;
|
||||
@ -381,9 +486,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop2d.hxx netgen-5.3.1_new/
|
||||
class BRepAlgo_Image;
|
||||
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop3d.hxx netgen-5.3.1_new/libsrc/occ/Partition_Loop3d.hxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Loop3d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Loop3d.hxx 2016-09-29 14:44:02.000464619 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop3d.hxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop3d.hxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Loop3d.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Loop3d.hxx 2017-09-11 18:08:21.230312298 +0300
|
||||
@@ -13,6 +13,9 @@
|
||||
#ifndef _TopTools_ListOfShape_HeaderFile
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
@ -403,9 +508,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Loop3d.hxx netgen-5.3.1_new/
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Face;
|
||||
class gp_Vec;
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.cxx netgen-5.3.1_new/libsrc/occ/Partition_Spliter.cxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Spliter.cxx 2016-09-29 14:44:02.000464619 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Spliter.cxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Spliter.cxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Spliter.cxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Spliter.cxx 2017-09-11 18:08:21.230312298 +0300
|
||||
@@ -48,7 +48,6 @@
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
@ -414,9 +519,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.cxx netgen-5.3.1_new
|
||||
#include <TopTools_MapIteratorOfMapOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.hxx netgen-5.3.1_new/libsrc/occ/Partition_Spliter.hxx
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Partition_Spliter.hxx 2016-09-29 14:44:02.004464639 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Spliter.hxx netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Spliter.hxx
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/Partition_Spliter.hxx 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/Partition_Spliter.hxx 2017-09-11 18:08:21.231312190 +0300
|
||||
@@ -28,9 +28,6 @@
|
||||
#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
|
||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||
@ -444,9 +549,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/Partition_Spliter.hxx netgen-5.3.1_new
|
||||
BRepAlgo_Image myImagesFaces;
|
||||
BRepAlgo_Image myImagesEdges;
|
||||
BRepAlgo_Image myImageShape;
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occconstruction.cpp netgen-5.3.1_new/libsrc/occ/occconstruction.cpp
|
||||
--- netgen-5.3.1_orig/libsrc/occ/occconstruction.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/occconstruction.cpp 2016-09-29 14:04:51.500148293 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/occconstruction.cpp netgen-5.3.1_SRC_modif/libsrc/occ/occconstruction.cpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/occconstruction.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/occconstruction.cpp 2017-09-11 18:08:21.231312190 +0300
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <BRepAlgoAPI_Common.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
@ -456,9 +561,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occconstruction.cpp netgen-5.3.1_new/l
|
||||
//#include <BRepAlgo_Sewing.hxx>
|
||||
#include <BRepOffsetAPI_MakeOffsetShape.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgenmesh.cpp netgen-5.3.1_new/libsrc/occ/occgenmesh.cpp
|
||||
--- netgen-5.3.1_orig/libsrc/occ/occgenmesh.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/occgenmesh.cpp 2016-09-29 14:04:51.500148293 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/occgenmesh.cpp netgen-5.3.1_SRC_modif/libsrc/occ/occgenmesh.cpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/occgenmesh.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/occgenmesh.cpp 2017-09-11 18:08:21.231312190 +0300
|
||||
@@ -171,8 +171,8 @@
|
||||
if(h < 1e-4*maxside)
|
||||
return;
|
||||
@ -702,9 +807,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgenmesh.cpp netgen-5.3.1_new/libsrc
|
||||
|
||||
mesh.CalcSurfacesOfNode();
|
||||
multithread.task = savetask;
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/occ/occgeom.cpp
|
||||
--- netgen-5.3.1_orig/libsrc/occ/occgeom.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/occgeom.cpp 2016-09-29 16:22:31.636328123 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_SRC_modif/libsrc/occ/occgeom.cpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/occgeom.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/occgeom.cpp 2017-09-11 18:08:32.836058020 +0300
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "ShapeAnalysis_CheckSmallFace.hxx"
|
||||
#include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"
|
||||
@ -732,7 +837,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
void OCCGeometry :: PrintNrShapes ()
|
||||
{
|
||||
TopExp_Explorer e;
|
||||
@@ -112,7 +121,7 @@
|
||||
@@ -112,13 +121,13 @@
|
||||
double surfacecont = 0;
|
||||
|
||||
{
|
||||
@ -741,6 +846,13 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
rebuild->Apply(shape);
|
||||
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
||||
{
|
||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||
if ( BRep_Tool::Degenerated(edge) )
|
||||
- rebuild->Remove(edge, false);
|
||||
+ rebuild->Remove(edge);
|
||||
}
|
||||
shape = rebuild->Apply(shape);
|
||||
}
|
||||
@@ -143,7 +152,7 @@
|
||||
cout << endl << "- repairing faces" << endl;
|
||||
|
||||
@ -750,7 +862,16 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
rebuild->Apply(shape);
|
||||
|
||||
|
||||
@@ -200,7 +209,7 @@
|
||||
@@ -187,7 +196,7 @@
|
||||
cout << "(natural bounds added)" <<endl;
|
||||
TopoDS_Face newface = sff->Face();
|
||||
|
||||
- rebuild->Replace(face, newface, Standard_False);
|
||||
+ rebuild->Replace(face, newface);
|
||||
}
|
||||
|
||||
// Set the original colour of the face to the newly created
|
||||
@@ -200,13 +209,13 @@
|
||||
|
||||
|
||||
{
|
||||
@ -759,6 +880,13 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
rebuild->Apply(shape);
|
||||
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
||||
{
|
||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||
if ( BRep_Tool::Degenerated(edge) )
|
||||
- rebuild->Remove(edge, false);
|
||||
+ rebuild->Remove(edge);
|
||||
}
|
||||
shape = rebuild->Apply(shape);
|
||||
}
|
||||
@@ -217,7 +226,7 @@
|
||||
cout << endl << "- fixing small edges" << endl;
|
||||
|
||||
@ -768,6 +896,15 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
rebuild->Apply(shape);
|
||||
|
||||
|
||||
@@ -270,7 +279,7 @@
|
||||
if(replace)
|
||||
{
|
||||
TopoDS_Wire newwire = sfw->Wire();
|
||||
- rebuild->Replace(oldwire, newwire, Standard_False);
|
||||
+ rebuild->Replace(oldwire, newwire);
|
||||
}
|
||||
|
||||
//delete sfw; sfw = NULL;
|
||||
@@ -284,7 +293,7 @@
|
||||
|
||||
{
|
||||
@ -777,7 +914,16 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
rebuild->Apply(shape);
|
||||
|
||||
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
||||
@@ -312,7 +321,7 @@
|
||||
@@ -300,7 +309,7 @@
|
||||
cout << "removing degenerated edge " << emap.FindIndex(edge)
|
||||
<< " from vertex " << vmap.FindIndex(TopExp::FirstVertex (edge))
|
||||
<< " to vertex " << vmap.FindIndex(TopExp::LastVertex (edge)) << endl;
|
||||
- rebuild->Remove(edge, false);
|
||||
+ rebuild->Remove(edge);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,13 +321,13 @@
|
||||
|
||||
|
||||
{
|
||||
@ -786,7 +932,14 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
rebuild->Apply(shape);
|
||||
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
||||
{
|
||||
@@ -438,7 +447,7 @@
|
||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||
if ( BRep_Tool::Degenerated(edge) )
|
||||
- rebuild->Remove(edge, false);
|
||||
+ rebuild->Remove(edge);
|
||||
}
|
||||
shape = rebuild->Apply(shape);
|
||||
}
|
||||
@@ -438,13 +447,13 @@
|
||||
|
||||
|
||||
{
|
||||
@ -795,24 +948,36 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
rebuild->Apply(shape);
|
||||
for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
|
||||
{
|
||||
@@ -483,7 +492,7 @@
|
||||
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
|
||||
if ( BRep_Tool::Degenerated(edge) )
|
||||
- rebuild->Remove(edge, false);
|
||||
+ rebuild->Remove(edge);
|
||||
}
|
||||
shape = rebuild->Apply(shape);
|
||||
}
|
||||
@@ -483,9 +492,9 @@
|
||||
TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
|
||||
TopoDS_Solid newsolid = solid;
|
||||
BRepLib::OrientClosedSolid (newsolid);
|
||||
- Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
||||
+ Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
||||
// rebuild->Apply(shape);
|
||||
rebuild->Replace(solid, newsolid, Standard_False);
|
||||
- rebuild->Replace(solid, newsolid, Standard_False);
|
||||
+ rebuild->Replace(solid, newsolid);
|
||||
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1);
|
||||
@@ -906,7 +915,7 @@
|
||||
// TopoDS_Shape newshape = rebuild->Apply(shape);
|
||||
shape = newshape;
|
||||
@@ -906,8 +915,8 @@
|
||||
TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
|
||||
TopoDS_Solid newsolid = solid;
|
||||
BRepLib::OrientClosedSolid (newsolid);
|
||||
- Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
|
||||
- rebuild->Replace(solid, newsolid, Standard_False);
|
||||
+ Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
|
||||
rebuild->Replace(solid, newsolid, Standard_False);
|
||||
+ rebuild->Replace(solid, newsolid);
|
||||
|
||||
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_SHAPE, 1);
|
||||
shape = newshape;
|
||||
@@ -951,25 +960,58 @@
|
||||
}
|
||||
|
||||
@ -854,6 +1019,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
- gp_Pnt2d suval = su->ValueOfUV ( pnt, BRep_Tool::Tolerance( TopoDS::Face(fmap(surfi)) ) );
|
||||
- suval.Coord( u, v);
|
||||
- pnt = thesurf->Value( u, v );
|
||||
-
|
||||
+ // -- Optimization: use cached projector and classifier
|
||||
+ // double u,v;
|
||||
+ // Handle( Geom_Surface ) thesurf = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
@ -865,7 +1031,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
+ Handle(ShapeAnalysis_Surface) proj;
|
||||
+ BRepTopAdaptor_FClass2d *cls;
|
||||
+ GetFaceTools(surfi, proj, cls);
|
||||
|
||||
+
|
||||
+ gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion());
|
||||
+ if (cls->Perform(p2d) == TopAbs_OUT)
|
||||
+ {
|
||||
@ -891,6 +1057,47 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
- if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;
|
||||
-
|
||||
- gp_Vec du, dv;
|
||||
-
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- int count = 0;
|
||||
-
|
||||
- gp_Pnt xold;
|
||||
- gp_Vec n;
|
||||
- double det, lambda, mu;
|
||||
-
|
||||
- do {
|
||||
- count++;
|
||||
-
|
||||
- n = du^dv;
|
||||
-
|
||||
- det = Det3 (n.X(), du.X(), dv.X(),
|
||||
- n.Y(), du.Y(), dv.Y(),
|
||||
- n.Z(), du.Z(), dv.Z());
|
||||
-
|
||||
- if (det < 1e-15) return false;
|
||||
-
|
||||
- lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
|
||||
- n.Y(), p.Y()-x.Y(), dv.Y(),
|
||||
- n.Z(), p.Z()-x.Z(), dv.Z())/det;
|
||||
-
|
||||
- mu = Det3 (n.X(), du.X(), p.X()-x.X(),
|
||||
- n.Y(), du.Y(), p.Y()-x.Y(),
|
||||
- n.Z(), du.Z(), p.Z()-x.Z())/det;
|
||||
-
|
||||
- u += lambda;
|
||||
- v += mu;
|
||||
-
|
||||
- xold = x;
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
|
||||
-
|
||||
- // (*testout) << "FastProject count: " << count << endl;
|
||||
-
|
||||
- if (count == 50) return false;
|
||||
-
|
||||
- ap = Point<3> (x.X(), x.Y(), x.Z());
|
||||
+ // -- Optimization: use cached projector and classifier
|
||||
+ // Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
|
||||
+ //
|
||||
@ -943,53 +1150,14 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
+ Handle(ShapeAnalysis_Surface) proj;
|
||||
+ BRepTopAdaptor_FClass2d *cls;
|
||||
+ GetFaceTools(surfi, proj, cls);
|
||||
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- int count = 0;
|
||||
-
|
||||
- gp_Pnt xold;
|
||||
- gp_Vec n;
|
||||
- double det, lambda, mu;
|
||||
-
|
||||
- do {
|
||||
- count++;
|
||||
-
|
||||
- n = du^dv;
|
||||
-
|
||||
- det = Det3 (n.X(), du.X(), dv.X(),
|
||||
- n.Y(), du.Y(), dv.Y(),
|
||||
- n.Z(), du.Z(), dv.Z());
|
||||
-
|
||||
- if (det < 1e-15) return false;
|
||||
-
|
||||
- lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
|
||||
- n.Y(), p.Y()-x.Y(), dv.Y(),
|
||||
- n.Z(), p.Z()-x.Z(), dv.Z())/det;
|
||||
-
|
||||
- mu = Det3 (n.X(), du.X(), p.X()-x.X(),
|
||||
- n.Y(), du.Y(), p.Y()-x.Y(),
|
||||
- n.Z(), du.Z(), p.Z()-x.Z())/det;
|
||||
-
|
||||
- u += lambda;
|
||||
- v += mu;
|
||||
-
|
||||
- xold = x;
|
||||
- surface->D1(u,v,x,du,dv);
|
||||
-
|
||||
- } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
|
||||
-
|
||||
- // (*testout) << "FastProject count: " << count << endl;
|
||||
-
|
||||
- if (count == 50) return false;
|
||||
+
|
||||
+ gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion());
|
||||
+ if (cls->Perform(p2d) == TopAbs_OUT)
|
||||
+ {
|
||||
+ //cout << "Projection fails" << endl;
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
- ap = Point<3> (x.X(), x.Y(), x.Z());
|
||||
+
|
||||
+ p = proj->Value(p2d);
|
||||
+ p2d.Coord(u, v);
|
||||
+ ap = Point<3> (p.X(), p.Y(), p.Z());
|
||||
@ -1065,9 +1233,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.cpp netgen-5.3.1_new/libsrc/oc
|
||||
occgeo->face_colours.Nullify();
|
||||
occgeo->changed = 1;
|
||||
occgeo->BuildFMap();
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.hpp netgen-5.3.1_new/libsrc/occ/occgeom.hpp
|
||||
--- netgen-5.3.1_orig/libsrc/occ/occgeom.hpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/occgeom.hpp 2016-09-29 14:44:01.996464598 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/occgeom.hpp netgen-5.3.1_SRC_modif/libsrc/occ/occgeom.hpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/occgeom.hpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/occgeom.hpp 2017-09-11 18:08:21.233311974 +0300
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "Geom_Curve.hxx"
|
||||
#include "Geom2d_Curve.hxx"
|
||||
@ -1162,9 +1330,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occgeom.hpp netgen-5.3.1_new/libsrc/oc
|
||||
OCCSurface GetSurface (int surfi)
|
||||
{
|
||||
cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsrc/occ/occmeshsurf.cpp
|
||||
--- netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/occmeshsurf.cpp 2016-09-29 14:08:00.045144560 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_SRC_modif/libsrc/occ/occmeshsurf.cpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/occmeshsurf.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/occmeshsurf.cpp 2017-09-11 18:08:21.233311974 +0300
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <meshing.hpp>
|
||||
#include <GeomLProp_SLProps.hxx>
|
||||
@ -1192,7 +1360,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsr
|
||||
if(glob_testout)
|
||||
{
|
||||
(*testout) << "u " << geominfo.u << " v " << geominfo.v
|
||||
@@ -434,23 +435,33 @@
|
||||
@@ -434,23 +438,33 @@
|
||||
|
||||
void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point<3> & p) const
|
||||
{
|
||||
@ -1235,7 +1403,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsr
|
||||
}
|
||||
|
||||
|
||||
@@ -680,7 +691,8 @@
|
||||
@@ -680,7 +694,8 @@
|
||||
if (!geometry.FastProject (surfi, hnewp, u, v))
|
||||
{
|
||||
// cout << "Fast projection to surface fails! Using OCC projection" << endl;
|
||||
@ -1245,7 +1413,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsr
|
||||
}
|
||||
|
||||
newgi.trignum = 1;
|
||||
@@ -689,7 +701,7 @@
|
||||
@@ -689,7 +704,7 @@
|
||||
}
|
||||
|
||||
newp = hnewp;
|
||||
@ -1254,7 +1422,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsr
|
||||
|
||||
|
||||
void OCCRefinementSurfaces ::
|
||||
@@ -708,14 +720,18 @@
|
||||
@@ -708,14 +723,18 @@
|
||||
hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
|
||||
newp = hnewp;
|
||||
newgi = ap1;
|
||||
@ -1276,7 +1444,7 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsr
|
||||
|
||||
void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) const
|
||||
{
|
||||
@@ -723,9 +739,10 @@
|
||||
@@ -723,9 +742,10 @@
|
||||
if (!geometry.FastProject (surfi, p, gi.u, gi.v))
|
||||
{
|
||||
cout << "Fast projection to surface fails! Using OCC projection" << endl;
|
||||
@ -1289,9 +1457,21 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/occmeshsurf.cpp netgen-5.3.1_new/libsr
|
||||
|
||||
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/libsrc/occ/utilities.h netgen-5.3.1_new/libsrc/occ/utilities.h
|
||||
--- netgen-5.3.1_orig/libsrc/occ/utilities.h 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/utilities.h 2016-09-29 14:04:51.504148314 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/occpkg.cpp netgen-5.3.1_SRC_modif/libsrc/occ/occpkg.cpp
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/occpkg.cpp 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/occpkg.cpp 2017-09-11 18:08:32.837057913 +0300
|
||||
@@ -485,7 +485,7 @@
|
||||
if (strcmp (argv[2], "Wire") == 0) sh = occgeometry->wmap(nr);
|
||||
if (strcmp (argv[2], "Edge") == 0) sh = occgeometry->emap(nr);
|
||||
|
||||
- rebuild->Replace(sh, sh.Reversed(), Standard_False);
|
||||
+ rebuild->Replace(sh, sh.Reversed());
|
||||
|
||||
TopoDS_Shape newshape = rebuild->Apply(occgeometry->shape, TopAbs_SHELL, 1);
|
||||
occgeometry->shape = newshape;
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/occ/utilities.h netgen-5.3.1_SRC_modif/libsrc/occ/utilities.h
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/occ/utilities.h 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/occ/utilities.h 2017-09-11 18:08:21.233311974 +0300
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
@ -1300,126 +1480,9 @@ diff -NaurwB netgen-5.3.1_orig/libsrc/occ/utilities.h netgen-5.3.1_new/libsrc/oc
|
||||
#include <cstdlib>
|
||||
// #include "SALOME_Log.hxx"
|
||||
|
||||
diff -NaurwB netgen-5.3.1_orig/nglib/nglib.h netgen-5.3.1_new/nglib/nglib.h
|
||||
--- netgen-5.3.1_orig/nglib/nglib.h 2014-08-29 13:54:00.000000000 +0400
|
||||
+++ netgen-5.3.1_new/nglib/nglib.h 2016-09-29 14:04:51.504148314 +0300
|
||||
@@ -24,7 +24,7 @@
|
||||
// Philippose - 14.02.2009
|
||||
// Modifications for creating a DLL in Windows
|
||||
#ifdef WIN32
|
||||
- #ifdef NGLIB_EXPORTS || nglib_EXPORTS
|
||||
+ #if defined NGLIB_EXPORTS || defined nglib_EXPORTS
|
||||
#define DLL_HEADER __declspec(dllexport)
|
||||
#else
|
||||
#define DLL_HEADER __declspec(dllimport)
|
||||
diff -Naur netgen-5.3.1_orig/libsrc/csg/Makefile.am netgen-5.3.1_new/libsrc/csg/Makefile.am
|
||||
--- netgen-5.3.1_orig/libsrc/csg/Makefile.am 2014-08-29 13:54:06.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/csg/Makefile.am 2016-11-08 17:48:02.000000000 +0300
|
||||
@@ -8,7 +8,7 @@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libcsg.la
|
||||
+noinst_LTLIBRARIES = libcsg.la
|
||||
|
||||
|
||||
libcsg_la_SOURCES = algprim.cpp brick.cpp \
|
||||
@@ -17,12 +17,9 @@
|
||||
manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp \
|
||||
solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp
|
||||
|
||||
-libcsg_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
-
|
||||
-
|
||||
|
||||
if NGGUI
|
||||
-lib_LTLIBRARIES += libcsgvis.la
|
||||
+lib_LTLIBRARIES = libcsgvis.la
|
||||
|
||||
libcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
|
||||
libcsgvis_la_LIBADD = libcsg.la
|
||||
diff -Naur netgen-5.3.1_orig/libsrc/geom2d/Makefile.am netgen-5.3.1_new/libsrc/geom2d/Makefile.am
|
||||
--- netgen-5.3.1_orig/libsrc/geom2d/Makefile.am 2014-08-29 13:54:06.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/geom2d/Makefile.am 2016-11-08 17:49:13.000000000 +0300
|
||||
@@ -4,16 +4,15 @@
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libgeom2d.la
|
||||
+noinst_LTLIBRARIES = libgeom2d.la
|
||||
|
||||
if NGGUI
|
||||
-lib_LTLIBRARIES += libgeom2dvis.la
|
||||
+lib_LTLIBRARIES = libgeom2dvis.la
|
||||
endif
|
||||
|
||||
|
||||
|
||||
libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
|
||||
-libgeom2d_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
|
||||
libgeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp
|
||||
libgeom2dvis_la_LIBADD = libgeom2d.la
|
||||
diff -Naur netgen-5.3.1_orig/libsrc/interface/Makefile.am netgen-5.3.1_new/libsrc/interface/Makefile.am
|
||||
--- netgen-5.3.1_orig/libsrc/interface/Makefile.am 2014-08-29 13:54:02.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/interface/Makefile.am 2016-11-08 17:49:26.000000000 +0300
|
||||
@@ -2,14 +2,11 @@
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface $(MPI_INCLUDES) $(TCL_INCLUDES) -DOPENGL
|
||||
METASOURCES = AUTO
|
||||
-lib_LTLIBRARIES = libinterface.la
|
||||
+noinst_LTLIBRARIES = libinterface.la
|
||||
libinterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
|
||||
read_fnf_mesh.cpp readtetmesh.cpp readuser.cpp writeabaqus.cpp writediffpack.cpp \
|
||||
writedolfin.cpp writeelmer.cpp writefeap.cpp writefluent.cpp writegmsh.cpp writejcm.cpp \
|
||||
writepermas.cpp writetecplot.cpp writetet.cpp writetochnog.cpp writeuser.cpp \
|
||||
wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp
|
||||
|
||||
-
|
||||
-libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
-
|
||||
# libinterface_la_LDFLAGS = -rdynamic
|
||||
diff -Naur netgen-5.3.1_orig/libsrc/meshing/Makefile.am netgen-5.3.1_new/libsrc/meshing/Makefile.am
|
||||
--- netgen-5.3.1_orig/libsrc/meshing/Makefile.am 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/meshing/Makefile.am 2016-11-08 17:48:44.000000000 +0300
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libmesh.la
|
||||
+noinst_LTLIBRARIES = libmesh.la
|
||||
|
||||
libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
|
||||
clusters.cpp curvedelems.cpp delaunay.cpp delaunay2d.cpp \
|
||||
@@ -30,8 +30,5 @@
|
||||
topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp \
|
||||
parallelmesh.cpp paralleltop.cpp paralleltop.hpp basegeom.cpp
|
||||
|
||||
-libmesh_la_LIBADD = $(top_builddir)/libsrc/linalg/libla.la \
|
||||
- $(top_builddir)/libsrc/gprim/libgprim.la \
|
||||
- $(top_builddir)/libsrc/general/libgen.la \
|
||||
- -lz
|
||||
+libmesh_la_LIBADD = -lz
|
||||
|
||||
diff -Naur netgen-5.3.1_orig/libsrc/occ/Makefile.am netgen-5.3.1_new/libsrc/occ/Makefile.am
|
||||
--- netgen-5.3.1_orig/libsrc/occ/Makefile.am 2014-08-29 13:54:03.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/occ/Makefile.am 2016-11-08 17:30:53.000000000 +0300
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
-lib_LTLIBRARIES = libocc.la
|
||||
+noinst_LTLIBRARIES = libocc.la
|
||||
|
||||
if NGGUI
|
||||
-lib_LTLIBRARIES += liboccvis.la
|
||||
+lib_LTLIBRARIES = liboccvis.la
|
||||
endif
|
||||
|
||||
|
||||
diff -Naur netgen-5.3.1_orig/libsrc/stlgeom/Makefile.am netgen-5.3.1_new/libsrc/stlgeom/Makefile.am
|
||||
--- netgen-5.3.1_orig/libsrc/stlgeom/Makefile.am 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_new/libsrc/stlgeom/Makefile.am 2016-11-08 18:28:09.000000000 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/libsrc/stlgeom/Makefile.am netgen-5.3.1_SRC_modif/libsrc/stlgeom/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/libsrc/stlgeom/Makefile.am 2014-08-29 13:54:05.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/libsrc/stlgeom/Makefile.am 2017-09-11 18:08:21.235311757 +0300
|
||||
@@ -4,10 +4,10 @@
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
|
||||
METASOURCES = AUTO
|
||||
@ -1440,9 +1503,9 @@ diff -Naur netgen-5.3.1_orig/libsrc/stlgeom/Makefile.am netgen-5.3.1_new/libsrc/
|
||||
-libstl_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
|
||||
# libstlvis_la_LIBADD = libstl.la $(top_builddir)/libsrc/linalg/libla.la
|
||||
|
||||
diff -Naur netgen-5.3.1_orig/nglib/Makefile.am netgen-5.3.1_new/nglib/Makefile.am
|
||||
--- netgen-5.3.1_orig/nglib/Makefile.am 2014-08-29 13:54:00.000000000 +0400
|
||||
+++ netgen-5.3.1_new/nglib/Makefile.am 2016-11-08 19:01:17.000000000 +0300
|
||||
diff -Naur netgen-5.3.1_SRC_orig/nglib/Makefile.am netgen-5.3.1_SRC_modif/nglib/Makefile.am
|
||||
--- netgen-5.3.1_SRC_orig/nglib/Makefile.am 2014-08-29 13:54:00.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/nglib/Makefile.am 2017-09-11 18:08:21.235311757 +0300
|
||||
@@ -14,6 +14,9 @@
|
||||
$(top_builddir)/libsrc/stlgeom/libstl.la \
|
||||
$(top_builddir)/libsrc/occ/libocc.la \
|
||||
@ -1453,3 +1516,15 @@ diff -Naur netgen-5.3.1_orig/nglib/Makefile.am netgen-5.3.1_new/nglib/Makefile.a
|
||||
$(OCCLIBS) $(MPI_LIBS)
|
||||
|
||||
libnglib_la_LDFLAGS = -avoid-version
|
||||
diff -Naur netgen-5.3.1_SRC_orig/nglib/nglib.h netgen-5.3.1_SRC_modif/nglib/nglib.h
|
||||
--- netgen-5.3.1_SRC_orig/nglib/nglib.h 2014-08-29 13:54:00.000000000 +0400
|
||||
+++ netgen-5.3.1_SRC_modif/nglib/nglib.h 2017-09-11 18:08:21.233311974 +0300
|
||||
@@ -24,7 +24,7 @@
|
||||
// Philippose - 14.02.2009
|
||||
// Modifications for creating a DLL in Windows
|
||||
#ifdef WIN32
|
||||
- #ifdef NGLIB_EXPORTS || nglib_EXPORTS
|
||||
+ #if defined NGLIB_EXPORTS || defined nglib_EXPORTS
|
||||
#define DLL_HEADER __declspec(dllexport)
|
||||
#else
|
||||
#define DLL_HEADER __declspec(dllimport)
|
||||
|
@ -1,39 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
src_dir=$1
|
||||
install_dir=$2
|
||||
src_dir=${1}
|
||||
install_dir=${2}
|
||||
|
||||
if ! test -d $src_dir/libsrc ; then
|
||||
echo "No dir $src_dir/libsrc ... Bye"
|
||||
if ! test -d ${src_dir}/libsrc ; then
|
||||
echo "No dir ${src_dir}/libsrc ... Bye"
|
||||
exit 1
|
||||
fi
|
||||
if ! test -d $install_dir/share/netgen ; then
|
||||
echo "No dir $install_dir/share/netgen ... Bye"
|
||||
if ! test -d ${install_dir} ; then
|
||||
echo "No dir ${install_dir} ... Bye"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dest_dir=$install_dir/share/netgen/include
|
||||
mkdir -p $dest_dir > /dev/null 2>&1
|
||||
cp -af $src_dir/libsrc/csg/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/general/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/geom2d/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/gprim/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/interface/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/linalg/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/meshing/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/stlgeom/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/visualization/*.hpp $dest_dir
|
||||
dest_dir=${install_dir}/include
|
||||
mkdir -p ${dest_dir} > /dev/null 2>&1
|
||||
|
||||
cp -af $src_dir/libsrc/occ/*.hpp $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.hxx $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.ixx $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.jxx $dest_dir
|
||||
cp -af $src_dir/libsrc/occ/*.h $dest_dir
|
||||
|
||||
cp -af $src_dir/libsrc/include/mystdlib.h $dest_dir
|
||||
cp -af $src_dir/libsrc/include/mydefs.hpp $dest_dir
|
||||
# cp -af $src_dir/libsrc/include/parallel.hpp $dest_dir
|
||||
|
||||
rm -f $dest_dir/ngexception.hpp
|
||||
rm -f $dest_dir/paralleltop.hpp
|
||||
rm -f $dest_dir/soldata.hpp
|
||||
for directory in csg general geom2d gprim interface linalg meshing stlgeom visualization
|
||||
do
|
||||
cp -af ${src_dir}/libsrc/${directory}/*.hpp ${dest_dir}
|
||||
done
|
||||
cp -af ${src_dir}/libsrc/include/mystdlib.h ${dest_dir}
|
||||
cp -af ${src_dir}/libsrc/include/mydefs.hpp ${dest_dir}
|
||||
cp -af ${src_dir}/libsrc/occ/occgeom.hpp ${dest_dir}
|
||||
cp -af ${src_dir}/libsrc/occ/occmeshsurf.hpp ${dest_dir}
|
||||
cp -af ${src_dir}/libsrc/general/gzstream.h ${dest_dir}
|
||||
test -f ${src_dir}/config.h && cp -af ${src_dir}/config.h ${dest_dir}
|
||||
|
Loading…
Reference in New Issue
Block a user