Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Create polyhedron from point cloud

When a polyhedron is created from an array of points, it is interpreted as a convex hull

// AngelCAD code.
shape@ main_shape(as_args@ args)
   array<pos3d@> hull_points = { {-1,-1,0}, {-1,1,0}, {1,1,0}, {1,-1,0}, {1/2,1,2} };
   return polyhedron(hull_points);

void main()
   shape@ obj = main_shape(GetArgs());
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment