SketchUp / sketchup-stl

A SketchUp Ruby Extension that adds STL (STereoLithography) file format import and export.
http://extensions.sketchup.com/content/sketchup-stl
MIT License
247 stars 68 forks source link

Support colours for binary STL? #25

Open thomthom opened 12 years ago

thomthom commented 12 years ago

Will be be doing this?

http://en.wikipedia.org/wiki/STL_%28file_format%29

There are at least two variations on the binary STL format for adding color information:

jimfoltz commented 12 years ago

For the importer, why not? Even though it may be non-standard, it could make someone happy as long as it doesn't break anything.

I'm not so sure the exporter should have non-standard output.

thomthom commented 12 years ago

When I was reading up on the Wiki article it appear the two non-standard methods cannot be automatically detected. It appear that one might need to make it an options (Default off?) to be able to handle this.

lgm3d commented 11 years ago

Hello, I am the old guy to give a little historical perspective. The original color per facet was proposed by a european machine manufacturer that Z Corp beat up because it violated their patents. Basically I would not put color high on the list of things to do. . It was a brief attempt, but as you point out thomthom, the lack of standard and the fact that Z Corp was the only color printer meant that no one really implemented it. Or rather no CAD and no printer manufacturers. Z Corp no longer supports it. Basically it is a chicken and the egg thing. For Objet color and I believe most 2 color REPRAP derivatives you need two distinct monochrome stls. Happy to ask Adrian Boyer how his team things they will spec color. Hopefully they will use the format specified in the new AMF http://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format

thomthom commented 11 years ago

Ah, so this AMF format is going to replace STL in the future? It would make sense to not bother about colours for STL then. At least until someone specifically requests it for something concrete.

It was just when I saw the wiki article about some colour support I thought of the type of 3d printer we had at uni. The ones where the models is built by layers of powder, glued with an ink-jet printer head. (Can't remember what the processed is called now.) Since it added dye to the model, a single piece can have any colour you want. Thought it might be some use for that kind of printing.

lgm3d commented 11 years ago

the process you describe is the old ZCorp. Now owned by 3d systems it is the Z printer line. We run four of them. I can check again but I am 99% sure that the color import, or at least the color written by Magics into a binary stl is no longer supported as input into the Zprinter pre-processing software.

Re AMF> yes the idea from industry mostly in 2010 -11 (but with little imput really from the REPRAP movement) was toward a more robust extensible format that did really modern things like specify the UNITS of described geometry (sarcasm). AMF actually does a lot more like a robust color description, multi-materials, gradient materials, microstructures etc. Hod Lipson at Cornell headed up a team of which I played a very minor role. It is a good format in that it hopefully does not make many of the mistakes of VRML.

AMF is documented here: http://amf.wikispaces.com/

There is open source code for writing amf here. http://sourceforge.net/projects/amftools/

It would be a great idea if this project looked at the long term viability of supporting AMF. You only have to print a file at 25.4 x the desired size once or twice before one sees the value of AMF. (Our stl exporter always exports in inches, a problem I see you guys have already solved)

jimfoltz commented 11 years ago

To clone the sourceforge code using git:

git svn clone http://svn.code.sf.net/p/amftools/code/trunk amftools-code

and then to update:

git svn fetch