Skip to content

Latest commit

 

History

History
82 lines (58 loc) · 2.59 KB

README.md

File metadata and controls

82 lines (58 loc) · 2.59 KB

Logo

Cadmio

Cadmio is a new way of "writing" a 3D model. It offers familiar JSX syntax that is transpiling into OpenJSCAD.

Users beware: Cadmio 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 cadmio via npm.

npm install -g cadmio

🚀 How to Use

Workflow

Write your 3D model and save it as logo.jsx.

import Cadmio, { Union, Difference, Intersection, Cube, Sphere } from 'cadmio';

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>
);

const Logo = Cadmio.create(
  'Union',
  Cadmio.create('Difference'),
  Cadmio.create('Difference'),
);

export default Cadmio.render(Logo);

Compile logo.jsx with cadmio command.

cadmio -f stl -o ./logo.stl ./logo.jsx

Now you got logo.stl!

Contributing

PRs welcome!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


uetchy

💻 📖

Sora Morimoto

💻

This project follows the all-contributors specification. Contributions of any kind welcome!