mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
Merge branch 'installers_with_occt_740' into 'master'
Build and test with OCCT 7.4.0 on Windows and MacOS See merge request jschoeberl/netgen!288
This commit is contained in:
commit
656c8fa29d
@ -56,6 +56,9 @@ build_win:
|
||||
-G Ninja
|
||||
-DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%
|
||||
-DUSE_OCC=ON
|
||||
-DOCC_LIBRARY=C:/install_opencascade_7.4.0_static/win64/vc14/lib/TKernel.lib
|
||||
-DOCC_INCLUDE_DIR=C:/install_opencascade_7.4.0_static/inc
|
||||
-DOCC_LINK_FREETYPE=ON
|
||||
-DUSE_CCACHE=ON
|
||||
-DENABLE_UNIT_TESTS=ON
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
@ -239,6 +242,10 @@ build_mac:
|
||||
-DENABLE_UNIT_TESTS=ON
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
|
||||
-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
|
||||
-DUSE_OCC=ON
|
||||
-DOCC_LIBRARY=/usr/local/opt/opencascade-7.4.0/lib/libTKernel.a
|
||||
-DOCC_INCLUDE_DIR=/usr/local/opt/opencascade-7.4.0/include/opencascade
|
||||
-DOCC_LINK_FREETYPE=ON
|
||||
- make -j5 install
|
||||
|
||||
test_mac:
|
||||
|
@ -74,12 +74,17 @@ set(OCC_LIBRARY_NAMES
|
||||
TKSTL
|
||||
TKTopAlgo
|
||||
TKV3d
|
||||
TKVCAF
|
||||
TKXCAF
|
||||
TKXDEIGES
|
||||
TKXDESTEP
|
||||
TKXSBase
|
||||
)
|
||||
|
||||
if(OCC_LINK_FREETYPE)
|
||||
set(OCC_LIBRARY_NAMES ${OCC_LIBRARY_NAMES} freetype)
|
||||
endif(OCC_LINK_FREETYPE)
|
||||
|
||||
foreach( libname ${OCC_LIBRARY_NAMES} )
|
||||
find_library( ${libname} ${libname} ${OCC_LIBRARY_DIR} )
|
||||
set(OCC_LIBRARIES ${OCC_LIBRARIES} ${${libname}})
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <meshing.hpp>
|
||||
#include <occgeom.hpp>
|
||||
#include <Standard_Version.hxx>
|
||||
|
||||
using namespace netgen;
|
||||
|
||||
@ -57,6 +58,7 @@ void CreateOCCParametersFromKwargs(OCCParameters& occparam, py::dict kwargs)
|
||||
|
||||
DLL_HEADER void ExportNgOCC(py::module &m)
|
||||
{
|
||||
m.attr("occ_version") = OCC_VERSION_COMPLETE;
|
||||
py::class_<OCCGeometry, shared_ptr<OCCGeometry>, NetgenGeometry> (m, "OCCGeometry", R"raw_string(Use LoadOCCGeometry to load the geometry from a *.step file.)raw_string")
|
||||
.def(py::init<>())
|
||||
.def(py::init([] (const string& filename)
|
||||
|
@ -1,5 +1,5 @@
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:19.10
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
MAINTAINER Matthias Hochsteger <matthias.hochsteger@tuwien.ac.at>
|
||||
RUN apt-get update && apt-get -y install python3 libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk clang-tidy python3-distutils clang liboce-ocaf-dev
|
||||
RUN apt-get update && apt-get -y install python3 libpython3-dev libxmu-dev tk-dev tcl-dev cmake git g++ libglu1-mesa-dev ccache python3-pytest python3-numpy python3-tk clang-tidy python3-distutils clang libocct-data-exchange-dev
|
||||
ADD . /root/src/netgen
|
||||
|
@ -1367,18 +1367,18 @@
|
||||
"frame.step": [
|
||||
{
|
||||
"angles_tet": [
|
||||
2.4313,
|
||||
2.683,
|
||||
169.75
|
||||
],
|
||||
"angles_trig": [
|
||||
1.7007,
|
||||
160.42
|
||||
1.845,
|
||||
158.55
|
||||
],
|
||||
"ne1d": 12694,
|
||||
"ne2d": 40504,
|
||||
"ne3d": 217246,
|
||||
"quality_histogram": "[1, 6, 8, 8, 16, 37, 106, 300, 948, 2218, 4792, 9112, 16087, 24307, 31406, 36515, 36658, 30414, 19320, 4987]",
|
||||
"total_badness": 290676.80791
|
||||
"ne1d": 12598,
|
||||
"ne2d": 39662,
|
||||
"ne3d": 203027,
|
||||
"quality_histogram": "[2, 10, 6, 6, 13, 45, 110, 311, 897, 2099, 4379, 8358, 14738, 22840, 29701, 33857, 34077, 28609, 18092, 4877]",
|
||||
"total_badness": 271598.85365
|
||||
},
|
||||
{
|
||||
"angles_tet": [
|
||||
@ -1386,29 +1386,29 @@
|
||||
175.61
|
||||
],
|
||||
"angles_trig": [
|
||||
2.0087,
|
||||
1.8443,
|
||||
175.57
|
||||
],
|
||||
"ne1d": 6026,
|
||||
"ne2d": 11450,
|
||||
"ne3d": 30727,
|
||||
"quality_histogram": "[3, 4, 6, 14, 20, 56, 153, 286, 812, 1099, 1712, 2719, 3278, 4078, 4527, 4307, 3435, 2514, 1371, 333]",
|
||||
"total_badness": 45935.705192
|
||||
"ne1d": 5988,
|
||||
"ne2d": 11102,
|
||||
"ne3d": 29340,
|
||||
"quality_histogram": "[3, 4, 6, 12, 26, 44, 133, 247, 705, 1030, 1583, 2493, 3121, 3932, 4273, 4235, 3375, 2438, 1373, 307]",
|
||||
"total_badness": 43614.304159
|
||||
},
|
||||
{
|
||||
"angles_tet": [
|
||||
2.1887,
|
||||
2.1668,
|
||||
174.11
|
||||
],
|
||||
"angles_trig": [
|
||||
1.6035,
|
||||
2.2053,
|
||||
174.13
|
||||
],
|
||||
"ne1d": 9704,
|
||||
"ne2d": 24550,
|
||||
"ne3d": 95379,
|
||||
"quality_histogram": "[2, 15, 20, 121, 363, 1069, 2161, 3193, 4233, 5543, 7043, 8842, 10552, 11486, 11430, 10400, 8432, 6101, 3489, 884]",
|
||||
"total_badness": 157041.94225
|
||||
"ne1d": 9622,
|
||||
"ne2d": 23964,
|
||||
"ne3d": 80802,
|
||||
"quality_histogram": "[1, 16, 2, 18, 17, 39, 99, 230, 517, 1077, 2406, 4571, 7482, 10360, 12598, 13191, 11859, 9163, 5737, 1419]",
|
||||
"total_badness": 111718.91178
|
||||
}
|
||||
],
|
||||
"hinge.stl": [
|
||||
@ -2291,48 +2291,48 @@
|
||||
"screw.step": [
|
||||
{
|
||||
"angles_tet": [
|
||||
18.3,
|
||||
145.57
|
||||
17.543,
|
||||
147.55
|
||||
],
|
||||
"angles_trig": [
|
||||
15.767,
|
||||
17.516,
|
||||
140.59
|
||||
],
|
||||
"ne1d": 400,
|
||||
"ne2d": 1432,
|
||||
"ne3d": 2431,
|
||||
"quality_histogram": "[0, 0, 0, 0, 0, 4, 17, 63, 85, 162, 159, 233, 285, 296, 294, 267, 241, 197, 111, 17]",
|
||||
"total_badness": 3781.3195561
|
||||
"ne2d": 1436,
|
||||
"ne3d": 2409,
|
||||
"quality_histogram": "[0, 0, 0, 0, 0, 3, 18, 65, 91, 197, 205, 271, 295, 257, 282, 272, 183, 164, 90, 16]",
|
||||
"total_badness": 3840.0858333
|
||||
},
|
||||
{
|
||||
"angles_tet": [
|
||||
16.908,
|
||||
143.17
|
||||
16.035,
|
||||
146.84
|
||||
],
|
||||
"angles_trig": [
|
||||
17.733,
|
||||
126.93
|
||||
15.569,
|
||||
126.67
|
||||
],
|
||||
"ne1d": 530,
|
||||
"ne2d": 2718,
|
||||
"ne3d": 8005,
|
||||
"quality_histogram": "[0, 0, 0, 0, 1, 2, 5, 16, 40, 69, 152, 242, 464, 718, 1021, 1325, 1422, 1385, 893, 250]",
|
||||
"total_badness": 10469.297341
|
||||
"ne1d": 528,
|
||||
"ne2d": 2792,
|
||||
"ne3d": 8178,
|
||||
"quality_histogram": "[0, 0, 0, 0, 0, 2, 6, 14, 37, 95, 180, 281, 525, 801, 1072, 1331, 1488, 1289, 801, 256]",
|
||||
"total_badness": 10803.963539
|
||||
},
|
||||
{
|
||||
"angles_tet": [
|
||||
16.801,
|
||||
151.58
|
||||
17.002,
|
||||
149.0
|
||||
],
|
||||
"angles_trig": [
|
||||
14.994,
|
||||
127.34
|
||||
15.019,
|
||||
124.53
|
||||
],
|
||||
"ne1d": 668,
|
||||
"ne2d": 5002,
|
||||
"ne3d": 31806,
|
||||
"quality_histogram": "[0, 0, 0, 0, 0, 2, 0, 4, 14, 32, 119, 295, 705, 1638, 3204, 5122, 6933, 7051, 5138, 1549]",
|
||||
"total_badness": 39034.593795
|
||||
"ne1d": 666,
|
||||
"ne2d": 4922,
|
||||
"ne3d": 31518,
|
||||
"quality_histogram": "[0, 0, 0, 0, 0, 0, 1, 6, 9, 37, 95, 305, 701, 1673, 3213, 4989, 6771, 6963, 5176, 1579]",
|
||||
"total_badness": 38669.36435
|
||||
}
|
||||
],
|
||||
"sculpture.geo": [
|
||||
|
@ -8,7 +8,7 @@ from pyngcore import TaskManager
|
||||
import json
|
||||
try:
|
||||
import netgen.occ as occ
|
||||
has_occ = True
|
||||
has_occ = occ.occ_version >= "7.4.0"
|
||||
except ImportError:
|
||||
has_occ = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user