jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.65k stars 514 forks source link

2D Scene #1246

Closed kamildul closed 1 month ago

kamildul commented 1 year ago

Hello, i have a problem. I don't now how i can switch 3d scene to 2d scene, it is posible? If yes how i can do it? I have online/web version without node.js - only apache + web browser. Thanks!

z3dev commented 1 year ago

@kamildul welcome!

the website (and renderer) show 2D shapes laying on the Z plane, flat.

what version of JSCAD are you using?

kamildul commented 1 year ago

Hello z3dev, i'm use Version JSCAD V2.6.4. I want to get the 2d mesh effect without 3d planes and display imported dxf on it

z3dev commented 1 year ago

@kamildul there are probably several options.

first, you could use JSCAD to import DXF, and then export to SVG. Any browser can display the SVG, which can be imbedded into HTML as well.

second, you could use this library to convert DXF to SVG. it's probably the best DXF library available. https://github.com/skymakerolof/dxf