@Peter-Birch how to use them where ?
Posts made by hrgdavor
-
RE: How can I prevent my Cad design from
@Shunder0
i do not understand even slightest what you are asking here -
RE: How do I code directly in VSCode and preview the result on my web page?
@ucimo there are two plugins for vscode to preview jscad designs on the market.
Also you can edit your script in vscode and drag drop the file to https://openjscad.xyz after enabling auto-reload there. It will not work for typescript out of the box, but you can setup esbuild to bundle into js file and drag drop that file in openjscad for preview.
There is also https://jscad.app that is not yet official, it is a protoype for new jscad preview/edit . It supports typescript (transpiles it on the fly) and has some perf improvements too. If you feel chatty you can join the jscad discord channel also.
-
RE: Can "openjscad.xyz/?uri=..." support "data" protocol in addition to "http(s)"?
@Hermann-SW yes, the repo is better for bugs and features
-
RE: Can "openjscad.xyz/?uri=..." support "data" protocol in addition to "http(s)"?
@Hermann-SW do you have an github account ? This would be nicer as a github issue.
-
RE: Small "shift+enter" bug in openjscad.xyz?
@Hermann-SW do you have an github account ? This would be nicer as a github issue.
-
RE: can not import c:/jscad/whatever.stl on windows
@DBJDBJ did you try to drag and drop the folder onto the website instead ?
I tried the example from jscad repo: packages\examples\import\STLImport
https://github.com/jscad/OpenJSCAD.org/tree/master/packages/examples/import/STLImportI used the folder from the checked out code
and it worked with the button and with drag and drop.
Can you provide a link to zip file with the failing project?
-
RE: OpenJsCAD + physics engine?
@jumpjack2 you can export models from openscad or jscad to .obj or .stl meshes and then it is no more question of integrating with rapier, but a question of how you import meshes to rapier.
actual integration with jscad is much more complex problem.
-
RE: Embedding a design in a website
@cdub I have been slowly working on providing bits and pieces to create different apps/websites with jscad embeded in different ways here
https://github.com/hrgdavor/jscadui/ ... contributors are welcomeone of demos is about making a new version of jscad web https://jscad.app that was actually made by @platypii
Although my progress is slow there, that is also one place where you could find useful stuff.
-
RE: fetch() in a design
@Andreas-Plesch jscad.app is just a new prototype, not yet part of official jscad, I did not implement /remote ... it is meant for fetching remote scripts you can report issues on jscadui git or ask on discord.
-
RE: fetch() in a design
@Andreas-Plesch there is also this
https://github.com/hrgdavor/jscadui/tree/main/apps/model-pageI made this as an example for some users that asdek on discord and published sample here https://3d.hrg.hr/tmp/darvin/
-
RE: fetch() in a design
@Andreas-Plesch jscad.app has been just updated, and the example:
const jscad = require('@jscad/modeling') const { deserializers } = require('@jscad/io') const { translate, scale, rotateZ } = jscad.transforms const main = async () => { const url = 'https://raw.githubusercontent.com/jscad/OpenJSCAD.org/master/packages/io/x3d-deserializer/tests/ElevationGrids.x3d' const response = await fetch(url) const cadX3D = await response.text() const cad = deserializers.x3d({ output: 'geometry' }, cadX3D) console.log(cad[1], jscad.geometries.geom3.isA(cad[1])) return cad[1] } module.exports = { main }
works now
-
RE: fetch() in a design
@Andreas-Plesch jscadui project also aims to simplify for users to create their own flavor of jscad app, or demo page for their parametric creations.
talking about it, it may be cool if jscad app reacts to drag and drop of an url .... we then create a sample script that shows how to read model from ulr and how to start manipulating it
const jscad = require('@jscad/modeling') const { deserialize } = require('@jscad/io') const { translate, scale, rotateZ } = jscad.transforms const main = async () => { const object = await deserialize('https://raw.githubusercontent.com/jscad/OpenJSCAD.org/master/packages/io/x3d-deserializer/tests/ElevationGrids.x3d') // you can do some jscad operations on the loaded object and return // that instead the generated return below // sample script returns the deserialized object return object } module.exports = { main }
-
RE: fetch() in a design
latest prototype of https://jscad.app supports async/promises main method.
const jscad = require('@jscad/modeling') const { deserializers } = require('@jscad/io') const { translate, scale, rotateZ } = jscad.transforms const main = async () => { const url = 'https://raw.githubusercontent.com/jscad/OpenJSCAD.org/master/packages/io/x3d-deserializer/tests/ElevationGrids.x3d' //const url = 'https://raw.githubusercontent.com/create3000/Library/main/Tests/Components/CADGeometry/CADGeometry.x3d' const response = await fetch(url) const cadX3D = await response.text() // const cadX3D = x3d const cad = deserializers.x3d({ output: 'geometry' }, cadX3D) console.log(cad[1], jscad.geometries.geom3.isA(cad[1])) return cad[1] } module.exports = { main }
the version that works with above mentioned code is not live yet, you can test by runing locally (untili it is):
https://github.com/hrgdavor/jscadui/tree/main/apps/jscad-webIMPORTANT: jscad.app is playground for prototyping future version of openjscad web app, and is not part of of jscad officially yet, but most if not all features will make it to jscad when ready.
-
RE: Interoperability with URDF / Gazebo and modelling of Robots
@RelatingData that is openscad syntax, not jscad.
-
RE: AI in JSCAD for Generative AI
@Jason-Sprouse it is an interesting idea. I am skeptical bout viability of current "AI" that is actually not AI, not even close.
-
RE: Starting reusing JSCAD for unfolding projects
@gilboonet cool, combining it into single app would be awesome one day
-
RE: How about a new design?
@z3dev I periodically mention discord channel to ppl, so we could from time to time also mention this forum to users on those git tickets.
-
RE: Default JSCAD script (index.js) for self-hosted website
@z3dev that is exactly type of projects I want more jscad users to be able to do. It will likely be able to benefit from some of the resopnsiveness improvments I am making.
-
RE: export colored model to .obj
@gilboonet vool . Nice to see it working