Skip to content
Discussion options

You must be logged in to vote

Answering my own question here ... the syntax problem is in the way co-ordinate PAIRS are passed to the function. Answer came from

#56 (comment)

It's not [ [x1,y1],[x2,y2],[x3,y3] ] It should be [ [x1,x2,x3],[y1,y2,y3] ]

So a triangle could be either

PolyMetal1 = CSX.AddMetal('PolyMetal1')
PolyMetal1.AddLinPoly(priority=10, points=[[0,100,0],[0,0,100]], norm_dir ='z', elevation=0, length=50)

or the same triangle in long form ...

PolyMetal1 = CSX.AddMetal('PolyMetal1')
pts_x = np.array([])
pts_y = np.array([])
pts_x = r_[pts_x, 0]
pts_y = r_[pts_y, 0]
pts_x = r_[pts_x, 100]
pts_y = r_[pts_y, 0]
pts_x = r_[pts_x, 0]
pts_y = r_[pts_y, 100]
pts = np.array([pts_x, pts_y])
PolyMetal1.AddLinPoly…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by GWR2
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants