mirror of
https://github.com/NGSolve/netgen.git
synced 2025-03-03 00:15:40 +05:00
unit-cube
This commit is contained in:
parent
0ce429d094
commit
adeb492b64
@ -4,8 +4,7 @@ if __platform.startswith('linux') or __platform.startswith('darwin'):
|
||||
from libcsg.csg import *
|
||||
import libcsgvis.csgvis as csgvis
|
||||
from libcsgvis.csgvis import MouseMove
|
||||
import libmesh.meshing
|
||||
# from libmesh.meshing import *
|
||||
from libmesh.meshing import *
|
||||
if __platform.startswith('win'):
|
||||
# Windows
|
||||
from nglib.csg import *
|
||||
@ -20,3 +19,14 @@ del csgvis
|
||||
def VS (obj):
|
||||
return obj.VS()
|
||||
|
||||
|
||||
|
||||
def csg_meshing_func (geom, maxh):
|
||||
return GenerateMesh (geom, MeshingParameters (maxh=maxh))
|
||||
|
||||
CSGeometry.GenerateMesh = csg_meshing_func
|
||||
|
||||
|
||||
unit_cube = CSGeometry()
|
||||
unit_cube.Add (OrthoBrick(Pnt(0,0,0), Pnt(1,1,1)))
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
from nglib.meshing import *
|
||||
from nglib.geom2d import *
|
||||
|
||||
geom = SplineGeometry()
|
||||
|
||||
geom = SplineGeometry()
|
||||
geom.Load("square.in2d")
|
||||
|
||||
param = MeshingParameters()
|
||||
param.maxh = 0.05
|
||||
|
||||
m1 = geom.GenerateMesh (param)
|
||||
|
||||
m1 = geom.GenerateMesh (param)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user