mirror of
https://github.com/csirmaz/openscad-py.git
synced 2025-06-21 10:25:41 +02:00
Documentation
This commit is contained in:
parent
9d24a2c85f
commit
bb7155a5fd
25 changed files with 88 additions and 21 deletions
|
@ -176,6 +176,7 @@ class Polyhedron(Object):
|
|||
return cls(points=point_list, faces=faces, convexity=convexity)
|
||||
|
||||
def render(self) -> str:
|
||||
"""Render the object into OpenSCAD code"""
|
||||
faces_list = [f"[{','.join([str(x) for x in face])}]" for face in self.faces]
|
||||
return f"polyhedron(points=[{','.join([p.render() for p in self.points])}], faces=[{','.join(faces_list)}], convexity={self.convexity});"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue