@tjw25425 here's one of the most advanced websites. And very cool too.

Posts made by z3dev
-
RE: Default JSCAD script (index.js) for self-hosted website
-
RE: Getting values from a geometry
@gilboonet geom2.toSides() should be called to obtain the sides. however, the sides are not ordered like a path. if you need ordering then a better option is calling toOutlines() which will provide each outline as a set of ordered points.
-
RE: Default JSCAD script (index.js) for self-hosted website
@tjw25425 Welcome
There are numerous websites using JSCAD, using the modeling library to create models, and then rendering. At this point, I haven't seen a website that interacts with the model via touch/mouse. Most websites use a custom built script to control the rendering and modeling.
-
RE: How to use vec2/3 classes
@gilboonet the example looks fine. You can create, rotate, transform all the math objects..
Now comes the fun part... curves, distances, etc. There are little tidbits of logic throughout the library. You can find some of the basic calculations in the primitives, I.e. arc, circle, sphere, etc.
And of course, let us know if you have questions.
-
RE: Designing with text
For those looking for support for fonts, there's a little library that can be used in projects.
-
RE: A project for rendering JSCAD in JupyterLab
@TerryGeng WOW! Thanks for the really nice introduce to Jupyterlab, and the new JSCAD plugin.
Hopefully some of the members will try this out. I know there are some members using VSCode, and Jupyterlab may be a nice alternative.
Just a question... can existing designs be imported into Jupyterlab easily?
-
Release : 2023 JAN 09
Release : 2023 JAN 09
There's a new release of JSCAD, including changes from several pull requests.
Bug Fixes
- regl-renderer: corrected rendering of overlapping transparent solid objects
- web: add render hotkey message in editor
Thanks to @Loosetooth and @hrgdavor for the fixes.
As well as @ntrrgc for the document improvements.Successfully published:
- @jscad/regl-renderer@2.6.5
- @jscad/web@2.6.3
lerna success published 2 packages
-
Release : 2022 NOV 26
Release : 2022 NOV 26
There's a new release of JSCAD, including changes from several pull requests.
Features
- modeling: added extrudeHelical
Bug Fixes
- modeling: added TS definitions for missing measurement functions
Thanks to @Loosetooth for the new extrudeHelical() functionality.
Thanks to @atkinchris for the TS definition fixes.
Thanks to @Jamesgt for some documentation improvements.
AND THANKS TO EVERYONE FOR THE GREAT FEEDBACK AND SUPPORT. IT'S BEEN A SUPER 2022!!!
Successfully published:
- @jscad/cli@2.2.25
- @jscad/core@2.6.5
- @jscad/3mf-serializer@2.1.7
- @jscad/amf-deserializer@2.3.3
- @jscad/amf-serializer@2.1.13
- @jscad/dxf-deserializer@2.3.20
- @jscad/dxf-serializer@2.1.13
- @jscad/io-utils@2.0.23
- @jscad/io@2.4.4
- @jscad/json-deserializer@2.0.24
- @jscad/json-serializer@2.0.23
- @jscad/obj-deserializer@2.0.23
- @jscad/obj-serializer@2.1.13
- @jscad/stl-deserializer@2.1.20
- @jscad/stl-serializer@2.1.13
- @jscad/svg-deserializer@2.5.4
- @jscad/svg-serializer@2.3.11
- @jscad/x3d-deserializer@2.2.3
- @jscad/x3d-serializer@2.4.3
- @jscad/modeling@2.11.0
- @jscad/regl-renderer@2.6.4
- @jscad/vtree@2.0.24
- @jscad/web@2.6.2
lerna success published 23 packages
-
Release : 2022 SEP 23
Release : 2022 SEP 23
There's a new release of JSCAD, including changes from several pull requests.
Bug Fixes
- svg-deserializer: corrected logic to allow path start == end point
Thanks to @hrgdavor for the nice fixes.
Successfully published:
- @jscad/cli@2.2.24
- @jscad/core@2.6.4
- @jscad/io@2.4.3
- @jscad/svg-deserializer@2.5.3
- @jscad/web@2.6.1
lerna success published 5 packages
Please note that support for Node.js 12 will be removed soon. Node.js 14, 16 and 18 are the maintained versions.
-
RE: Transform a 2D rectangle to a L shape
@Antoine-Guillaume thanks for joining!
You won't be able to precisely mimic the bending of steel plates. Maybe
You can use offset to create a round bend. First, create a path for the L, then offset the path to create rounded corners. And finally, extrude linearly to create the plate.
Please experiment. I think that you can find an answer.
There are other ways as well, so let us know if you need more help.
By the way, we have many members so please us you favorite language.
-
RE: JSCAD preview faster than "same" model OpenSCAD preview
@Hermann-SW Thanks for all the super insights to your designs. It has been great to see you continue and improve the designs, and finally have a great base for more designs.
I haven't seen anyone compare JSCAD to OpenSCAD viewers. We continue to improve the viewer (and modeling library) so it's really nice to have some complements.
We have had some recent performance improvements, based on @platypii and @briansturgill changes. And we have more planned ahead.
-
RE: REST API or automatic loading from script
@cncandi It looks like you made a copy of the JSCAD website. That's really customize to support drag-n-drop, loading projects, URL options, etc. It's probably not what you really want.
Take a look at the websites and frameworks mentioned here.
https://openjscad.xyz/dokuwiki/doku.php?id=en:user_guide_help
Let us know if you have any more questions.
-
RE: How to generate JSCAD model in browser JS and display like demo.html?
@Hermann-SW There several examples of websites mentioned in this user group, so you might want to contact those authors.
It seems that you already stumbled across the simple demo as part of regl-renderer. You could build upon that, or adopt one the frameworks, such as React.
You can find some links on the User Guide. I'm trying to keep this up to date.
-
Release : 2022 AUG 21
Release : 2022 AUG 21
There's a new release of JSCAD, including changes from several pull requests.
Welcome TAU!
TAU is the true constant for relating the circumference of a circle to its linear dimension.
Equivalent to PI*2. You will now find TAU throughout the code base, and mentioned in documentation.
We believe TAU will make rotations simple to understand.EXAMPLE
const { TAU } = require('@jscad/modeling').maths.constants const { cube } = require('@jscad/modeling').primitives const { rotate } = require('@jscad/modeling').transforms const main = () => { const shape = rotate([TAU/4, TAU*0.75, TAU/24], cube({})) return shape } module.exports = { main }
For even more information about TAU, see The Tau Manifesto
Features
- modeling: added TAU constant to maths, and refactored code and documentation
- web: added chinese translations to desktop/locales and web/locales
Bug Fixes
- modeling: added TS definitions for modifiers
Thanks to @jobinson99 for the Chinese translations for the website.
Successfully published:
- @jscad/cli@2.2.23
- @jscad/core@2.6.3
- @jscad/3mf-serializer@2.1.6
- @jscad/amf-deserializer@2.3.2
- @jscad/amf-serializer@2.1.12
- @jscad/dxf-deserializer@2.3.19
- @jscad/dxf-serializer@2.1.12
- @jscad/io-utils@2.0.22
- @jscad/io@2.4.2
- @jscad/json-deserializer@2.0.23
- @jscad/json-serializer@2.0.22
- @jscad/obj-deserializer@2.0.22
- @jscad/obj-serializer@2.1.12
- @jscad/stl-deserializer@2.1.19
- @jscad/stl-serializer@2.1.12
- @jscad/svg-deserializer@2.5.2
- @jscad/svg-serializer@2.3.10
- @jscad/x3d-deserializer@2.2.2
- @jscad/x3d-serializer@2.4.2
- @jscad/modeling@2.10.0
- @jscad/regl-renderer@2.6.3
- @jscad/vtree@2.0.23
- @jscad/web@2.6.0
lerna success published 23 packages
-
RE: openscad.xyz support for "data:" URI scheme would be cool
@Hermann-SW Good questions...
The website has a little Perl script that does the download of the requested file, and checks the content. This does two things; only know file types are allowed, and this goes around CORS.
https://github.com/jscad/OpenJSCAD.org/blob/master/packages/web/remote.pl
I guess that supporting data URL would be possible, but there would have to be some similar checks for data type, etc.
-
RE: openscad.xyz support for "data:" URI scheme would be cool
@Hermann-SW thanks for the suggestions.
The support of data URL contents is not trivia, especially if you expect the 'data' to be evaluated as a JavaScript module. That's kind of breaking every security rule in the book.
However, the support for DATA formats might be possible, such as supplying JSON contents. But that would be very limited.
I think the real solution would be allowing the require() to include modules from remote sites. There are many such requests (issues) for the same functionality.
If you have any ideas then let's discuss via the GitHub discussions. There may be a solution, as modern browsers have a lot of functionality.
-
RE: JSCAD for planar graph embeddings onto (unit) sphere
@Hermann-SW I'm not surprised. The boolean functions require memory and CPU, so high resolution spheres will be very slow. However, newer computers are extremely fast now, so please keep making cool designs!
-
RE: JSCAD for planar graph embeddings onto (unit) sphere
@Hermann-SW WOW! Very nice!
I'm very impressed with the speed of the algorithms! I was expecting to wait for minutes before viewing. But the design was viewable almost immediately!
Do you think that any 3D shape can be 'fitted' to a sphere? How about to a cylinder?
-
RE: How do you single step your code?
@David-Bolt The latest release has a change which retains the webworker thread. So, debugging should be easier now.
-
Release : 2022 JUL 17
Release : 2022 JUL 17
There's a new release of JSCAD, including changes from several pull requests.
Bug Fixes
- modelng:** corrected path2 appendPoints to use concat
- modeling: corrected concat to prevent modifying original paths
- web: changed to retain webworker process
Performance Improvements
- modeling: convert {} objects to Map in insertTjunctions
Successfully published:
- @jscad/cli@2.2.22
- @jscad/core@2.6.2
- @jscad/examples@2.4.2
- @jscad/3mf-serializer@2.1.5
- @jscad/amf-deserializer@2.3.1
- @jscad/amf-serializer@2.1.11
- @jscad/dxf-deserializer@2.3.18
- @jscad/dxf-serializer@2.1.11
- @jscad/io-utils@2.0.21
- @jscad/io@2.4.1
- @jscad/json-deserializer@2.0.22
- @jscad/json-serializer@2.0.21
- @jscad/obj-deserializer@2.0.21
- @jscad/obj-serializer@2.1.11
- @jscad/stl-deserializer@2.1.18
- @jscad/stl-serializer@2.1.11
- @jscad/svg-deserializer@2.5.1
- @jscad/svg-serializer@2.3.9
- @jscad/x3d-deserializer@2.2.1
- @jscad/x3d-serializer@2.4.1
- @jscad/modeling@2.9.6
- @jscad/regl-renderer@2.6.2
- @jscad/vtree@2.0.22
- @jscad/web@2.5.12
lerna success published 24 packages