-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
31,457 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* AMF Import Demonstration | ||
* @category Imports | ||
* @skillLevel 1 | ||
* @description Importing AMF files. Drag the whole AMFImport folder into JSCAD | ||
* @tags amf, import | ||
* @authors Simon Clark | ||
* @licence MIT License | ||
*/ | ||
|
||
// Load the AMF files using require | ||
const rook = require('./Rook.amf') | ||
|
||
const main = () => rook | ||
|
||
module.exports = { main } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "amf-import", | ||
"version": "0.0.1", | ||
"description": "Demonstrating AMF import. Drag the AMFImport folder onto the JSCAD instance.", | ||
"main": "index.js", | ||
"keywords": [ | ||
"jscad", | ||
"cad" | ||
], | ||
"author": "Simon Clark", | ||
"license": "MIT", | ||
"dependencies": {} | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* STL Import Demonstration | ||
* @category Imports | ||
* @skillLevel 1 | ||
* @description Importing STL files. Drag the whole STLImport folder into JSCAD | ||
* @tags stl, import | ||
* @authors Simon Clark | ||
* @licence MIT License | ||
*/ | ||
|
||
const { translate, scale, rotateZ } = require('@jscad/modeling').transforms | ||
const { union } = require('@jscad/modeling').booleans | ||
|
||
// Load the STL files using require | ||
const sculpture = require('./3d_sculpture-VernonBussler.stl') | ||
const frog = require('./frog-OwenCollins.stl') | ||
|
||
const main = () => union( | ||
translate([0, 0, 13], rotateZ(-Math.PI / 3, scale([0.25, 0.25, 0.25], frog))), | ||
translate([-5, 6, 0], sculpture) | ||
) | ||
|
||
module.exports = { main } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "stl-import", | ||
"version": "0.0.1", | ||
"description": "Demonstrating STL file import. Drag the STLImport folder onto the JSCAD instance.", | ||
"main": "index.js", | ||
"keywords": [ | ||
"jscad", | ||
"cad" | ||
], | ||
"author": "Simon Clark", | ||
"license": "MIT", | ||
"dependencies": {} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* SVG Import Demonstration | ||
* @category Imports | ||
* @skillLevel 1 | ||
* @description Importing SVG files. Drag the whole SVGImport folder into JSCAD | ||
* @tags svg, import | ||
* @authors Simon Clark | ||
* @licence MIT License | ||
*/ | ||
|
||
const { translate } = require('@jscad/modeling').transforms | ||
const { extrudeLinear } = require('@jscad/modeling').extrusions | ||
const { polygon } = require('@jscad/modeling').primitives | ||
|
||
// Load the SVG files using require | ||
const panda = require('./babypanda2.svg') | ||
|
||
const main = () => { | ||
// SVG shapes are imported as an array of paths. We want to convert those to polygons to extrude. | ||
const poly = panda.map((shape) => polygon({ points: shape.points })) | ||
return translate([-40, 50, 0], extrudeLinear({ height: 2 }, poly)) | ||
} | ||
|
||
module.exports = { main } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "svg-import", | ||
"version": "0.0.1", | ||
"description": "Demonstrating SVG import. Drag the SVGImport folder onto the JSCAD instance.", | ||
"main": "index.js", | ||
"keywords": [ | ||
"jscad", | ||
"cad" | ||
], | ||
"author": "Simon Clark", | ||
"license": "MIT", | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters