Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Commit

Permalink
0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kaosat-dev committed Nov 24, 2017
1 parent 6b23dd6 commit c73aa8f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="0.4.0"></a>
# [0.4.0](https://github.com/jscad/scad-api/compare/v0.3.6...v0.4.0) (2017-11-24)


### Features

* **rotate_extrude:** partial rotate extrude support and internal fixes ([6b23dd6](https://github.com/jscad/scad-api/commit/6b23dd6)), closes [#28](https://github.com/jscad/scad-api/issues/28)



<a name="0.3.6"></a>
## [0.3.6](https://github.com/jscad/scad-api/compare/v0.3.5...v0.3.6) (2017-11-03)

Expand Down
49 changes: 49 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ Conversion forumla:</p>
<li>return HTML formatted string &quot;#RRGGBB&quot;</li>
</ul>
</dd>
<dt><a href="#rotate_extrude">rotate_extrude([options])</a> ⇒ <code>CSG</code></dt>
<dd><p>rotate extrude / revolve</p>
</dd>
<dt><a href="#torus">torus([options])</a> ⇒ <code>CSG</code></dt>
<dd><p>Construct a torus</p>
</dd>
</dl>

<a name="css2rgb"></a>
Expand Down Expand Up @@ -146,3 +152,46 @@ Conversion forumla:
- return HTML formatted string "#RRGGBB"

**Kind**: global function
<a name="rotate_extrude"></a>

## rotate_extrude([options]) ⇒ <code>CSG</code>
rotate extrude / revolve

**Kind**: global function
**Returns**: <code>CSG</code> - new extruded shape

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [options] | <code>Object</code> | | options for construction |
| [options.fn] | <code>Integer</code> | <code>1</code> | resolution/number of segments of the extrusion |
| [options.startAngle] | <code>Float</code> | <code>1</code> | start angle of the extrusion, in degrees |
| [options.angle] | <code>Float</code> | <code>1</code> | angle of the extrusion, in degrees |
| [options.overflow] | <code>Float</code> | <code>&#x27;cap&#x27;</code> | what to do with points outside of bounds (+ / - x) : defaults to capping those points to 0 (only supported behaviour for now) |

**Example**
```js
let revolved = rotate_extrude({fn: 10}, square())
```
<a name="torus"></a>

## torus([options]) ⇒ <code>CSG</code>
Construct a torus

**Kind**: global function
**Returns**: <code>CSG</code> - new torus

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [options] | <code>Object</code> | | options for construction |
| [options.ri] | <code>Float</code> | <code>1</code> | radius of base circle |
| [options.ro] | <code>Float</code> | <code>4</code> | radius offset |
| [options.fni] | <code>Integer</code> | <code>16</code> | segments of base circle (ie quality) |
| [options.fno] | <code>Integer</code> | <code>32</code> | segments of extrusion (ie quality) |
| [options.roti] | <code>Integer</code> | <code>0</code> | rotation angle of base circle |

**Example**
```js
let torus1 = torus({
ri: 10
})
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jscad/scad-api",
"version": "0.3.6",
"version": "0.4.0",
"description": "OpenSCAD like modeling api for OpenJSCAD & co",
"repository": "https://github.com/jscad/scad-api",
"main": "src/index.js",
Expand Down

0 comments on commit c73aa8f

Please sign in to comment.