CQ models rendering not usable #383
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thanks for all the work on integrating CQ. Sadly, current rendering of models is not really usable - I cannot really see any features/edges:
What would you need from CQ to fix it? Currently VRML and VTKJS (take a look here: https://kitware.github.io/vtk-js/examples/SceneExplorer/index.html?fileURL=https://data.kitware.com/api/v1/file/5878eb978d777f05f44b142a/download) export is supported, it should be easy enough to display those with descent shading. Or would another format be needed?
Thanks @adam-urbanczyk
This is just bad lighting in the three.js scene. No changes in format is needed.
I've improve it somewhat with #384

But I'll leave this issue open as I'd like to improve it further.
You might be interested in this:
0b7050c020/sphinxcadquery/sphinxcadquerystatic/main.js (L130-L165)I think you can see that lighting in action here: https://paramak.readthedocs.io/en/main/example_parametric_reactors.html
I'm pretty sure that's an old version of Three.js though.
Once #448 is merged, I was planning on closing this issue, while I hope it continues to improve I think it's much better than it was. Surfaces and edges can easily be identified now.
https://user-images.githubusercontent.com/29681384/128854453-a6960d50-cf06-4cd6-ad83-803acb96855e.mov
Are you happy with the state of it now @adam-urbanczyk @marcus7070 ?
LGTM, I'd change the line color though (to eg black)
It's a great improvement @Irev-Dev. I think your line colours are part of the CadHub theme? In which case they're perfectly legible, no worries.
A minor point: I think most CAD viewers spin the object, not the camera. Sometimes you might get a shadow or reflection that obscures a feature, if you're only able to move the camera then you can't un-obscure. On the other hand, I do think spinning the camera with fixed lights gives a better sense of depth to the scene, but maybe that's just me.
Thanks @adam-urbanczyk, @marcus7070,
Why do you think the lines should be black Adam? The lines are roughly a CadHub theme, but at somepoint I'll probably want to re think the whole design of the 3D viewer so it's likely to change.
Thats a good point Marcus, I might do a bit of both, I tried attaching a light to the camera, and it adds a fair amount of consistency to the lighting.
I can barely see them with the current color scheme (black was just a contrasting color - maybe not so good given the background).