[openscad] add ulrich's mirror mesh macro, fix error in refine shape
This commit is contained in:
committed by
Yorik van Havre
parent
0fa3f8b81b
commit
c845ece1e3
@@ -80,7 +80,9 @@ def check_multmatrix(csg,ob,x,y,z):
|
||||
def mesh2polyhedron(mesh):
|
||||
pointstr=','.join(['[%f,%f,%f]' % tuple(vec) for vec in mesh.Topology[0]])
|
||||
trianglestr=','.join(['[%d,%d,%d]' % tuple(tri) for tri in mesh.Topology[1]])
|
||||
return 'polyhedron ( points = [%s], triangles = [%s]);' % (pointstr,trianglestr)
|
||||
#avoid deprecation warning by changing triangles to faces
|
||||
#return 'polyhedron ( points = [%s], triangles = [%s]);' % (pointstr,trianglestr)
|
||||
return 'polyhedron ( points = [%s], faces = [%s]);' % (pointstr,trianglestr)
|
||||
|
||||
def vector2d(v):
|
||||
return [v[0],v[1]]
|
||||
|
||||
Reference in New Issue
Block a user