Jump to content
3DCoat Forums

Questions about scripting


celer
 Share

Recommended Posts

  • Member

Hi, one of the most error prone work flows I have is exporting lots of small parts for 3D printing, and importing the same parts from OpenSCAD. 

Here is what I want to do:

Be able to select some number of objects from the SculptTree, or the parent object, and be able to export those objects as individual files (named the same as their layer name) to a particular directory (as STL), or perhaps execute a 3d printer slicer to automatically load the items. My current use case is I'm 3D printing teeth for a costume, and I want to be able to simply export a bunch of teeth as individual files at once, so i can place them on the 3D printer bed for how they will print best. I'm on my fifth or sixth iteration of adjusting teeth based upon the printed results.

(In some ways, I kinda wonder if export for 3D printing might be better implemented as an actual feature, where 3DCoat would discover various slicers are installed, and simply offer an "Export to Simplify3D / Cura", etc menu item, which would export the files as STLs and open the appropriate slicer) 

Alternatively I want to be able to take a bunch of STL files I've generated using OpenSCAD and import them into the the Sculpt Tree as individual objects, and then later, re-generate them using OpenSCAD and simply select them on the sculpt tree menu, and essentially replace, or refresh them with the regenerated models, based upon their filenames. (I'm a dork I use OpenSCAD to generate complex mathematical models in a parametric capacity, so for example antlers using recursive parabolic curves, so that I can also have OpenSCAD generate the molds for casting antlers). 

I tried to implement this last night, but ran into some issues:

  • I can't find a documented method for how to determine which items on the sculpt tree are selected; There doesn't appear to be any complete API documentation for the Vox object, so perhaps it's there but I couldn't find it. 
  • I couldn't figure out how to import an object to a specific layer on the tree
  • I couldn't get the InstallToMenu("Voxels",...) to work; this still might be my fault

I did investigate and test the AppLink functionality for doing this, and as far as I could tell it wasn't gonna work well for dealing with multiple objects, I think I'd rather have explicit Import/Export menus on the sculpt tree. 

  • Is there a method for getting selected layers from the sculpt tree?
  • Is there complete API documentation for the Vox object somewhere?
  • How can I import / Export items to a specific layer on these sculpt tree

 

 

 

 

Edited by celer
added context
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...