Giter VIP home page Giter VIP logo

Comments (36)

thomthom avatar thomthom commented on September 21, 2024

The STL file only carry information about triangles. No materials or shading. I can't think of anything the exporter can do. This seem to be to be a Quick View issue.

(btw, attaching sample STL files would help when reporting issues.)

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

Do this happen to binary STL files from SU only? Did you compare against binary files from other sources? (If so can you provide example files of what work and what doesn't?)

from sketchup-stl.

jsejcksn avatar jsejcksn commented on September 21, 2024

Hi @thomthom:

I have attached the relevant files (the same ones in #162). I only have Fusion 360 and SketchUp installed.

stl-f-export-test.zip

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

I wonder if the preview app is looking for a color in the "unused" bytes of the binary stl format?

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

See issue #25 about color in stl files.

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

The unused bytes are just reserved. the specs doesn't specify any color data. In any case, that uint16 "attribute-size` is written as 0 in the SketchUp exporter. Like all other exporters I've seen.

I'm downloading the STL now and will inspect it. This was one from SU, right? Have you seen an binary STL that didn't display as black?

Btw, what version of OSX are you using?

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

I see now - the ZIP had examples from SU and Fusion. And the Fusion binary files doesn't display as black?

from sketchup-stl.

jsejcksn avatar jsejcksn commented on September 21, 2024

The STLs exported from Fusion 360 display with the same style/color as the ASCII one exported from SketchUp (not solid black). I'm using macOS 10.12.2.

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

The fusion binaries include a COLOR string in the header, where the SketchUp binaries do not. Maybe that's all it is.

irb(main):056:0* File.read("f-fusion360-zup-bin.stl", 80) 
=> "STLB ATF 2.0.0.9000 COLOR=\xA0\xA0\xA0\xFF   

irb(main):050:0* File.read("f-fusion360-yup-bin.stl", 80)
=> "STLB ATF 2.0.0.9000 COLOR=\xC2\xA0\xC2\xA0\xC2\xA0\xC3\xBF

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

@jsejcksn Here is a SketchUp binary stl with a COLOR string in the header - can you try it in Quick View?

sketchup-bin-Z.zip

from sketchup-stl.

jsejcksn avatar jsejcksn commented on September 21, 2024

Still looks the same:

1
2

But—the default orientation looks good. 👍

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

One more please?
Untitled.zip

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

@jsejcksn I didn't change the orientation.

from sketchup-stl.

jsejcksn avatar jsejcksn commented on September 21, 2024

Same
🤷‍♂️

default
zoom

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

Given that STL doesn't have any official color data I'm closing this as Won't Fix. The issue lies in the OS-X preview functionality.

from sketchup-stl.

jsejcksn avatar jsejcksn commented on September 21, 2024

@jimfoltz Did you see this? https://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL Perhaps it has something to do with it.

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

Hm... Using the comment section for unofficial data is one thing. But using the attribute byte count is troublesome. Those two bytes indicate the size of additional data. But they should not contain data themselves.

After these follows a 2-byte ("short") unsigned integer that is the "attribute byte count" – in the standard format, this should be zero because most software does not understand anything else.

By the specs the STL parsers should be reading the attribute byte count and skip past it unless they know what it represent.

from sketchup-stl.

jsejcksn avatar jsejcksn commented on September 21, 2024

Ok. I'm definitely in favor of upholding standards.

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

Is the STL preview a built-in, or a plugin for Quick Look?

from sketchup-stl.

jsejcksn avatar jsejcksn commented on September 21, 2024

Built-in

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

Finding reports of various issues with the STL preview in OS X: http://forums.autodesk.com/t5/design-validate-document/360-stl-export-and-mac-os-quick-look-is-blank/td-p/6264439

It appears that the STL viewer in El Capitan doesn't have full support for binary STL format.

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

https://discussions.apple.com/thread/5593219?tstart=0
This thread indicate that third party applications can conflict.

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

I had a look on a fairly fresh mac with 10.11.6;

screen shot 2016-12-20 at 14 33 10

The Fusion binary STL files didn't display at all. SketchUp binary STL files displayed as black. ASCII files worked fine.

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

It would be nice to provide better support for the Mac binary preview. I unfortunately don't have one so I can't be of much help unless someone can come up with what exact format the preview app is looking for.

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

If we got hold of an STL file in binary format that displayed correctly we could look at possible amendments to the exporter.

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

@driven says[1] the "cube.stl" from here[2] looks normal in the Mac preview. It is a binary stl with nothing but spaces in the header.

  1. http://forums.sketchup.com/t/binary-stl-previews-on-mac/36184

  2. http://people.sc.fsu.edu/~jburkardt/data/stlb/stlb.html

from sketchup-stl.

driven avatar driven commented on September 21, 2024

Found a few others that have more header content, in the Meshlab Sample's download...
Here
knot_max_simplified.STL and conrod.stl both display correctly...

john

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

I wonder if Fusion 360 adds it's own plugin over-ride to the quick look viewer.

from sketchup-stl.

driven avatar driven commented on September 21, 2024

AutoCad would never block other apps from reading it's content, would they...

john

from sketchup-stl.

driven avatar driven commented on September 21, 2024

@jimfoltz, I converted both failing binary files using assimp, the Fusion one then displayed correctly but the SU one was still black...

so I then did a diff on the assimp versions and the SU > assimp has facet normal nan nan nan throughout, where the fusion > assimp always shows values facet normal 0 0 1 etc...

I think it shows that Assimp can't read any of the face normals and the I suspect 'quicklook' has the same issue...

EDIT: if I convert f-sketchup-ascii.stl to binary with Assimp, it shows correctly and has correct facet normals...

john

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

I don't remember why the normals are not being included in the binary export - maybe it just never came up. Here is a binary stl exported from SketchUp with correct normals. How does it look?

2016-12-21.zip

from sketchup-stl.

driven avatar driven commented on September 21, 2024

theticket

that works...

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

Yay. Thank you for your invaluable insight and effort.

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

Ah! I never noticed we wrote out 0,0,0 for the normals... Nice catch!

image

Thanks for being persistent and sticking with this one.

from sketchup-stl.

jimfoltz avatar jimfoltz commented on September 21, 2024

OT: I just googled that editor - binary templates look like an incredibly useful feature.

from sketchup-stl.

thomthom avatar thomthom commented on September 21, 2024

Yup - very nice editor. The templates is worth the cost by itself. There was a binary STL template available in their repository. I made some changes to it so that it could read the special header Fushion creates (extract version info and color info).

from sketchup-stl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.