Skip to content

Instantly share code, notes, and snippets.

@pschatzmann
Created February 26, 2020 08:04
Show Gist options
  • Save pschatzmann/4986c03754fce7161b7cbaf6f1a8c871 to your computer and use it in GitHub Desktop.
Save pschatzmann/4986c03754fce7161b7cbaf6f1a8c871 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{"cells":[{"metadata":{},"cell_type":"markdown","source":"# Solid Modelling for 3D Printing for the JVM in Jupyterlab\nI bought myself a 3D printer and I thought it would be cool to program the models in Jupyter.\nI am currently doing a lot in Scala so a JVM based solution running in Jupyter would be my preferred option.\n\nMost of the people use some GUI driven CAD or Graphics Modelling Tools like Blender to develop 3D models. \nThere are only a few lean, easy to learn options wich focus on specifying the design in code.\n\nConstructive Solid Geometry (CSG) is a technique used in modelling to build objects from primitives by using Boolean operations. Here are a couple of the most popular implementations:\n\n\n- [OpenSCAD](https://www.openscad.org/) (using it's own language)\n- [OpenJSCAD](https://openjscad.org/) (using Javascript)\n- [jcsg](https://github.com/miho/JCSG) (Java)\n\nThere are also a couple of Python projects (e.g. viewscad) which are based on OpenSCAD which can be used in Jupyter. Unfortunatly jcsg is based on javafx which prevents that it can be easily used in BeakerX.\n\n## Scad4J\n\nBecause it looked as if it is a quite an easy task, I implemented my own OpenSCAD generator API in Java.\nHere is a quick introduction using the BeakerX kernal of Jupyter. We can use this library to implement our code in\n- Java\n- Scala\n- Kotlin\n- Groovy\n\nThe examples in this Juypter notebook have been implemented wiht the BeakerX kernel in Scala.\n\nIf you want to use this solution you need to install the necessary components. \nThe neceserry details can be found [here](Installation.ipnb).\n\n## Setup\nIn order to be able to visualize the models we need to install the folliwng mime extension\n\n```bash\njupyter labextension install jupyterlab-viewer-3d\n```\n"},{"metadata":{},"cell_type":"markdown","source":"We also need to have openscad installed:\n```bash\napt install openscad -y\n```\n\nFinally we can install the java libraries with the help of Maven"},{"metadata":{"trusted":true},"cell_type":"code","source":"%classpath config resolver maven-public https://software.pschatzmann.ch/repository/maven-public/\n%classpath add mvn ch.pschatzmann:scad4j:0.0.1-SNAPSHOT","execution_count":1,"outputs":[{"name":"stdout","output_type":"stream","text":"Added new repo: maven-public\n"},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"","version_major":2,"version_minor":0},"method":"display_data"},"metadata":{},"output_type":"display_data"},{"data":{"application/vnd.jupyter.widget-view+json":{"model_id":"903368ba-bffe-49c7-bcf5-267a3ce2483f","version_major":2,"version_minor":0},"method":"display_data"},"metadata":{},"output_type":"display_data"}]},{"metadata":{},"cell_type":"markdown","source":"Now we can import all the classes that we use in our demo: "},{"metadata":{"trusted":true},"cell_type":"code","source":"import ch.pschatzmann.scad4j._\nimport java.io.File\nimport java.net.URL","execution_count":2,"outputs":[{"data":{"text/plain":"import ch.pschatzmann.scad4j._\nimport java.io.File\nimport java.net.URL\n"},"execution_count":2,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"All the functionality can be accessed with the help of the SCAD class. \nYou can explicitly define the formatter class (which translates the scad file to a 3D format) in the following way. Currently we can use OpenSCADFormatter() and OpenJSCADFormatter().\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"SCAD.setFormatter(new ch.pschatzmann.scad4j.format.OpenSCADFormatter())\n","execution_count":3,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"If you want to publish your workpbook you should render the result as 2D images:"},{"metadata":{"trusted":true},"cell_type":"code","source":"SCAD.setDisplay3D(false)\n","execution_count":4,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Now we are ready create an scad factory instance which is used to create other SCAD objects. The only state that this class is holding are the global parameter, which you might need when loading external scad files. But we will cover this later."},{"metadata":{"trusted":true},"cell_type":"code","source":"var model = new SCAD()\n","execution_count":5,"outputs":[{"data":{"text/plain":"scad4j V0.1"},"execution_count":5,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"### Simple 3D Objects - Cube\nWe can create a simple cube be giving the size"},{"metadata":{"trusted":true},"cell_type":"code","source":"var cube = model.cube().size(10)\n","execution_count":7,"outputs":[{"data":{"text/plain":"cube([10,10,10]); "},"execution_count":7,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"cube.display","execution_count":8,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 1 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAL/klEQVR42u3bwVFCQRRFQdJgYQZmaBBEYU4kQBJugKVVbj84805XdQQ4756/8XS/3wAIOvkJAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQABY1c/1048AAkBu+v/ys4AAUFx/PQABwPrrAQgA1l8PQACw/noAAoD11wMQAEy/GIAAYP31AAQA668HIABYfz0AAcD66wEIANZfDEAAMP16AAKA9dcDEACsvx6AAGD99QAEAOuvByAAWH8xAAEw/egBAoD1Rw8QAKw/eoAAYP3RAwQA648eIABYf8QAAcD0owcIANYfPUAAsP7oAQKA9UcPEACsP2KAAGD90QMEANOPHiAAWH/0AAHA+qMHCADWHz1AALD+iAECgPVHDxAA0w96gABYf9ADBMD6gx4gANYf9AABsP4gBgiA9Qc9EAC/gukHPRAArD/ogQBg/UEPBADrD3ogAFh/EAMBwPqDHggAph/0QACw/qAHAoD1Bz0QAKw/iIEAYP1BDwSg7vvy4YpADwTAhz+wt+cnnQBg/cH6CwDWHwRAALD+MHj9BQDrD9H1FwBMP0TXXwCw/iAAAoD1h9L6CwDWH6LrLwBYfxAAAbD+LgRK6y8AmH6w/gJg/YHM+gsA1h8EQACsP1BafwGw/kB0/QXA+gPR9RcA0w8IgABYf6C0/gJg/YHo+guA9QcEQACsP2D9BcD6A7PXXwBMPxBdfwGw/oAACID1B0rrLwDWH4iuvwBYfyC6/gJg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VAACAaA1svAAIAxRgYegEQACjGwMoLgABANAZWXgA0AIpMvAAIAAgArfUXABAAQy8AAgACgAAIAAgAAiAAIAACIAACAAIgAAIgACAAAiAAAgACIAACoAEgAAIgAAIAAiAAAiAAIADWXwAEAARAAARAAEAABEAABAAEQAAEQABAAARAAJwlWH8BEABAAASgFAANAAEQAAEABEAABAAQAAEQAEAArL8AAAIgAAIACIAACAAgAAIgAIAACIAAAAIgAOsHQANAAARAAAABEAABAARAAAQAEAABEABAAARAAAABsP4CAAiAAAgAIAACIACAAAjA+gHQABAAARAAQAAEQAAA6y8AAgAIgAAIACAAAiAAgAAIgAAAAmD9BQAQAAHYKgAaAAIgAAIACIAACAAgAAIgAIAACIAAAAIgAAIACIAACAAgAAIgAIAACIAAgACY+/b67xEADQABEAABAARAAAQAEAABEABAAARAAAABEAABAARAAAQAsP4CIACAAAiAAIAAIAAaAAJAbf0FAAQAARAAEAABEAABAAEQAAEQABAAARAAAQABEAABEAAQAAEQAAEAARAAARAAEAABEAANAAEQAAEQABAA6y8AAgACIAACIAAgAAIgAAIAAiAAAiAAIAACIAACAAIgAAIgACAAAiAA7hYEQACaAdAAEAABEADA+lt/AQAEQAAEABAA6y8AgAAIgAAAAmD9BQAQAOsvACAAAiAAAgACYP0FQANAAARAAAQABMD6C4AAgAAIgAAIAAiA9RcAAQABsP4CIAAgAAIgAAIAAmD9BUAAQAAEQAAEAATA+guABoAAWH8BEAAQAAEQAAEAAbD+AiAAIAACIAACANbf+guAAIAACIAACAAIgPUXAEAArL8AAAIgAIUAaAAIgPUXAEAABEAAAAGw/gIACAACALQCYNYFACgGwKYLACAACACQCYBBFwBAABgdAA0AAbD+AgAIgAAIAJAMgCkXAKAYADsuAIAAIABAJgBGXAAAAUAAAOuPAAACwMwAaACUA2C+BcBJQzEAtlsABAAEAAEAMgEw3AIgACAACACQCYDVFgABAAFAAIBMAEy2AAgAFANgrwVAA0AAEAABgEwAjLUACAAIAAIgAJAJgKUWAAGAYgDMtAAIAAgAAiAAkAmAjRYAAQABQAA0ADIBMNACIAAgAAiAAEAmANZZAAQArD8CIAAgAAiAAMDgANhlARAAEAAEQAAgEwCjLAACAAKAAGgAZAJgkQVAAKAYAHMsAAIAAoAACABkAmCLBUAAQAAQAAGATAAMsQAIAAgAAiAAkAmAFRYAAYBiAEywAGgACAACIACQCYD9FQABAAFAAAQAMgEwvgIgACAACIAAQCYAllcAZACsPwKgBCAACIASwOAA2FwBUAIQAARACSATAIMrAEoAAoAAKAFkAmBnBEAJoBgA2yIASgACgAAoAWQCYEYEQAlAABAAJYBMACyGACgBFANgJQRACUAAEAAlgEwADIIAKAEIAAKgBJAJgNsXAJQAAUAAUAIyAXDmAoASUAyA0xYAlAABQABQAjIBcMUCgBLg8x8BQAnw+Y8AoAQIAAKAEjAtAG5TAFACigFwjwKAEiAACABKQCYATk8AUAIEAAFACcgEwJUJAEqAACAAKAGZADgoAUAJKAbAEQkASoAAIAAoAZkAuBcBQAkQAAQAJSATAKchACgBAoAAoARkAuAKBAAlsKrFAHj5AgBKIAAIAChBJgAeuQCAEvj8RwBACXz+IwCgBAKAAIASTAuApysAIAbFAHirAgBKIAAIAChBJgCepQCAEggAAgBKkAmAFygAoATFAHh1AgBKIAAIAChBJgAemACAEggAAgBKkAmAtyQAoAQCgACAEmQC4NkIAChBMQCeigCAEggAAgBKkAmAVyEAoAQCgACAEmQC4AEIAHATAAQAlMD6IwCgBHMD4O8rAMDMEggAAgDRElh/BACiJRAABACiJbD+CABESyAACABES2D9EQCIlsD6IwAQLYEAIAAQLYH1RwAgWgIBQAAgWgLrjwBAtAQCgABAtATWHwGAaAmsPwIA0RIIAAIA0RJYfwQAoiUQAAQAoiWw/ggAREsgAAgAFEtg/REAAAQAAAEAEAC/AoAAACAAAAgAAAIAgAAAIAAACAAAAgCAAACwnAd1hgzRvoSFcAAAAABJRU5ErkJggg=="},"execution_count":8,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"cube.toSTL.substring(1,200)","execution_count":9,"outputs":[{"data":{"text/plain":"olid OpenSCAD_Model\n facet normal -0 0 1\n outer loop\n vertex 0 10 10\n vertex 10 0 10\n vertex 10 10 10\n endloop\n endfacet\n facet normal 0 0 1\n outer loop\n vertex 10 0 1"},"execution_count":9,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"cube.save(new File(\"data/cube1.stl\"))","execution_count":10,"outputs":[{"data":{"text/plain":"data/cube1.stl"},"execution_count":10,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"var cube1 = model.cube().size(18,28,8).center(true)\n","execution_count":11,"outputs":[{"data":{"text/plain":"cube([18,28,8],center=true); "},"execution_count":11,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"cube1.display","execution_count":12,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 1 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAALJElEQVR42u3dwU1D2RJFUafBgAycIUE4CnJyAk7CE2MmCHn+BFV7SSuAFv/V2fd70H16PG4ABJ38CQAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEwF8BQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEgL3u17M/AggAxfV/4W8CAkBx/fUABADrLwYgAFh/PQABwPqLAQgA1l8PQAAw/WIAAoD11wMQAKy/GCAAYP31AAEA6y8GCABYfz1AA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QAAAEAYLovTO7NuGY4BZAAAAAASUVORK5CYII="},"execution_count":12,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"and can save the result into a stl file..."},{"metadata":{"trusted":true},"cell_type":"code","source":"cube1.save(new File(\"data/cube1.stl\"))\n","execution_count":13,"outputs":[{"data":{"text/plain":"data/cube1.stl"},"execution_count":13,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"### Transformations\n\nWe can transform the objects:\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"var cube2 = model.cube().size(10)\n .color().values(\"red\")\n .scale().values(10.0)\n .rotate().values(90.0,0.0,0.0)\n .mirror().values(10.0,10.0,10.0)\n\ncube2","execution_count":14,"outputs":[{"data":{"text/plain":"mirror(v=[10.0,10.0,10.0]) rotate(a=[90.0,0.0,0.0]) scale([10.0,10.0,10.0]) color(\"red\") cube([10,10,10]); "},"execution_count":14,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"For an complete overview of all SCAD objects I can recommend the following [document].(https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_Language)\n\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"cube2.display","execution_count":15,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 1 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAJNklEQVR42u3Vyw3CMBRFwfQv0QWtUUdAYsuC8Elin5Gmgif7nmVdbwAELU4AIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAIACuACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACACAArgAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAALAaJbl8orLgAAw8/Q/Xd7maCAAzLP+mwKgCiAATDL9PwmAKoAAMOT6/ykAqgACwKmnf+cAqAIIACda/zM0QBUQADhg+s8ZAFVAAGCP9R8lAKqAAMAvp3/0AEgCAgCfr/9kAVAFBADTLwCqgABg/QVAFRAATL8AqAICgPUXAFVAAAhPvwCoAgJAd/0FQBUQAKLrLwCqgABQnH4BUAUEgO76C4AqIAAUp18AJAEBoLv+AqAKCADF6RcAVUAA6K6/AAgAAkBx+gVAABAAuusvAAKAAFCcfgEQAASA7voLgAAgABSnXwAEAAGgu/4CIAAIAMXpFwABQADorr8ACAACQHH6BUAAEAC66y8AAoAAUJx+AdAABIDu+guAACAAFKdfAAQAAaC7/gIgAAgAxekXAAFAAOiuvwAIAAJAcfoFQAAQALrrLwACgABQnH4BEAAEgO76C4AAIAAUp18ABAABoLv+AiAACADF6RcAAUAA6K6/AAgAAkB0/QVAABAABAABQAAQAAQAAUAAEAAEQAAEAAFAAARAABAABEAABAABQAAEQAAQAARAAAQAAUAABEAAEAAEQAAEAA1AAARAABAAAXACARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAARAABAABEAABQAAQAAEQAAQAAUAAEAAEAAFAABAABAABQAAQAARAAAQAAUAABEAAEAAEQAAEAAFAAARAAxAABEAABAABQAAEQADQAARAAAQAAUAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAEAAFAAARAABAABEAABAABQAAQAAQAAUAAEAAEAAFAAARAABAABEAABAABQAAEQAAQAARAAAQAAUAABEAAEAAEQAAEAA1AAARAABAABEAABAABEABXEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAB8IUFAAEQAAFAABAAARAABAABQAAQAAQAAUAAEAAEAAFAABAABEAABAABQAAEQAAQAARAAAQAAUAABEAAEAAEQAAEAAFAAARAANAABEAABAABQAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAAAQAAUAABEAAEAAEQAAEAAFAABAABAABQAAQAAQAAUAABEAAEAAEQAAEAAFAAARAABAABEAABAABQAAEQAAQAARAAAQADUAABEADEAAEQAAEAAEQAFcQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAARAABAABEAABQAAQAOMoAAgAAoAAIAAIAAKAACAACAACIAACgAAgAAIgAAgAAiAAAoAAIAACIAAIAAIgAAKABiAAAiAACAACIAACgAAgAAIgAAiAACAAAoAACAACIAAIgAAgAAKAAAgAAiAACIAAIAACgAAIAAIgAAiAACAAAoAACAAC8LbrdjZUABAAAchNv1QIAAIgAHZfKgQAARAAuy8VAoAACIDplwoBQAAEwO5LhQAgAAJg+nVCABAAAbD7UiEACIAA2H2OSYW/LADMEADrKRUCIAC0AmAK+SYV/rIAMGQATBvf85cFgJECYLMw+gJAKwBmC7svAOQCYLkw+gJAKwDGC7svALQCYLyw+wJALgD2C6MvALQCYMKw+whALgBWDKOPALQCYMiw+whAKwCGDKOPAOQCYM6w+whAKwDmDLuPAOQCYNEw+ghAKwBGDbuPALQCYNQw+ghALgCmDbuPAKRZOow+AoBm2H0QADTD7oMAoBlGHwQAzbD7IABohtEHAUAz7D54eXBMMBwZAYBWMxwKAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEwAkABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABMAVAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAODhDnolL3ys/QJtAAAAAElFTkSuQmCC"},"execution_count":15,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"# Composition of Objects\nObjects can be composed with unions, difference and intersect operations:"},{"metadata":{"trusted":true},"cell_type":"code","source":"var obj1 = model.union(\n model.difference(\n model.cube().size(3).center(),\n model.sphere().radius(3)\n ),\n model.intersection(\n model.sphere().radius(1.3),\n model.cube().size(2.1).center()\n )\n).translate().values(0.0, 0.0, 1.5).obj().scale().values(10.0);","execution_count":16,"outputs":[{"data":{"text/plain":"scale([10.0,10.0,10.0]) translate([0.0,0.0,1.5]) \nunion() {\n \n difference() {\n cube([3,3,3],center=true); \n sphere(r=3); \n } \n \n intersection() {\n sphere(r=1.3); \n cube([2.1,2.1,2.1],center=true); \n } \n} "},"execution_count":16,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"...and display it\n\n### Displaying 3D \n\nAs you have seen so for, all objects will display in Jupyter directly as SCAD code. But you can also display the 3D image.\nInitially I thought this is not an issue, but unfortunatly I did not find any existing Mime Renderers for the relevant 3D formats in Jupyter, so I have implemented one myself. \n\nIf you have a renderer installed in Jupyter for the mime type \"model/stl\" you can display the 3D object with\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"obj1.display()","execution_count":17,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 4 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAK8UlEQVR42u3bwW1TWxhGUSpAIjMGUEG6YMyUBiiDIjKgBib0g0QD1IDEBCJFSFECjmNf2+ecvaRVwVXut++P33vx+/cPAIJeeAQAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAAAuApAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAAAiApwAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAwv1/fr+94FCAAFNf/MB4gCADF9RcMEACsv2CAAGD9BQMEAOsvEiAAWH8BQADA+l/axw+v/CUgAFh/RwAIANbfEQACgPV3BIAAYP0dASAAWH9HAAgA1t8RAAKA9XcEgABg/R0BIABY/4kCoAEIANbfEQACgPV3BIAAYP0dASAACIAjAAQA6+8I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sP4gAGiA9QcBIJYB6w8CQDQD1h8EgGgDTD8IANEM2H0QALoZsPsgAEQbYPpBAIhmwO6DABDNgN0HASDaALsPAkA3A6YfBIBoBuw+CADRBth9EACiGbD7IABEG2D3QQDoZsD0gwAQzYDdBwEg2gC7DwJANAN2HwSAaAZMPwgAGmD3QQCIZcDugwAQzYDdBwEg2gC7DwJANAOmHwQADbD7IADEMmD3QQAAEAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABABAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABABAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQAQAI8AQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABACAzf0BCHkerJzkxW8AAAAASUVORK5CYII="},"execution_count":17,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"## Loading and Saving Data\n"},{"metadata":{},"cell_type":"markdown","source":"### Saving Data¶\n\nWe can save the object in different formats. Usually this is scad, stl,off, amf, 3mf, csg, dxf, svg, png, echo, ast, term, nef3, nefdbg. This however depends on the selected Formatter. \n\nThe most frequently used format in 3D printing are STL, AMF, 3MF.\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"cube2.save(new File(\"data/cube2.scad\"))\ncube2.save(new File(\"data/cube2.stl\"))\ncube2.save(new File(\"data/cube2.amf\"))\ncube2.save(new File(\"data/cube2.3mf\"))\n","execution_count":18,"outputs":[{"data":{"text/plain":"data/cube2.3mf"},"execution_count":18,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"### Loading Data - Scad Code\n\nYou can create a new object with the help of SCAD code"},{"metadata":{"trusted":true},"cell_type":"code","source":"var loadExample = model.scad(\"\"\"\n\n scale([10.0,10.0,10.0]) translate([0.0,0.0,1.5]) \n union() {\n\n difference() {\n cube([3.0,3.0,3.0],center=true); \n sphere(r=3.0); } \n\n intersection() {\n sphere(r=1.3); \n cube([2.1,2.1,2.1],center=true); } } \n\n\"\"\")","execution_count":19,"outputs":[{"data":{"text/plain":"\n\nscale([10.0,10.0,10.0]) translate([0.0,0.0,1.5])\nunion() {\n \n difference() {\n cube([3.0,3.0,3.0],center=true);\n sphere(r=3.0); }\n \n intersection() {\n sphere(r=1.3);\n cube([2.1,2.1,2.1],center=true); } }\n\n"},"execution_count":19,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"loadExample.display","execution_count":20,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 4 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAK8UlEQVR42u3bwW1TWxhGUSpAIjMGUEG6YMyUBiiDIjKgBib0g0QD1IDEBCJFSFECjmNf2+ecvaRVwVXut++P33vx+/cPAIJeeAQAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAAAuApAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAAC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f0BCHkerJzkxW8AAAAASUVORK5CYII="},"execution_count":20,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"### Loading Data from URL \n\nYou can also load scad code from a URL"},{"metadata":{"trusted":true},"cell_type":"code","source":"model.addParameter(\"part\",\"pi3\")\nvar urlPi = new URL(\"https://raw.githubusercontent.com/saarbastler/library.scad/master/raspberrypi.scad\")\nvar pi = model.scad(urlPi)\n\npi.display()","execution_count":21,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 57 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAaH0lEQVR42u3dW6slZ53A4X2/k+50ZyednfTuQ7I7CToSMCFCwIBCkCBeBPpCFAnbQEAIOxIMBkKyhQTNhQdEepCMSIgMQuOFoIiKjuwvMNfzBeZLzI2zdDlrlutQqw5vvfUenuK5MOlD2tVV/9+qt2rV2vvrX/8bgArteQkABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABMCrACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACACAAXgUAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAA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j+4fbAcAK+8AAAZx+DqG1cffu3hw1cPNw79/U/u7z+1f/H5i5deuLQIwCOvP3Lt7WteagEA8i7BIgBXXr7ywJcfOHjp4PKLl+/7/H0Xnrtwz9P3zAJw77P3LgLw4FcfFAABAAopwY4APLU5AF5VAQCyj8G2AMzf/q8HwGsoAEAhJVgOwPr6z3IADm4feN0EACjHLAANFwDmAfAqCQAAAgCAAAAgAAAIAAACAIAAACAAAAgAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAEv+Fxp5LAtI+qv2AAAAAElFTkSuQmCC"},"execution_count":21,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"model.addParameter(\"part\",\"piZero\")\nvar pi = model.scad(urlPi);\npi.display()","execution_count":22,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 52 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAX80lEQVR42u3dy4sd1b7A8cw773QenaTT6U4nHfCCoODAgYOAAwcOBAeCA2kHAUG2jSAIwokgiAgiIl4OCOJR7iT/Rf6BO77/wP0n7sRbyT5ut/vV9Vi1atVan+Izajt9Trb271tVqx5n/vjjfwEo0BkfAYAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAIAAACAAA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AAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAIAA+AgABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABMCnACAAAAgAAAIAgAAAIAAACAAAI/T/cq+tcSO4TEEAAAAASUVORK5CYII="},"execution_count":22,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"var urlPig = new URL(\"https://raw.githubusercontent.com/pschatzmann/openscad-models/master/Pig.scad\")\nmodel.setParameterValue(\"corkRadiusFront\",\"10\").setParameterValue(\"corkRadiusBack\",\"10\")\nvar pig = model.scad(urlPig)\npig.display","execution_count":23,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 26 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAemklEQVR42u3df+xvdUHH8f5liFcCrsiNH5eLBNzLTe69kKYilbYrK5HdxhoV0AJmQphNdCRE4bTSmlPWEH/ltVgIU7OyTWyxNOiX/dosccvZaq61VmQLM1j79MZzPR0+P87nfM7n/Hi/3+exPf9hE/zez/1+Xo/POZ/P55xvmc2+IkmaYN/iIZAkAEiSACBJAoAkCQCSJABIkgAgSQKAJAkAkiQASJIAIEkCgCQJAJIkAEiSACBJAoAkCQCSJABIkgAgSQKAJAkAkiQASJIAIEkCgCQBQJIEAEkSACRJAJAkAUCSBABJEgAkSQCQJAFAkgQASRIAJEkAkCQBQJIEAEkSACRJAJAkAUCSBABJEgAkSQCQJAFAkgQASRIAJAkAHgVJAoAkCQCSJABIkgAgS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gQASRIAJAkAHgJJAoAkCQCSJABIkgAgSQKAJAkAkiQASJIAIEkCgCQJAJIkAEiSACBJAoAkCQCSJABIkgAgSQKAJAkAkiQASJIAIEkCgCQJAJIkAEgSACRJAJAkAUCSBABJEgAkSQCQJAFAkgQASRIAJEkAkCQBQJIEAEkSACRJAJAkAUCSBABJEgAkSQCQJAFAkgQASRIAJEkAkCQBQJIA4FGQJABIkgAgSQKAJAkAkqRs+j8nO9Qmjv8W5gAAAABJRU5ErkJggg=="},"execution_count":23,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"### Loading Data from File \nOr you can load scad code from a local file"},{"metadata":{"trusted":true},"cell_type":"code","source":"new File(\"data/cube.scad\").exists","execution_count":24,"outputs":[{"data":{"text/plain":"true"},"execution_count":24,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"var fromFile = model.scad(new File(\"data/cube2.scad\"))\nfromFile.display()","execution_count":25,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 1 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAJNklEQVR42u3Vyw3CMBRFwfQv0QWtUUdAYsuC8Elin5Gmgif7nmVdbwAELU4AIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAIACuACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACACAArgAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAALAaJbl8orLgAAw8/Q/Xd7maCAAzLP+mwKgCiAATDL9PwmAKoAAMOT6/ykAqgACwKmnf+cAqAIIACda/zM0QBUQADhg+s8ZAFVAAGCP9R8lAKqAAMAvp3/0AEgCAgCfr/9kAVAFBADTLwCqgABg/QVAFRAATL8AqAICgPUXAFVAAAhPvwCoAgJAd/0FQBUQAKLrLwCqgABQnH4BUAUEgO76C4AqIAAUp18AJAEBoLv+AqAKCADF6RcAVUAA6K6/AAgAAkBx+gVAABAAuusvAAKAAFCcfgEQAASA7voLgAAgABSnXwAEAAGgu/4CIAAIAMXpFwABQADorr8ACAACQHH6BUAAEAC66y8AAoAAUJx+AdAABIDu+guAACAAFKdfAAQAAaC7/gIgAAgAxekXAAFAAOiuvwAIAAJAcfoFQAAQALrrLwACgABQnH4BEAAEgO76C4AAIAAUp18ABAABoLv+AiAACADF6RcAAUAA6K6/AAgAAkB0/QVAABAABAABQAAQAAQAAUAAEAAEQAAEAAFAAARAABAABEAABAABQAAEQAAQAARAAAQAAUAABEAAEAAEQAAEAA1AAARAABAAAXACARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAARAABAABEAABQAAQAAEQAAQAAUAAEAAEAAFAABAABAABQAAQAARAAAQAAUAABEAAEAAEQAAEAAFAAARAAxAABEAABAABQAAEQADQAARAAAQAAUAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAEAAFAAARAABAABEAABAABQAAQAAQAAUAAEAAEAAFAAARAABAABEAABAABQAAEQAAQAARAAAQAAUAABEAAEAAEQAAEAA1AAARAABAABEAABAABEABXEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAB8IUFAAEQAAFAABAAARAABAABQAAQAAQAAUAAEAAEAAFAABAABEAABAABQAAEQAAQAARAAAQAAUAABEAAEAAEQAAEAAFAAARAANAABEAABAABQAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAAAQAAUAABEAAEAAEQAAEAAFAABAABAABQAAQAAQAAUAABEAAEAAEQAAEAAFAAARAABAABEAABAABQAAEQAAQAARAAAQADUAABEADEAAEQAAEAAEQAFcQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAAUAABAABEAAEQAAQAAFAAAQAARAABEAAEAABQAAEAAEQAARAABAAARAABAABEAABQAAQAOMoAAgAAoAAIAAIAAKAACAACAACIAACgAAgAAIgAAgAAiAAAoAAIAACIAAIAAIgAAKABiAAAiAACAACIAACgAAgAAIgAAiAACAAAoAACAACIAAIgAAgAAKAAAgAAiAACIAAIAACgAAIAAIgAAiAACAAAoAACAAC8LbrdjZUABAAAchNv1QIAAIgAHZfKgQAARAAuy8VAoAACIDplwoBQAAEwO5LhQAgAAJg+nVCABAAAbD7UiEACIAA2H2OSYW/LADMEADrKRUCIAC0AmAK+SYV/rIAMGQATBvf85cFgJECYLMw+gJAKwBmC7svAOQCYLkw+gJAKwDGC7svALQCYLyw+wJALgD2C6MvALQCYMKw+whALgBWDKOPALQCYMiw+whAKwCGDKOPAOQCYM6w+whAKwDmDLuPAOQCYNEw+ghAKwBGDbuPALQCYNQw+ghALgCmDbuPAKRZOow+AoBm2H0QADTD7oMAoBlGHwQAzbD7IABohtEHAUAz7D54eXBMMBwZAYBWMxwKAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEwAkABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAABMAVAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAODhDnolL3ys/QJtAAAAAElFTkSuQmCC"},"execution_count":25,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"### Printing Modules from File "},{"metadata":{"trusted":true},"cell_type":"code","source":"pig","execution_count":26,"outputs":[{"data":{"text/plain":"/**\n Cork Pal - Parametrized Pig\n\n by Phil Schatzmann \n \n**/\n \ncorkRadiusFront=10;\ncorkRadiusBack=10;\nmouthLen = 16;\nmountR1 = 4;\nmouthR2 = 9;\nlegHeight=15;\ncylinderHeight=8;\n\n\n\nmodule body(corkRadius) {\n cylinder(h=cylinderHeight, r=corkRadius+1, center=false,$fn=80);\n}\n\nmodule bodyHole(corkRadius) {\n translate([0,0,2]) \n cylinder(h=200, r=corkRadius,$fn=50);\n}\n \nmodule legs(corkRadius) {\n translate([corkRadius-4,5,3]) rotate([0,90,0]) \n cylinder(legHeight,3,1.5,$fn=8);\n translate([corkRadius-4,-5,3]) rotate([0,90,0]) \n cylinder(legHeight,3,1.5,$fn=8); \n}\n \nmodule back() {\n difference() {\n union() {\n body(corkRadiusBack);\n legs(corkRadiusBack);\n translate([-(corkRadiusBack+2),0,3]) \n sphere(r=3);\n }\n bodyHole(corkRadiusBack);\n }\n }\n \nmodule face(corkRadius) {\n difference() {\n union() {\n eye(corkRadius, 4);\n eye(corkRadius, -4);\n translate([3,0,0])\n cylinder(h=mouthLen, r1=mountR1, r2=mouthR2, center=true);\n }\n nose();\n } \n}\n\nmodule eye(corkRadius, pos) {\n translate([-(corkRadius-3),pos,0]) \n sphere(r=1,$fn = 20); \n}\n\nmodule nose() {\n union() {\n translate([3,mountR1/2,1]) \n cylinder(h=400,r=1,$fn = 20,center=true);\n translate([3,-mountR1/2,1]) \n cylinder(h=400, r=1,$fn = 20,center=true); \n }\n}\n\nmodule ear() {\n difference() {\n sphere(r = 3);\n translate([0,0,-3]) \n sphere(r = 3);\n }\n}\n\nmodule ears() {\n translate([-corkRadiusFront,-8,2])\n ear();\n translate([-corkRadiusFront,8,2])\n ear();\n}\n \nmodule head() {\n translate([0,0,cylinderHeight]) rotate([180,0,0]) {\n difference() {\n union() {\n body(corkRadiusFront);\n translate([0,0,cylinderHeight-6]) legs(corkRadiusFront);\n face(corkRadiusFront);\n ears();\n }\n bodyHole(corkRadiusFront);\n }\n }\n}\n \nmodule printAll() {\n max = max(corkRadiusFront,corkRadiusBack)+5;\n if (corkRadiusBack>0){\n translate([0,-max,0]) back();\n }\n if (corkRadiusFront>0){\n translate([0,max,0]) head();\n }\n}\n\n\nprintAll();\n"},"execution_count":26,"metadata":{},"output_type":"execute_result"}]},{"metadata":{},"cell_type":"markdown","source":"Usually the scad file consists of modules and finally at the end the call to build the whole model. If we want to use just some individual modules we need to remove the printAll(); from above and replace it with the call of the desired module:"},{"metadata":{"trusted":true},"cell_type":"code","source":"var modules = pig.remove(\"printAll.*;\")\nmodules.evaluate(\"back();\").display","execution_count":27,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 8 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAUTklEQVR42u3dzattZQHHcachJqKZKb4bEYqFSkXmSxBxkcDEaKAlRBJZV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AAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAACAAAAgCAAAAgAAAIAAACAIAAACAAAAgAAAIAgAAAIAAAAuBVABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBgsP8Coycq1LnBl/wAAAAASUVORK5CYII="},"execution_count":27,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"modules.evaluate(\"head();\").display","execution_count":28,"outputs":[{"name":"stderr","output_type":"stream","text":"Compiling design (CSG Products normalization)...\nNormalized CSG tree has 18 elements\n"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAAcYUlEQVR42u3dbaxlVWHHYb4SUKTAgIwIzCAOMExgBoi2xlIrDZIUNTSkoSnQRIgVxZqUNhSROkRtrI1RY1C0VWyJKBEr1SaiKamUqVWrMbFFE0mNhjTVKNqIiHy4Xddlt4fzss8++3WtvZ/k+dAQK+O9c/+/s9e+Z5/DtrYeAWCCDvMlABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABABAAXwUAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAAAfBVABAAAAQAAAEA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UXAEASftEDARAAYKI9EAABACbaA+svAMBEeyAAAgBMNwnWXwCAifbA+gsAMNEeWH8BAEAAABAAAAQAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAQAB8FQAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAAEAAABAEAAABAAAAQAAAEAQAAAEAAABAAAAQBAAAAQAAABAEAAABAAAAQAAAEAQAAAEAAABACA1P0fpCwQDjyDicwAAAAASUVORK5CYII="},"execution_count":28,"metadata":{},"output_type":"execute_result"}]},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"name":"scala","display_name":"Scala","language":"scala"},"language_info":{"nbconverter_exporter":"","codemirror_mode":"text/x-scala","name":"Scala","mimetype":"","file_extension":".scala","version":"2.11.12"},"toc":{"nav_menu":{},"number_sections":false,"sideBar":false,"skip_h1_title":false,"base_numbering":1,"title_cell":"Table of Contents","title_sidebar":"Contents","toc_cell":false,"toc_position":{},"toc_section_display":false,"toc_window_display":false},"widgets":{"application/vnd.jupyter.widget-state+json":{"state":{"223302bf-8da8-40e8-8efe-b64f211ef6de":{"model_module":"@jupyter-widgets/base","model_module_version":"*","model_name":"LayoutModel","state":{"_model_module_version":"*","_view_module_version":"*","align_content":"","align_self":"","border":"","bottom":"","flex":"","height":"","justify_content":"","left":"","margin":"","max_height":"","max_width":"","min_height":"","min_width":"","msg_throttle":3,"overflow":"","overflow_x":"","overflow_y":"","padding":"","right":"","top":""}},"44d05e7b-ff91-4dfe-826c-47438c0af45b":{"model_module":"beakerx","model_module_version":"*","model_name":"BxHTMLModel","state":{"background_color":null,"color":null,"font_family":"","font_size":"","font_style":"","font_weight":"","layout":"IPY_MODEL_d3ff0877-083c-456b-9ed9-a272b54fb49f","msg_throttle":3,"placeholder":"","value":"scad4j-0.0.1-SNAPSHOT.jar, httpclient-4.5.11.jar, httpcore-4.4.13.jar, commons-logging-1.2.jar, commons-codec-1.11.jar, commons-io-2.6.jar","visible":true}},"80e410b5-a365-4d17-a8f0-bb7d8c85d792":{"model_module":"@jupyter-widgets/base","model_module_version":"*","model_name":"LayoutModel","state":{"_model_module_version":"*","_view_module_version":"*","align_content":"","align_self":"","border":"","bottom":"","flex":"","height":"","justify_content":"","left":"","margin":"","max_height":"","max_width":"","min_height":"","min_width":"","msg_throttle":3,"overflow":"","overflow_x":"","overflow_y":"","padding":"","right":"","top":""}},"903368ba-bffe-49c7-bcf5-267a3ce2483f":{"model_module":"beakerx","model_module_version":"*","model_name":"FoldoutModel","state":{"background_color":null,"children":["IPY_MODEL_44d05e7b-ff91-4dfe-826c-47438c0af45b"],"color":null,"description":"","disabled":false,"font_family":"","font_size":"","font_style":"","font_weight":"","headerLabel":"Added jars: ","hidePreview":false,"layout":"IPY_MODEL_223302bf-8da8-40e8-8efe-b64f211ef6de","msg_throttle":3,"visible":true}},"d3ff0877-083c-456b-9ed9-a272b54fb49f":{"model_module":"@jupyter-widgets/base","model_module_version":"*","model_name":"LayoutModel","state":{"_model_module_version":"*","_view_module_version":"*","align_content":"","align_self":"","border":"","bottom":"","flex":"","height":"","justify_content":"","left":"","margin":"","max_height":"","max_width":"","min_height":"","min_width":"","msg_throttle":3,"overflow":"","overflow_x":"","overflow_y":"","padding":"","right":"","top":""}}},"version_major":2,"version_minor":0}}},"nbformat":4,"nbformat_minor":4}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment