[Plugin] Import STL files
-
Hi,
@unknownuser said:
The exported STL seems to be incompatible with some applications
There are several STL formats which slightly differ in their syntax. The one I have choosen to export is the most standard one, as defined here for instance:
http://www.gom.com/CONTAINER/files/sp_stl_en.pdf
or here:
http://mech.fsv.cvut.cz/~dr/papers/Lisbon04/node2.html
Maybe some applications do not support every kind of STL ?@unknownuser said:
an SU2stl generated stl, opened in Rhino and resaved as an STL is much smaller in file size
I don't have Rhino, but I suppose that it saves an STL in the binary format, while my script saves it in ASCII (text), which is 8 times bigger (average). You can see the same differences between an ascii dxf and a binary dxf (dxb) for instance.
@unknownuser said:
Is there a limit to the level of nested groups
No. Not tested here but as a recursive method is involved, there should be no limits.
Components are NOT supported, groups are.@unknownuser said:
Is there a way to call this plugin from another?
Unfortunately no.
Regards,
-
@didier bur said:
@unknownuser said:
Is there a limit to the level of nested groups
No. Not tested here but as a recursive method is involved, there should be no limits.
Components are NOT supported, groups are.I found that recursive methods might cause SU to bugsplat. http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=15585&p=120726 I had a method that looped over entities to find connected entities which used a recursive method. Had to change it to an iterative method.
-
-
Mind you, it happens when you do many recursions. When crawling geometry you quickly end up with hundreds iterations. So if the script never goes that deep you're ok. But it's something to be aware of.
-
When exporting STL from SolidWorks, here is an option to put all geometry in same file or to create separate file for each part. Mr. Didier Bur, could this script to be modified in a manner that allows multiple file selection and each geometry to be made group (or component if there are more identical parts) ? Or to specify a folder where stl part files are located?
Thank you.
-
Dropped into the to-do list
-
bump
(sorry Dider - no practical reason just testing some moderation stuff) -
Minor improvement:
On line 54 you call the "openpanel" method when exporting. This should be "savepanel", so the user gets the correct dialog displayed. Still works on Windows but not on OSX, where you need to point to an already existing file.
Also, the default "." file location could be replaced with ENV['USER'] or ENV['HOME'] or preferably the current file folder, as to make it more convenient. With 'USER' it works much better for me on OSX.
(I refer to the unscrambled file, obviously, not the compacted one -- maybe the reason why people think it is a binary file)
-
Hi,
@stefkeB: I'm using openpanel when importing, and savepanel when exporting. So I don't understand what you're talking about, propably you have an old version, because the latest one is v1.3. (Nov 2009) and is scrambled in a RBS file (so unreadable). -
I've been looking around at the various ruby based importers for SketchUp and I see that no one uses the Importer class. If this class is used the importer can be found in the native import list which would be very nice.
http://code.google.com/apis/sketchup/docs/ourdoc/importer.html -
Hi Didier,
I have tried the tool in Sketchup 8. The Unit support appears and I can choose my unit but then nothing happens. I've attached the stl files which I downloaded from Internet.
Charly
-
Hi Charly,
Your files are binary STL files. The script cannot read such files, but only ASCII STL format.
You can convert binary STL's to ASCII with Meshlab (free) for instance.
Regards, -
Hi Didier,
Thank you for the explanation. I learned something more to it.
Charly
-
Didier,
I just downloaded the STL Export/Import plug-in on my Mac, but I can't make it work. It asks me for the name of a file to export, but won't ever let me export anything. What am I missing? Can you provide a brief explanation of how to make the export function work?
Many thanks,
David Heim -
@davidheim1 said:
Didier,
It asks me for the name of a file to export to, but won't ever let me export anything.
David HeimSame here. It happens with the one loaded from SketchUcation store.
But the one on CRAI Ruby depot, loaded the old way, manually, works. -
I recommend that anyone importing or exporting STL files in SketchUp use the open source plugin that SketchUp released: http://extensions.sketchup.com/en/content/sketchup-stl
-
@thomthom said:
I recommend that anyone importing or exporting STL files in SketchUp use the open source plugin that SketchUp released: http://extensions.sketchup.com/en/content/sketchup-stl
very fast and good.thanks /
-
I have used the AUTOINSTALL 3 times now to add this plugin in SU 2014 and it does not show up anywhere that I can find. The installation process says it was installed successfully but I can not find it anywhere.
Am I doing something wrong or is there a problem using the plugin with 2014?
-
@ntxdave said:
I have used the AUTOINSTALL 3 times now to add this plugin in SU 2014 and it does not show up anywhere that I can find. The installation process says it was installed successfully but I can not find it anywhere.
Am I doing something wrong or is there a problem using the plugin with 2014?
This Plugin was started 9 years ago, and in this form it is 6 years old.
I unpacked it, did some very simple editing, and it worked in v2014 just fine.
BUT Didier as the author must make these changes and republish...
I suspect he won't want to support this any further... because Trimble now have their own newer [better?] STL Import/Export plugin - it is available free from the EWH...
Why not try that ?
http://extensions.sketchup.com/en/content/sketchup-stl -
@tig said:
@ntxdave said:
I have used the AUTOINSTALL 3 times now to add this plugin in SU 2014 and it does not show up anywhere that I can find. The installation process says it was installed successfully but I can not find it anywhere.
Am I doing something wrong or is there a problem using the plugin with 2014?
This Plugin was started 9 years ago, and in this form it is 6 years old.
I unpacked it, did some very simple editing, and it worked in v2014 just fine.
BUT Didier as the author must make these changes and republish...
I suspect he won't want to support this any further... because Trimble now have their own newer [better?] STL Import/Export plugin - it is available free from the EWH...
Why not try that ?
http://extensions.sketchup.com/en/content/sketchup-stlYes, when I saw that the other one was not showing up, I did go install this one. The whole 3D thing is new to me
Advertisement