Re: determining subdomains on Cooker generated files

Posted by Damien André on
URL: http://granoo.326.s1.nabble.com/determining-subdomains-on-Cooker-generated-files-tp215p216.html

Hello,
This is a common problem and at this time we do not have any user-friendly tool to do this job. However, you can do something thanks to the *.offset file trick. If you take a look in the Tool/Cooker/inp/CookingBook-polyhedron.inp you can see :
<PreProcessing>
    <PlugIn Id="_NewSupportShape" Type="Polyhedron" ID="Boundary"
	    File="./off/cube-and-cylinder.off" OffSetFile="./off/cube-and-cylinder.offset" />
....
Here, the cube-and-cylinder.off describes the geometry of the domain and the  cube-and-cylinder.offset file describes the different group of discrete elements that must be created during the cooking process. So, you can run this example, take a look on the generated sample with the granoo-viewer and read the related cube-and-cylinder.offset to understand how it works.

How to generate offset file ?

To generate offset file, you can take a look on the Tool/Script/ directory. Please read carefully the offset.readme file. Finally, when you are okay, you can take a look on   "Tool/Script/Examples/build-off.py" file that shows how to generate .off and .offset from python thanks to the great software openscad.

This is not so easy... So, feel free to come back here for asking any questions.