Skip to content

Instantly share code, notes, and snippets.

@arnholm
Last active November 4, 2019 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnholm/9c27f6f3b65d48d38a2e34efff48591c to your computer and use it in GitHub Desktop.
Save arnholm/9c27f6f3b65d48d38a2e34efff48591c to your computer and use it in GitHub Desktop.
Concave-convex lens from 2 point clouds
shape@ main_shape()
{
   // create 2 convex hull bodies
   solid@ upper =  polyhedron("posterior-lenticle-surface.xyz");
   solid@ lower =  polyhedron("anterior-lenticle-surface.xyz");
  
   // subtract upper from lower to create convex-concave lens body
   return lower-upper;
}

void main()
{
   shape@ obj = main_shape();
   obj.write_xcsg(GetInputFullPath(),secant_tolerance:-1);
}
Display the source blob
Display the rendered blob
Raw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment