0.2.0 • Published 6 years ago
jsxcad v0.2.0

JSXCAD
JSXCAD is a new way of "writing" 3DCAD like a code. It offers familiar JSX syntax that is transpiling into OpenJSCAD.

Users beware: JSXCAD is under the alpha stage. Many APIs are missing. Please do not attempt to deploy it on your production environment unless you are fully aware of what it means.
Install
Install jsxcad via npm.
npm install -g jsxcadUsage
Write your 3D model and save it as logo.jsx.
import JSXCAD, {Union, Difference, Intersection, Cube, Sphere} from 'jsxcad';
const OpenJSCADLogo = (
<>
<Union>
<Difference>
<Cube size={3} center={true} />
<Sphere r={2} center={true} />
</Difference>
<Intersection>
<Sphere r={1.3} center={true} />
<Cube size={2.1} center={true} />
</Intersection>
</Union>
</>
);
export default JSXCAD.render(OpenJSCADLogo);Compile logo.jsx with jsxcad command.
jsxcad -f stl -o ./logo.stl ./logo.jsxNow you got logo.stl!