mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
Merge branch 'looo_patches' into 'master'
Patches by looooo See merge request jschoeberl/netgen!74
This commit is contained in:
commit
02dbd45759
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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; }
|
||||
///
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user