2014-10-02 12:29:55 +00:00
|
|
|
from netgen import __platform
|
|
|
|
if __platform.startswith('linux') or __platform.startswith('darwin'):
|
2014-10-02 11:10:40 +00:00
|
|
|
# Linux or Mac OS X
|
2014-10-01 10:31:22 +00:00
|
|
|
from libcsg.csg import *
|
2014-10-10 11:18:51 +00:00
|
|
|
import libcsgvis.csgvis as csgvis
|
|
|
|
from libcsgvis.csgvis import MouseMove
|
2015-07-29 20:39:04 +02:00
|
|
|
from libmesh.meshing import *
|
2014-10-02 12:29:55 +00:00
|
|
|
if __platform.startswith('win'):
|
2014-10-01 10:31:22 +00:00
|
|
|
# Windows
|
|
|
|
from nglib.csg import *
|
2014-10-13 10:25:31 +00:00
|
|
|
import nglib.csgvis as csgvis
|
|
|
|
from nglib.csgvis import MouseMove
|
2014-10-01 10:31:22 +00:00
|
|
|
from nglib.meshing import *
|
2014-10-10 11:18:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
CSGeometry.VS = csgvis.VS
|
2015-08-31 17:45:34 -04:00
|
|
|
SetBackGroundColor = csgvis.SetBackGroundColor
|
2014-10-10 11:18:51 +00:00
|
|
|
del csgvis
|
|
|
|
|
|
|
|
def VS (obj):
|
|
|
|
return obj.VS()
|
|
|
|
|
2015-07-29 20:39:04 +02:00
|
|
|
|
|
|
|
|
2015-08-08 12:58:41 +02:00
|
|
|
def csg_meshing_func (geom, **args):
|
|
|
|
return GenerateMesh (geom, MeshingParameters (**args))
|
2015-07-29 20:39:04 +02:00
|
|
|
|
|
|
|
CSGeometry.GenerateMesh = csg_meshing_func
|
|
|
|
|
|
|
|
|
|
|
|
unit_cube = CSGeometry()
|
|
|
|
unit_cube.Add (OrthoBrick(Pnt(0,0,0), Pnt(1,1,1)))
|
|
|
|
|