using an exported STL into a script
-
@hrgdavor I think Firefox 68.11.0 is the last one that can be installed in this tablet, I will try to update/install other browsers.
-
@z3dev this to do with OES_element_index_uint I have added as a step to move fwd to simplify webgl for large geometries where indices easily go over 65536.
this check is not required right now as new code for converting to webgl buffers is not yet done.
@gilboonet could you upgrade the browser u are using, or install a different one on that tablet ?
-
@gilboonet I have a few old tablets as well, and will test this further. I think we adjusted the code to detect this properly, but may have missed something.
-
@z3dev I tried to see what ES6 javascript engine it has, only saw the firefox version that is 68.11.0. It displays an error about webgl
But I'm using it for years with webgl appsBut it is not important, it's just that is was very handy to use jscad on it and the screen is bigger than a smartphone screen.
-
@gilboonet said in using an exported STL into a script:
One advantage that Cascade Studio has over jscad is that it works even on old android tablets that used to be able to run jscad but doesn't anymore.
I would guess that those old tablets have a non-ES6 compatible JavaScript engine. The V2 JSCAD code is taking advantage of some of the newer JavaScript features, such as spread operator, etc.
-
@gilboonet it is hard to say why jscad does not work on old tablet, could be many different reasons. It should, but who knows what error happens that it fails. We try to keep it compatible.
-
@hrgdavor The geometries are good. It's something I'm trying to do with jscad for more than 5 years now and for years, before v2 and last build of v1, it wasn't. I already tried to start from union of difference of rectangles and then extrude, but the STL i get is the same as the one I get from union of difference of cuboids. For me, the advantage that jscad has over Cascade Studio is that it renders 2d, I mostly only use web versions, so the size of a build doesn't matter. One advantage that Cascade Studio has over jscad is that it works even on old android tablets that used to be able to run jscad but doesn't anymore.
-
@gilboonet for the examples you have here on the screenshots you may get better results by doing booleans in 2d and then extrude.
The boolean operations in jscad are based on polygons of the geometries and it is a generic algorithm, it is possible from there that you get resulting geometry that looks good, but creates difficulties when slicing.
You of course want to use the tool that gives you good results right now, but if you have time to investigate this further it would be appreciated.
It is interesting to me to see if this is something that could be fixed, or at least if there could be a workaround.
one advantage jscad has over OpenCascade is that regular build of WASM for OCCT is 12MB.
-
@hrgdavor what is breaking my flow using jscad is that it produces 3d models that seems to be hard to slice but only from some coordinates. It is maybe due to the way it splits polygons from its center.
-
is this due to different output genrated for the same 3d geometry ?
cascade studio uses OCCT that could be preserving surfaces closer to what u expect.
it should be possible to use OCCT inside jscad in the future, but you should use tool that gives you better results right now.
If you find out what is breaking your flow while using jscad, let us know
-
It could maybe help to see unfold volumes of the same kind, a column :
rendered with JSCAD
rendered with Cascade Studio
-
@gilboonet np, keep the cool tools comming I will let you know as soon as I have a simplified way to integrate with jscad.
-
@hrgdavor Thank you for your suggestion. For the moment I'm simply using another tool to run those scripts, Cascade Studio, that produces an STL output that can be used without errors with my scripts, it can also save to OBJ that is handy for my unfolder.
-
@gilboonet you could try export JSON. The json export will give you exact copy of the objects you return from the main method. Then you can continue using the objects in your other script the same as it would be inside the main