All Projects → jscad → scad-api

jscad / scad-api

Licence: MIT License
DEPRECATED: OpenSCAD like API for JSCAD (See the link below)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to scad-api

Rampancy
A new level editor for the Halo games based on a CSG/Brush workflow, similar to Source/Quake level editing.
Stars: ✭ 23 (+64.29%)
Mutual labels:  csg
ofxCorkCsg
A constructive solid geometry (mesh boolean) addon for openFrameworks.
Stars: ✭ 43 (+207.14%)
Mutual labels:  csg
scad-js
A Javascript frontend for solid modeling that compiles OpenSCAD.
Stars: ✭ 44 (+214.29%)
Mutual labels:  openjscad
mcut
A simple and fast library for mesh booleans and more.
Stars: ✭ 57 (+307.14%)
Mutual labels:  csg
ConstructiveGeometry.jl
Algorithms and syntax for building CSG objects within Julia.
Stars: ✭ 27 (+92.86%)
Mutual labels:  csg
rabbit-hole
An experimental voxel engine.
Stars: ✭ 39 (+178.57%)
Mutual labels:  csg
Net3dBool
This is a port of the java j3dbool library to C#
Stars: ✭ 72 (+414.29%)
Mutual labels:  csg
three-csg-ts
CSG library for use with THREE.js
Stars: ✭ 312 (+2128.57%)
Mutual labels:  csg
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.
Stars: ✭ 1,851 (+13121.43%)
Mutual labels:  openjscad

scad-api

GitHub version EXPERIMENTAL Build Status Dependency Status devDependency Status

OpenSCAD like modeling API for OpenJSCAD

This package provides OpenSCAD functionality for OpenJSCAD & Co.

Table of Contents

Background

This package provides an opinionated API that tries to mimic (up to a point) that of OpenSCAD. Currently, this package uses the CSG.js library to implement most functionality.

This package was part of OpenJSCAD.ORG but is now an 'independent' module in the JSCAD organization. Hopefully, this makes usage and development easier.

It gives you ONE variant of syntaxic sugar/ flavor to do solid modeling.

It is using semantic versioning to signal minor and breaking changes.

Installation

npm install @jscad/scad-api

Usage

This package is included by default in OpenJSCAD.org but you can also use it 'standalone'.

const scadApi = require('@jscad/scad-api')

const {cube, sphere} = scadApi.primitives3d
const {union} = scadApi.booleanOps

const base = cube({size: 1, center: true})
const top = sphere({r: 10, fn: 100, type: 'geodesic'})

const result = union(base, top)

API

The API documentation (incomplete) can be found here For more information, see the OpenJsCad User Guide.

For questions about the API, please contact the User Group

NOTE: at this time combined union() of 2d & 3d shapes is not officially supported but still possible via union({extrude2d: true}, op1, op2) this might change in the future

Contribute

This library is part of the JSCAD Organization, and is maintained by a group of volunteers. We welcome and encourage anyone to pitch in but please take a moment to read the following guidelines.

  • If you want to submit a bug report please make sure to follow the Reporting Issues guide. Bug reports are accepted as Issues via GitHub.

  • If you want to submit a change or a patch, please see the Contributing guidelines. New contributions are accepted as Pull Requests via GithHub.

  • We only accept bug reports and pull requests on GitHub.

  • If you have a question about how to use CSG.js, then please start a conversation at the OpenJSCAD.org User Group. You might find the answer in the OpenJSCAD.org User Guide.

  • If you have a change or new feature in mind, please start a conversation with the Core Developers and start contributing changes.

Small Note: If editing the Readme, please conform to the standard-readme specification.

License

The MIT License (MIT) (unless specified otherwise)

NOTE: OpenSCAD and OpenSCAD API are released under the General Public License version 2.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].