Skip to content

Instantly share code, notes, and snippets.

@arnholm

arnholm/lens.md

Last active Nov 4, 2019
Embed
What would you like to do?
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);
}
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
You can’t perform that action at this time.