Merge branch 'looo_patches' into 'master'

Patches by looooo

See merge request jschoeberl/netgen!74
This commit is contained in:
Matthias Hochsteger 2018-01-23 12:31:05 +01:00
commit 02dbd45759
8 changed files with 26 additions and 22 deletions

View File

@ -2,7 +2,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING INTERNAL)
endif(NOT CMAKE_BUILD_TYPE)
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.1.3)
if(NOT WIN32)
option( USE_NATIVE_ARCH "build which -march=native" ON)
endif(NOT WIN32)
@ -204,6 +204,7 @@ macro(get_dll_from_lib dll_path lib_path)
get_filename_component(lib_name ${lib} name)
endmacro()
set(CMAKE_CXX_STANDARD 14)
if(WIN32)
get_WIN32_WINNT(ver)
add_definitions(-D_WIN32_WINNT=${ver} -DWNT -DWNT_WINDOW -DNOMINMAX)
@ -215,7 +216,6 @@ if(WIN32)
else(WIN32)
# build shared libraries
set(NG_LIB_TYPE SHARED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif(WIN32)
if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")

View File

@ -1,4 +1,4 @@
install(FILES nginterface.h nginterface_v2.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel)
install(FILES nginterface.h nginterface_v2.hpp mydefs.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel)
install(FILES
acisgeom.hpp csg.hpp geometry2d.hpp gprim.hpp incopengl.hpp

View File

@ -349,7 +349,7 @@ namespace netgen
void SetDimension (int dim) { dimension = dim; }
/// sets internal tables
void CalcSurfacesOfNode ();
DLL_HEADER void CalcSurfacesOfNode ();
/// additional (temporarily) fix points
void FixPoints (const BitArray & fixpoints);

View File

@ -383,13 +383,13 @@ namespace netgen
Element2d & operator= (const Element2d &) = default;
Element2d & operator= (Element2d &&) = default;
///
Element2d (int anp);
DLL_HEADER Element2d (int anp);
///
DLL_HEADER Element2d (ELEMENT_TYPE type);
///
Element2d (int pi1, int pi2, int pi3);
DLL_HEADER Element2d (int pi1, int pi2, int pi3);
///
Element2d (int pi1, int pi2, int pi3, int pi4);
DLL_HEADER Element2d (int pi1, int pi2, int pi3, int pi4);
///
ELEMENT_TYPE GetType () const { return typ; }
///

View File

@ -26,9 +26,12 @@
#endif
#if OCC_VERSION_HEX < 0x070000
#else
// pass
#elif OCC_VERSION_HEX < 0x070200
#include "StlTransfer.hxx"
#include "TopoDS_Iterator.hxx"
#else
#include "TopoDS_Iterator.hxx"
#endif
namespace netgen
@ -170,7 +173,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
{
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
if ( BRep_Tool::Degenerated(edge) )
rebuild->Remove(edge, false);
rebuild->Remove(edge);
}
shape = rebuild->Apply(shape);
}
@ -239,7 +242,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
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
@ -258,7 +261,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
{
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
if ( BRep_Tool::Degenerated(edge) )
rebuild->Remove(edge, false);
rebuild->Remove(edge);
}
shape = rebuild->Apply(shape);
}
@ -322,7 +325,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
if(replace)
{
TopoDS_Wire newwire = sfw->Wire();
rebuild->Replace(oldwire, newwire, Standard_False);
rebuild->Replace(oldwire, newwire);
}
//delete sfw; sfw = NULL;
@ -352,7 +355,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
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);
}
}
}
@ -370,7 +373,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
{
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
if ( BRep_Tool::Degenerated(edge) )
rebuild->Remove(edge, false);
rebuild->Remove(edge);
}
shape = rebuild->Apply(shape);
}
@ -496,7 +499,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
{
TopoDS_Edge edge = TopoDS::Edge(exp1.Current());
if ( BRep_Tool::Degenerated(edge) )
rebuild->Remove(edge, false);
rebuild->Remove(edge);
}
shape = rebuild->Apply(shape);
}
@ -537,7 +540,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
BRepLib::OrientClosedSolid (newsolid);
Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
// rebuild->Apply(shape);
rebuild->Replace(solid, newsolid, Standard_False);
rebuild->Replace(solid, newsolid);
TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1);
// TopoDS_Shape newshape = rebuild->Apply(shape);
shape = newshape;
@ -959,7 +962,7 @@ void STEP_GetEntityName(const TopoDS_Shape & theShape, STEPCAFControl_Reader * a
TopoDS_Solid newsolid = solid;
BRepLib::OrientClosedSolid (newsolid);
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;

View File

@ -244,7 +244,7 @@ namespace netgen
}
virtual void Save (string filename) const;
DLL_HEADER virtual void Save (string filename) const;
DLL_HEADER void BuildFMap();
@ -275,7 +275,7 @@ namespace netgen
return OCCSurface (TopoDS::Face(fmap(surfi)), PLANESPACE);
}
void CalcBoundingBox ();
DLL_HEADER void CalcBoundingBox ();
DLL_HEADER void BuildVisualizationMesh (double deflection);
void RecursiveTopologyTree (const TopoDS_Shape & sh,
@ -440,7 +440,7 @@ namespace netgen
// Philippose - 31.09.2009
// External access to the mesh generation functions within the OCC
// subsystem (Not sure if this is the best way to implement this....!!)
extern int OCCGenerateMesh (OCCGeometry & occgeometry, shared_ptr<Mesh> & mesh,
DLL_HEADER extern int OCCGenerateMesh (OCCGeometry & occgeometry, shared_ptr<Mesh> & mesh,
MeshingParameters & mparam);
DLL_HEADER extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh);

View File

@ -4,6 +4,7 @@
#define FILE_OCCMESHSURF
#include "occgeom.hpp"
#include "mydefs.hpp"
#define PARAMETERSPACE -1
#define PLANESPACE 1
@ -169,7 +170,7 @@ public:
class OCCGeometry;
class OCCRefinementSurfaces : public Refinement
class DLL_HEADER OCCRefinementSurfaces : public Refinement
{
const OCCGeometry & geometry;

View File

@ -43,4 +43,4 @@ if(USE_PYTHON)
endif(USE_PYTHON)
install(TARGETS nglib ${NG_INSTALL_DIR})
install(FILES nglib.h DESTINATION ${NG_INSTALL_DIR_INCLUDE}/include COMPONENT netgen_devel)
install(FILES nglib.h DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel)