Welcome to ask.woodem.org. You may post when you login through your GitHub account.

problem with importSTL

0 votes
144 views
asked Oct 13, 2015 by RafaelOrtega (190 points)

Hello,

Hello,
When I try to import STL model using woo.utils.importSTL
the program give me the following message

The STL file must be saved on a specific folder?

1 Answer

0 votes
answered Oct 13, 2015 by eudoxos (49,030 points)

Hi, the problem is how you call the import function (ArgumentError: Python argument types ... did not match c++ signature). You can either check the docs of importSTL or parse the rest of the error message, and will see that first 2 arguments are mandatory (they don't have a default value: filename and mat) while the rest is optional (there is a default value, such as mask=3 and so on).

The STL file is located in the normal way, i.e. the path is either absolute (starting with / in UNIX or with C:, D: etc. in Windows, I guess), or if the path is relative, it is resolved as relative to the current directory.

commented Oct 13, 2015 by RafaelOrtega (190 points)

Hello again
Thanks for your answer, but the problem continues, now, the program give me the following message
enter image description here

commented Oct 13, 2015 by eudoxos (49,030 points)

The file is not found. Make sure it is in the current directory, since you don't give absolute path. Or provide an absolute path (try to use / instead of **** in paths to make your life easier -- see e.g. https://pythonconquerstheuniverse.wordpress.com/2008/06/04/gotcha-%E2%80%94-backslashes-in-windows-filenames/ for a few words of explanation).

commented Nov 4, 2015 by RafaelOrtega (190 points)

Thanks for your answer. Now I can import a STL file, but i have a new problem.
When I import a STL file (whichever) the file doesn't have any particles whereas
the file whose name is pill-bottle.coarse2.stl has many particles.

I attach some images for be more specific

in this image you can see the comparation. When i call any STL file (in this case "prueba") vs When i call the file "pill-bottle.coarse2.stl"

If you know any solution to fix this problem. I would be very grateful

commented Nov 4, 2015 by eudoxos (49,030 points)

Hi, hard to tell without your STL file, and without seeing the code you actually use to import it. Please be more specific.v

commented Nov 6, 2015 by RafaelOrtega (190 points)

Thanks for your answer. The problem was fixed.
There was for a problem with the STL format. But fortunately, I solved that.
Now I can import every STL file.
But =/. When I try simulate the model ( who has around 400000 elements) obviously my computer failed.
So, I read about "batch processing" for find a solution and simulate the model.
This processing need something special?
How i can configure this method?
I'm a beginner in these type of programs.
Really I will appreciate any help for begin my work.

commented Nov 6, 2015 by eudoxos (49,030 points)

You will have to pre-process the STl to decrease the number of particles (if you have 400k triangles in the STL). Try using e.g. MeshLab with some decimation algorithm, or other software (I know Rhino has thos efunctionalities). If you are beginner, go for tasks which you can manage, otherwise you will just end up being frustrated soon. If you have 400k spheres, scale the model somehow. Batch processing is good only for running the same simulation with different parameters, but it will not make run a single simulation any faster. HTH, v.

...