Jump to content

Script for automatic exportation of STL FILE


---
 Share

Recommended Posts

Dear Friends ,

After scanning many parts in the same time, we need to do :

  1. polygonization 
  2. select part (one part)
  3. copie the part 
  4. export the part as STL file
  5. select another part
  6. copie the part 
  7. export the part as STL file
  8. ...
  9. ...
    --> until finishing all the parts 

Is there any solution to this work automaticly with scription ?

Thank you for your help

 

Link to comment
Share on other sites

Hello Dridi,

you can record your workflow with the record button in the script editor. After that you can edit the recorded commands and generalize them so they work with different part names/mesh names etc. 
You would probably start the script with a list of all parts in your project and then executing your steps for each part.

Regards,
Nanno

Link to comment
Share on other sites

DEAR NANNO ;

 

thank you for your answers !

I did that but how can I change the name of the part automaticly .I think I need to creat a Variable (n=n+1)  .

Part1

Part2

Part3

....

my probleme how to do this program ?

 

Thank you in advance !

Link to comment
Share on other sites

dridi,  just my personal thought , I think you'll need to look into some python training from a few locations , there are plenty of good external sites as well as some offerings from gom .  I think it is very hard to communicate the help you need on a forum .  there isn't a generic way to handle such needs to to be able to provide an out the box solution unfortunately . 

the fact you say polygonisation required suggests you need to load project , polygonise , calculate reports /alignments , export stl, close project 

it is possible for python to iterate through files in a directory  is by 'for' loops .

 

Link to comment
Share on other sites

DEAR JAMES ,

 

Thank you for your reply !

Actually , I'm learning PY from gom training  and Youtube , but I thing that I need much time and excercise to do to be able to find the solution .That's why I asked if there's someone who can help me 

Link to comment
Share on other sites

hey dridi, not sure why you are selecting a patch ?  this is not a robust way , as you see it saves the co ordinates where you clicked.

looking back at all your text I'm guessing,  but it looks like you may have scans with multiple parts inside one stl and want to segregate ?

this starts getting really tough because what is your logic about where the parts are in space about how the parts will be named?

gom developed methodologies for measuring multiple parts at once that can get over some of these logic hurdles.  but these need to be used at the point of scanning in 2021 .

Edited
Link to comment
Share on other sites

sorry Dridi, I'm not sure what you mean.

I think it would be helpful to write out the logic steps that you have in mind .

 as I say it could be that you are trying to solve something that is already solved by different workflow methodology 

Link to comment
Share on other sites

Hello Dridi,

in Version 2021 and up there is the workflow assist for several parts. It will guide you through the steps and will separate the meshes for you. The export of the STL could be scripted with little effort. Maybe you should contact your local distributor with this problem so they can assist you with the setup etc.

Regards,
Nanno

Link to comment
Share on other sites

Thanks for the video Dridi.   As i already mentioned and Nanno has now also suggested, your only realistic chance is to use the multi part workflows ( software 2021 and above)

I hope you manage to get setup .

Link to comment
Share on other sites

THANK YOU NANNO , THANK YOU JAMES

As an exercice to learn how to script with Gom & Python , is it possible to sovle this issue with the actual version (2020)?

Is there an other exemple that can help me to undrestand .

Thanks!

Link to comment
Share on other sites

Hey dridi , this would be very difficult to solve because of the logic needed ..i.e. How to reliably know where the parts will be and how they would be named based on position. This is why the gom software team came up with the multipart scanning solution in the later software.  Sorry that isnt the answer you are looking for.

Link to comment
Share on other sites

 Share

×
×
  • Create New...