0

Custom shape generator to create holes

I have some basic experience now writing Javascript and generating some interesting meshes.

I'm wondering if there's any way to use the APIs to group things together and/or define holes.  A simple example would be a pipe.  If I could generate one mesh as a cylinder, and then put a hole-type smaller cylinder within it -- all via APIs -- can it be done?  I know that's a really simple example that you could do with the UI, but I'd like to make a much more complex, parameterized object, and don't want to have to use the UI to align things, turn them into holes, etc.  I'd rather just generate the whole structure in code.

I figure a mesh to define the pipe (again, just an example) would be hard using a bunch of my own triangles.  It'd be easier if I could have two meshes, one for the inner pipe solid, one for the outer, and then choose different "colors" so the inner one is a hole, and group the two in code.

Any ideas?

 

4 comments

Please sign in to leave a comment.