meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
en:design_guide_projects [2020/12/08 06:42] JSCAD Editor |
en:design_guide_projects [2021/11/07 07:01] (current) JSCAD Editor |
||
---|---|---|---|
Line 25: | Line 25: | ||
] | ] | ||
return [partA, partB, tires] | return [partA, partB, tires] | ||
+ | } | ||
+ | |||
+ | module.exports = { main } | ||
+ | </ | ||
+ | |||
+ | Projects can also be used when working with external formats, such as STL files. This allows designs to include STL meshes just like any other part. The STL file is placed within the project directory just like any other part. | ||
+ | |||
+ | * .../rc-car | ||
+ | * chassis.js | ||
+ | * body.js | ||
+ | * tire.js | ||
+ | * index.js | ||
+ | * rc_receiver.stl | ||
+ | |||
+ | And the design is adjusted to include the new part from the STL file. | ||
+ | |||
+ | <code javascript> | ||
+ | const chassis = require(' | ||
+ | const body = require(' | ||
+ | const tire = require(' | ||
+ | const receiver = require(' | ||
+ | |||
+ | const main = (params) => { | ||
+ | const partA = chassis(params) | ||
+ | const partB = body(params) | ||
+ | const tires = [ | ||
+ | ... | ||
+ | ] | ||
+ | return [partA, partB, tires, receiver] | ||
} | } | ||