Constructive Solid Geometry (CSG) Library


209110.7.03 years ago5 years agoMinified + gzip package size for @jscad/csg in KB



Constructive Solid Geometry (CSG) Library

GitHub version Build Status

Solid modelling library (2d & 3d)


Constructive Solid Geometry (CSG) is a modelling technique that uses Boolean operations like union and intersection to combine 3D solids. This library implements CSG operations on meshes elegantly and concisely using BSP trees, and is meant to serve as an easily understandable implementation of the algorithm.

Table of Contents


npm install @jscad/csg


  • as Node module :
const csg = require('@jscad/csg')


The API documentation can be found here.

Also see the OpenJsCad User Guide.

For questions about the API, please contact the User Group


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 this README, please conform to the standard-readme specification.


Some copyrights apply. Copyright (c) 2012 Joost Nieuwenhuijse (joost@newhouse.nl), under the MIT license. Copyright (c) 2011 Evan Wallace (http://madebyevan.com/)


The MIT License (MIT) (unless specified otherwise)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.