OpenJSCAD.org icon indicating copy to clipboard operation
OpenJSCAD.org copied to clipboard

VSCode integration

Open HKalbasi opened this issue 4 years ago • 5 comments

OpenSCAD has an extension for vscode which it's main function is adding two buttons, one for export to stl and one to preview the file. Is there something similar for JSCAD?

HKalbasi avatar Apr 28 '21 01:04 HKalbasi

OpenSCAD has an extension for vscode which it's main function is adding two buttons, one for export to stl and one to preview the file. Is there something similar for JSCAD?

JSCAD doesn’t have a preview function. Just drag and drop any design to the website, which compiles the design and renders the results. And of course, the same results can be exported as STL, DXF, etc.

z3dev avatar Apr 28 '21 02:04 z3dev

Also, check out jscad-now, I use it with VSCode and I like the browser's debugger better than if it were in a VSCode extension window. https://github.com/danmarshall/jscad-now

danmarshall avatar Apr 28 '21 04:04 danmarshall

This would be a very nice feature to have as part of JSCAD (or community). If anyone has some skill at writing VSCODE extensions then this could be very easy to get started.

See the following for inspiration.

V1

https://github.com/ayan4m1/vscode-scad

https://github.com/ryx/vscode-jscad

V2

https://github.com/crysislinux/vscode-openjscad

z3dev avatar Apr 09 '22 23:04 z3dev

@crysislinux would you be interested in taking this on?

z3dev avatar Apr 09 '22 23:04 z3dev

@z3dev I haven't touched 3d modeling for some time. I guess I am not able to maintain https://github.com/crysislinux/vscode-openjscad for a long time, I can transfer the project if someone is interested. the code may be a bit hard to understand. Here I will describe the core ideas of the project:

  1. I learned the code of the v2 website, and created two js classes to simplify the job. OpenJscadBuilder to build the data structure and OpenJscadViewer to render the data structure. They were built into a single js file called openjscad-web-sdk.js, the source is not on Github (not because I don't want to open source it), I can provide the source.
  2. then everything else is vscode related, watch files -> rebuild data -> render data.

crysislinux avatar Apr 11 '22 10:04 crysislinux