A System for Customizable Project Designs William Adams Abstract Design Into 3D Is a System for Modeling Parametric Projects for Manufacture Using CNC Machines

A System for Customizable Project Designs William Adams Abstract Design Into 3D Is a System for Modeling Parametric Projects for Manufacture Using CNC Machines

136 TUGboat, Volume 40 (2019), No. 2 Design into 3D: A system for customizable project designs William Adams Abstract Design into 3D is a system for modeling parametric projects for manufacture using CNC machines. It documents using OpenSCAD to allow a user to in- stantly see a 3D rendering of the result of adjusting Figure 2: Shapeoko 3 (XXL) a parameter in the Customizer interface, saving pa- rameters as JSON files which are then read into a LuaLATEX file which creates a PDF as a cut list/setup “slicing” application), and laser and plasma cutters sheet/assembly instructions and uses MetaPost to are limited to 2D (with the possibility of repeated create SVG files which may be loaded into a CAM passes for lasers), mills and routers afford the limita- tool. A further possibility is using a tool such as tion of a 2.5D movement of the tool over and around TPL (Tool Path Language) to make files which are the part, and the flexibility of using tooling with ready to cut. different shapes which will allow efficient cutting of surfaces with finishes not readily achieved with other 1 iT X E tools. They also afford the possibility of loading It has been almost ten years since Prof. Knuth made stock larger than the working area and either cutting the earthshaking announcement of iTEX (see fig. 1; it incrementally (known as tiling) or cutting only a my thanks to Robin Laakso, executive director who small portion of the stock (e.g., when cutting joinery kept track of her keepsake as I did not). For the into the end of a board). folks who were not fortunate enough to be able to attend: youtube.com/watch?v=eKaI78K_rgA (from 2 CNC machines tug.org/tug2010/program.html). Since then, CNC machines have become far more The announcement posited a successor to TEX affordable and accessible, mostly due to the open which would among other things, support 3D, and sourcing of the Enhanced Machine Controller,1 and output to: the development of Grbl which runs on the inexpen- • lasercutters sive Arduino,2 with one early machine on its third • embroidering machines iteration3 (see fig. 2). • 3D printers I happened to pick up a Shapeoko 1 (an open • plasma cutters source hobbyist CNC machine based on Bart Dring’s 4 all of which are examples of Computer Numeric Con- MakerSlide, which uses the open source G-Code trol (CNC) machines. Presumably other machines interpreter Grbl running on an Arduino) early on, such as mills and routers would also have been sup- and became involved in the project doing documen- ported. While 3D printers have a straightforward tation and so forth, and now work for the company mechanism for creating parts (load a 3D file into a as off-site tech support. 3 CAD/CAM CNC is driven by Computer Aided Design (CAD), and Computer Aided Manufacturing (CAM). Most applications thus far developed for this follow the same basic concept: Draw a design or shape, select elements of it and assign appropriate toolpaths to those elements. This works, but can be tedious and repetitive, especially when a design needs some 1 www.nist.gov/publications/use-open-source- distribution-machine-tool-controller 2 bengler.no/grbl 3 carbide3d.com/shapeoko 4 www.kickstarter.com/projects/93832939/ Figure 1: iTEX keepsake makerslide-open-source-linear-bearing-system William Adams TUGboat, Volume 40 (2019), No. 2 137 but there are no readily accessible tools for taking such specifications (or parameters) and directly and immediately creating the design in a format a com- puter can work with. Parametric tools do allow one to create such designs, but the design has to be created (or programmed) in such a tool. 5 Parametric CAD That last does indicate a class of tool which is suited for this sort of work: Parametric CAD applications allow one to use numbers, formulae, and algorithms directly to define a design. Commercial examples: • Autodesk Fusion 360/Inventor Figure 3: Carbide Create user interface • CATIA V5 • NX • Onshape adjustment such as size or the inclusion or removal • Pro Engineer of a feature. • Rhino 3D (when using the Grasshopper plug-in) Even a simple, small, round box scrolls off the • Solid Edge interface when enumerating all of its toolpath set- • SolidWorks tings, making it tedious to transfer said settings Many open source applications have also been devel- to a different project, let alone set them up in the oped which afford this style of design: 5 first place. (Fig. 3 shows Carbide Create, a freely • FreeCAD — unfortunately somewhat limited in CAD CAM available / program). the calculations which may be performed; using CAM Some 3D tools do afford options for export- a spreadsheet is advocated as a work-around6, ing settings and loading them into different projects, and importing OpenSCAD files is also an option. but then one is restricted to the toolpaths which a 3D • NaroCAD CAM tool can create, and must work up a 3D model • OpenVSP (Vehicle Sketch Pad from NASA) of the project in question. While the latter may not • SolveSpace — fully graphical, with parameter be much of a limitation, the former certainly is. alteration requiring selection. • Varkon 4 Tagging vs. parameters But the most notable implementations are those TEX works from the idea of a manuscript, assign- which are programmatic in nature. Arguably there ing to it macros/tagging/markup which then allow are too many to name (especially as any program- A the text to be typeset. Moreover, (L )TEX typically ming language can be one), but of special note are: doesn’t describe a document as fully as would be • Antimony — regrettably available for only GNU/ needed to make it into a finished object, omitting con- Linux and Mac OS X; previous versions were the siderations such as signatures, binding method, and subject of the developer, Matt Keeter’s, aca- usually the design of a physical cover or dust jacket. demic thesis. Unfortunately, the CAD/CAM workflow doesn’t al- low for the sort of free-flowing narrative which even • Maker.JS — a Microsoft Garage Project, this a rigorous scientific paper would allow. For exam- tool supports 2D design, but requires special ple, it may be possible to define a potential project effort to create a 3D file or preview. concisely: • OpenSCAD — the most popular tool, widely used for 3D printing, and is notable for support on the • Project type: Box popular project-sharing site Thingiverse which • Shape: Round inaugurated the “Customizer” feature. • Lid style: Fitted • Number of compartments: 1 • PLaSM • Box dimensions: • Tool Path Language (TPL) — a relatively re- cent development, this is a JavaScript variant – Diameter 50.8mm supporting creation of G-Code to control the – Height 16.175mm machine. 5 carbide3d.com/carbidecreate 6 floatingcam.com/blog/freecad-parametric-design Design into 3D: A system for customizable project designs 138 TUGboat, Volume 40 (2019), No. 2 Figure 5: OpenSCAD design with Customizer Figure 4: Blockly interface and graphical code of the initial prototype "Height": "13.5", "Length": "66.675", This attempt at a representative sampling includes "PARTNO": "0", the most popular implementation, OpenSCAD, which "Thickness": "6.35", was used for the implementation of this project. "Width": "209.55", 6 BlocksCAD "depth": "25.4", "diameter": "3.175", Initial development was done using the Blockly im- "dividers_lengthwise": "1", plementation of OpenSCAD BlocksCAD (see fig. 4).7 "dividers_thickness": "3.175", There are a number of similar tools, with varying "dividers_widthwise": "2", tradeoffs, compromises, and difficulties. A better "endmillshape": "1", tool, with better graphical integration (specifically, "largecompartment": "2", the ability to select nodes, edges, or faces and drag "partspacing": "12.7" them) would make for even easier development. } BlocksCAD allows one to save a project as an }, XML file, and to export to OpenSCAD. Similar tools "fileFormatVersion": "1" include OpenJSCAD and Flood Editor. } 7 OpenSCAD It is then a matter of loading the JSON data BlocksCAD allowed a rapid development without into variables. The first tool which makes use of this A METAPOST worrying about the trivialities of coding such as the is LuaLTEX, as well as the embedded placement of semi-colons and an easy conversion into interpreter. Fortunately, the Lua scripting language 8 the textual OpenSCAD. has a tool available for importing JSON data. Also, More important for the project is where the Henri Menke (at the conference) demonstrated an Customizer features (unfortunately unsupported by elegant system for reading in JSON which merits BlocksCAD) were implemented; see fig. 5. investigation (see pp. 129–135 in this issue). 8 Presets \newcommand{\boxspecification}{export} %\typein[\boxspecification]{What preset to use?} Once a design has been worked up using the cus- \begin{luacode} tomization interface, the parameters must be passed function read(file) to other tools. Fortunately, OpenSCAD implements local handler = io.open(file, "rb") saving design settings as “presets” in a JSON file: local content = handler:read("*all") { handler:close() "parameterSets": { return content "export": { end "$fn": "45", JSON = (loadfile "JSON.lua")() "Boxshape": "0", local table = JSON:decode(read( "Clearance": "0.01", "designinto3dboxfitted.json")) 7 www.blockscad3d.com/editor 8 regex.info/blog/lua/json William Adams TUGboat, Volume 40 (2019), No. 2 139 PARTNO: 0 Boxshape: 0 First, define a macro for each value which may Clearance: 0.01 Height: 13.5 Length: 66.675 Thickness: 6.35 then be redefined at need: Width: 209.55 depth: 25.4 diameter: 3.175 dividers: lengthwise: 1 % "PARTNO": "0", thickness:

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us