hero image

view on npm(opens new window) npm module downloads(opens new window) Dependents

view on npm(opens new window) npm moduledownloads(opens new window) Dependents

Twitter Follow

# jscad-utils

This is a collection of utilities for openjscad projects. These modify the CSG object adding utilities for alignment, scaling and colors. There are also some basic parts that use outside dimensions rather than radii.

For an example, see the yeoman jscad generator(opens new window) which will create a project that uses this library.

# Version 4

I'm currently updating jscad-utils to work with the new JsCad v2. The code base has moved to ES6, built with Rollup and has some unit tests. There is a v1 compatibility file for continued use with JsCad 1.9.x. The examples work with the compatiblity shim and 1.9.

I still need to get the documentation to build again and upgrade the other libraries and yeoman generator.

This new version is scoped in npm under @jwc/jscad-utils.

# Upgrading

You need to remove the previous version and then install the new one.

npm remove jscad-utils
npm install @jwc/jscad-utils

If you are using a recent yoeman generated project, it should pick up the new version. If you are using any of the other jscad-* libraries, be careful, they are having issues until I update them to ES6, stick to the v3 untill they are updated.

# Installation

You will need Node.js(opens new window) version 6.4 installed. Other versions will probobly work, but that's what it's tested with. Install jscad-utils using NPM:

npm install --save jscad-utils

# Basic usage

To use the utilities, you need to include the jscad-utils.jscad.


main() {


# Publishing

Use np(opens new window) to publish to NPM.

# Examples

Examples are placed in the dist directory with the jscad-utils.jscad file injected into them. This allows the files to be included directly into openjscad.org.

Here are some of the examples: