-
|
Hello all ... looking for some help on making 3D shapes that are not boxes and cylinders. Actually, I'd like to make some triangular extrusions. I'm trying to make sense of the AddPolygon and AddLinPoly functions. I can get them to run without error and appear as objects in AppCSXCAD, but they do not render at all. Exporting as STL and examining the "AddLinPoly" object shows just a line (not a 3D object), described as 8 vertices (mostly redundant). The exported STL for the AddPolygon is worse - an STL file with 8 duplicate vertices. Has anyone been able to get this to work? The box is easy, here is some sample code and an AppCSXCAD screenshot: `plate_metal = CSX.AddMetal('plate_9') poly_metal = CSX.AddMetal('poly_1') poly_metal = CSX.AddMetal('poly_2') |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Answering my own question here ... the syntax problem is in the way co-ordinate PAIRS are passed to the function. Answer came from 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') or the same triangle in long form ... Hope this helps someone :) |
Beta Was this translation helpful? Give feedback.
-
|
Just hit this, thank for the answer 😎 |
Beta Was this translation helpful? Give feedback.

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 ...