mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
bcs for rectangle
This commit is contained in:
parent
546cf02dbe
commit
4176c41670
@ -21,14 +21,16 @@ for l1,l2,bc in lines:
|
||||
unit_square.Append( ["line", pnums[l1], pnums[l2]], bc=bc)
|
||||
|
||||
|
||||
def MakeRectangle (geo, p1, p2, **args):
|
||||
def MakeRectangle (geo, p1, p2, bc=None, bcs=None, **args):
|
||||
p1x, p1y = p1
|
||||
p2x, p2y = p2
|
||||
p1x,p2x = min(p1x,p2x), max(p1x, p2x)
|
||||
p1y,p2y = min(p1y,p2y), max(p1y, p2y)
|
||||
if not bcs: bcs=4*[bc]
|
||||
print ("bcs = ", bcs)
|
||||
pts = [geo.AppendPoint(*p) for p in [(p1x,p1y), (p2x, p1y), (p2x, p2y), (p1x, p2y)]]
|
||||
for p1,p2 in [(0,1), (1, 2), (2, 3), (3, 0)]:
|
||||
geo.Append( ["line", pts[p1], pts[p2]], **args)
|
||||
for p1,p2,bc in [(0,1,bcs[0]), (1, 2, bcs[1]), (2, 3, bcs[2]), (3, 0, bcs[3])]:
|
||||
geo.Append( ["line", pts[p1], pts[p2]], bc=bc, **args)
|
||||
|
||||
def MakeCircle (geo, c, r, **args):
|
||||
cx,cy = c
|
||||
|
Loading…
Reference in New Issue
Block a user