12-17-2019, 09:33 PM
New version is almost ready.
I added the "One group per material" option to the exporter dialog. The first version was splitting the object by default and it seems to not be the right thing to do.
This option will not attend your usage of the exported file, I know, but will keep the standard with the other exporters/apps.
Each object is created in a function named with its name and in case of the previous option be checked, then it will include the material name too.
That will allow uses to create primitives on Wings3D and use it on their scripts to create multiples copies of it.
So, I'm adding the option "Export faces group" to export the groups number (based on material), but without split an object in multiple ones and also the option "Creation function returns" ("GSG Object" or "Properties").
The option "Build the main() statement" will allow the file be part of a library and be used in includes.
Both options should give you what you have been using in your script to create those papercraft.
What I still need to know:
1) Is it necessary to sort the polygons based on groups? Since there is in groups a reference for each face it looks like it doesn't matter;
Is that right?
2) To keep the names more consistent with the JSCAD terminology (and not Wings3D) I would like to name the returned fields like this:
return {points:points,polygons:polygons,groups:groups,csgpolys:csgpolys,csg:csg};
Is that a problem?
Can you adjust your script to fit on it?
I added the "One group per material" option to the exporter dialog. The first version was splitting the object by default and it seems to not be the right thing to do.
This option will not attend your usage of the exported file, I know, but will keep the standard with the other exporters/apps.
Each object is created in a function named with its name and in case of the previous option be checked, then it will include the material name too.
That will allow uses to create primitives on Wings3D and use it on their scripts to create multiples copies of it.
So, I'm adding the option "Export faces group" to export the groups number (based on material), but without split an object in multiple ones and also the option "Creation function returns" ("GSG Object" or "Properties").
The option "Build the main() statement" will allow the file be part of a library and be used in includes.
Both options should give you what you have been using in your script to create those papercraft.
What I still need to know:
1) Is it necessary to sort the polygons based on groups? Since there is in groups a reference for each face it looks like it doesn't matter;
Is that right?
2) To keep the names more consistent with the JSCAD terminology (and not Wings3D) I would like to name the returned fields like this:
return {points:points,polygons:polygons,groups:groups,csgpolys:csgpolys,csg:csg};
Is that a problem?
Can you adjust your script to fit on it?