Script10_SliceBuildPlatform

Script10_SliceBuildPlatform

l.oliveiraGZS29
Advocate Advocate
699 Views
4 Replies
Message 1 of 5

Script10_SliceBuildPlatform

l.oliveiraGZS29
Advocate
Advocate

I can't use this script, it basically doesn't seem to do anything.

0 Likes
Accepted solutions (1)
700 Views
4 Replies
Replies (4)
Message 2 of 5

steffen_anders_adsk
Autodesk Support
Autodesk Support

Hello, @l.oliveiraGZS29,

 

That there's no noticeable feedback is expected. This script silently slices the bodies in the current buildroom and saves the result to disk. With nothing else given, the save location Netfabb must naturally be (or trying to use) the same as where the executable is located, so, the Netfabb installation folder. If this is the default inside Program Files, you may not automatically have write access to it. But if you do, you should see a file named mesh0.sli appear there that's overwritten with every run of the script. (Plus a mesh1.sli and so on for any subsequent model.)

 

Have you checked there yet?

 

 

Best regards,

Steffen

 

Steffen Anders
Autodesk Netfabb team

Netfabb resources: Online help • System requirements • Knowledge base • Forums • Homepage • YouTube

How to get Netfabb Basic: Video • Help • Download

0 Likes
Message 3 of 5

l.oliveiraGZS29
Advocate
Advocate

What about change the value to false of CreateInMemory. I forgot to mention but I don't want the script to run silently, I just want to slice the tray and add the slices to the slice commander. slice:addslicetotree(slice) doesn't work either.

0 Likes
Message 4 of 5

steffen_anders_adsk
Autodesk Support
Autodesk Support
Accepted solution

I'll have to double-check what that bool does, but I don't think it's for making the method itself any more or less noticeable to the user. I'm mildly certain that it's more for preventing to write or cache slice data to disk while the mesh is being sliced, accelerating the process at the cost of higher memory usage. (Then again, unused RAM is wasted RAM anyway, I say.)

 

slice:addslicetotree(slice) cannot work as addslicetotree is not a method of a slice object but of the system object.

Use system:addslicetotree(slice) instead.

 

But either way, slicing a model AND adding the slices to the tree is currently fundamentally not possible due to the insular implementation of Lua (called "scopes" in the documentation). While the objects, properties, and methods generally appear in both the 3D and the 2D environment of Netfabb as applicable, as in, what you see and have available when you're working on either mesh and CAD data or on slice stacks, actually crossing from one into the other is currently not designed and implemented for.

 

So, starting from a 3D model you may slice and process in memory and export the results, but you cannot directly invoke the Slices tree and UI at this time. Any automation inside Slices must be done and launched separately.

 

Kind regards,

Steffen

Steffen Anders
Autodesk Netfabb team

Netfabb resources: Online help • System requirements • Knowledge base • Forums • Homepage • YouTube

How to get Netfabb Basic: Video • Help • Download

0 Likes
Message 5 of 5

l.oliveiraGZS29
Advocate
Advocate

Thank you for the detailed answer, I will adapt to the circumstances.

0 Likes