More information on object

 From:  Michael Gibson
2882.6 In reply to 2882.3 
Hi Daniel,

> I wasn't aware to these script options. where can I
> find refernce to this API? (I google it and just found
> some samples, but no full refernce.)

I don't really have any full reference available yet.

The closest thing is the moi.idl file which basically lists all the properties and methods that are available to a script, you can grab that here: http://moi3d.com/wiki/Scripting


> Is it posible to add the "flatten" mechanisim using
> the script API?

I don't think so... it's not really a matter of just calling into a few basic functions, a flattening function needs to do quite a lot of calculations and analysis on a surface.

Also it's not even possible to flatten just any generic surface without stretching. In order to be flattened properly a surface has to be straight in one direction. Something like a sphere for example can't be flattened as a single cut piece without stretching of the material.

Rhino has a flattening function and you can transfer objects built in MoI into Rhino easily by Copy/Pasting between them, so that may be your best option currently to produce the flattened pattern.

Also if you convert your object into a mesh, that is made up of flat facets and tends to be easier to flatten.

Lamina Design (http://laminadesign.com/) or Pepakura Designer (http://www.tamasoft.co.jp/pepakura-en/) are a couple of programs that are able to calculate a flattened result from mesh data.

I don't really have any experience in this area of flattening things, so it isn't too likely that I'll be able to add it directly in to MoI anytime soon. You'll need to use one of these other programs to handle that part, it's kind of a specialized function.

- Michael