mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
occ as shared lib
This commit is contained in:
parent
f31ac31e1d
commit
1b4c7be876
@ -14,7 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(OCCFLAGS) $(TCL_INCLUDES)
|
||||
|
||||
METASOURCES = AUTO
|
||||
|
||||
noinst_LTLIBRARIES = libocc.la liboccvis.la
|
||||
lib_LTLIBRARIES = libocc.la liboccvis.la
|
||||
|
||||
libocc_la_SOURCES = Partition_Inter2d.cxx Partition_Inter3d.cxx \
|
||||
Partition_Loop.cxx Partition_Loop2d.cxx Partition_Loop3d.cxx Partition_Spliter.cxx \
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "vsocc.hpp"
|
||||
|
||||
|
||||
extern "C" int Ng_OCC_Init (Tcl_Interp * interp);
|
||||
extern "C" int Ng_occ_Init (Tcl_Interp * interp);
|
||||
|
||||
|
||||
|
||||
@ -958,7 +958,7 @@ namespace netgen
|
||||
|
||||
using namespace netgen;
|
||||
|
||||
int Ng_OCC_Init (Tcl_Interp * interp)
|
||||
int Ng_occ_Init (Tcl_Interp * interp)
|
||||
{
|
||||
geometryregister.Append (new OCCGeometryRegister);
|
||||
|
||||
|
@ -16,11 +16,6 @@
|
||||
.ngmenu.geometry add command -label "CSG Properties..." \
|
||||
-command topleveldialog2
|
||||
|
||||
.ngmenu.geometry add separator
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -62,9 +62,11 @@ menu .ngmenu.file
|
||||
set dirname [file dirname $file]
|
||||
set basefilename [file tail [file rootname $file]]
|
||||
|
||||
if { $hasocc == "yes" } {
|
||||
rebuildoccdialog
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
11
ng/ng.tcl
11
ng/ng.tcl
@ -12,6 +12,8 @@ if {[catch {package require Tix } result ]} {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# userlevel 1..standard user 2..power-user 3..developer
|
||||
|
||||
set userlevel 3
|
||||
@ -84,7 +86,10 @@ catch {
|
||||
|
||||
source ${ngdir}/csgeom.tcl
|
||||
source ${ngdir}/stlgeom.tcl
|
||||
source ${ngdir}/occgeom.tcl
|
||||
|
||||
set hasocc no
|
||||
catch { source ${ngdir}/occgeom.tcl }
|
||||
|
||||
source ${ngdir}/acisgeom.tcl
|
||||
|
||||
|
||||
@ -118,10 +123,12 @@ Ng_SetVisParameters
|
||||
Ng_SetDebugParameters
|
||||
Ng_STLDoctor
|
||||
Ng_GeometryOptions set
|
||||
catch {
|
||||
|
||||
if { $hasocc == "yes" } {
|
||||
Ng_SetOCCVisParameters
|
||||
}
|
||||
|
||||
|
||||
if { $batchmode != "defined" } {
|
||||
catch {
|
||||
wm protocol . WM_DELETE_WINDOW { .ngmenu.file invoke "Quit" }
|
||||
|
10
ng/ngpkg.cpp
10
ng/ngpkg.cpp
@ -3074,7 +3074,11 @@ namespace netgen
|
||||
extern "C" int Ng_Init (Tcl_Interp * interp);
|
||||
extern "C" int Ng_CSG_Init (Tcl_Interp * interp);
|
||||
extern "C" int Ng_STL_Init (Tcl_Interp * interp);
|
||||
extern "C" int Ng_OCC_Init (Tcl_Interp * interp);
|
||||
|
||||
#ifdef OCCGEOMETRY
|
||||
// extern "C" int Ng_occ_Init (Tcl_Interp * interp);
|
||||
#endif
|
||||
|
||||
extern "C" int Ng_Geom2d_Init (Tcl_Interp * interp);
|
||||
|
||||
// int main_Eero (ClientData clientData,
|
||||
@ -3091,9 +3095,11 @@ namespace netgen
|
||||
|
||||
Ng_CSG_Init(interp);
|
||||
Ng_STL_Init(interp);
|
||||
|
||||
#ifdef OCCGEOMETRY
|
||||
Ng_OCC_Init(interp);
|
||||
// Ng_occ_Init(interp);
|
||||
#endif
|
||||
|
||||
Ng_Geom2d_Init(interp);
|
||||
|
||||
tcl_interp = interp;
|
||||
|
@ -1,8 +1,18 @@
|
||||
if { [catch { load liboccvis[info sharedlibextension] Ng_OCC } result ] } {
|
||||
# puts "cannot load occ"
|
||||
# puts "error: $result"
|
||||
} {
|
||||
puts "OCC module loaded"
|
||||
set hasocc yes
|
||||
}
|
||||
|
||||
|
||||
.ngmenu.geometry add separator
|
||||
|
||||
.ngmenu.geometry add command -label "IGES/STEP Topology Explorer/Doctor..." \
|
||||
-command { occdialog; }
|
||||
|
||||
|
||||
|
||||
# Philippose - 30/01/2009
|
||||
# Add menu item for local face mesh size definition in the
|
||||
# TCL Gui
|
||||
|
@ -1,3 +1,5 @@
|
||||
.ngmenu.geometry add separator
|
||||
|
||||
.ngmenu.geometry add command -label "STL Doctor..." \
|
||||
-command { stldoctordialog; }
|
||||
|
||||
@ -17,4 +19,3 @@
|
||||
tk_messageBox -title "STL Info" -message $msgtext -type ok
|
||||
}
|
||||
|
||||
.ngmenu.geometry add separator
|
||||
|
Loading…
Reference in New Issue
Block a user