Parametric Design with OpenSCAD



Similar documents
>

Copyright 2013 wolfssl Inc. All rights reserved. 2

Regression Verification: Status Report

Bubble Code Review for Magento

Document Management Set Up Guide

How To Use Query Console

TECHNICAL REFERENCE. Version 1.0 August 2013

Stripe Payment Module Magento 2 USER MANUAL MAGEDELIGHT.COM SUPPORT E: SUPPORT@MAGEDELIGHT.COM P: +1-(248)

EVS Broadcast Equipment S.A. Copyright All rights reserved.

Managing Users, Computers, & Groups

IGSS. Interactive Graphical SCADA System. Quick Start Guide

Horizontal Aggregations In SQL To Generate Data Sets For Data Mining Analysis In An Optimized Manner

The Timing Definition Language (TDL)

How-To: Submitting PDF forms to SharePoint from custom websites

M Designing and Implementing OLAP Solutions Using Microsoft SQL Server Day Course

Largest Fixed-Aspect, Axis-Aligned Rectangle

Eu-NORSEWInD - Assessment of Viability of Open Source CFD Code for the Wind Industry

Table of Contents. Overview...2. System Requirements...3. Hardware...3. Software...3. Loading and Unloading MIB's...3. Settings...

Introduction to Python

1 3 4 = 8i + 20j 13k. x + w. y + w

FTP Service Reference

XTM Drupal Connector. A Translation Management Tool Plugin

Load Balancing in Distributed System. Prof. Ananthanarayana V.S. Dept. Of Information Technology N.I.T.K., Surathkal

How to License Microsoft Dynamics GP 2013 and Microsoft Dynamics NAV

RHS429 - Red Hat Enterprise SELinux Policy Administration

Grid Computing in SAS 9.4 Third Edition

Teaching Non-majors Computer Programming Using Games as Context and Flash ActionScript 3.0 as the Development Tools

Title Compliance Software: CBECC-Com

Binary Translation for Fun and Profit

P R O V I S I O N I N G O R A C L E H Y P E R I O N F I N A N C I A L M A N A G E M E N T

McAfee One Time Password

INTERNET DOMAIN NAME SYSTEM

Terminal Services vs. Remote Desktop Connection in Windows 2000 and Windows White Paper

Cleo Communications. CUEScript Training

TopEase Single Sign On Windows AD

Static Program Transformations for Efficient Software Model Checking

Configure IOS Catalyst Switches to Connect Cisco IP Phones Configuration Example

CA Compiler Construction

Lines & Planes. Packages: linalg, plots. Commands: evalm, spacecurve, plot3d, display, solve, implicitplot, dotprod, seq, implicitplot3d.

Basic Cutout Animation Tutorial

Database Management System Dr. S. Srinath Department of Computer Science & Engineering Indian Institute of Technology, Madras Lecture No.

Table of Contents 1 Configuring TallyShop for a Single-Site License Configuring TallyShop for a Multi-Site License... 3

Legal Notes. Regarding Trademarks. Model supported by the KX printer driver KYOCERA MITA Corporation

VTiger CRM + Joomla/ChronoForms Integration

Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports

GSM. Quectel Cellular Engine. HTTP Service AT Commands GSM_HTTP_ATC_V1.2

MULTI COMPANY 4 YOU for VTIGER CRM 6.x

Web Services for Management Perl Library VMware ESX Server 3.5, VMware ESX Server 3i version 3.5, and VMware VirtualCenter 2.5

Colorfly Tablet Upgrade Guide

Files Used in this Tutorial

USC Marshall School of Business Marshall Information Services

pyownet Documentation

Top 10 Oracle SQL Developer Tips and Tricks

Host Installation on a Terminal Server

Magento hierarchy. websites, stores, store views. Scandiweb. 1 First tip. PAGE 1

EXPLORING & MODELING USING INTERACTIVE DECISION TREES IN SAS ENTERPRISE MINER. Copyr i g ht 2013, SAS Ins titut e Inc. All rights res er ve d.

Content Author's Reference and Cookbook

database abstraction layer database abstraction layers in PHP Lukas Smith BackendMedia

Level Set Framework, Signed Distance Function, and Various Tools

FTP Service Reference

Domain Name System Server Round-Robin Functionality for the Cisco AS5800

LMS 365 Learning Module Builder Add-in User Guide VERSION X

SQL Server 2012 Business Intelligence Boot Camp

Web Site: Forums: forums.parallax.com Sales: Technical:

HOWTO: Setting up WP7 monitoring tools with GLite

Configuration Guide. SafeNet Authentication Service AD FS Agent

ScanJour PDF 2014 R8. Configuration Guide

SAP BusinessObjects Financial Consolidation Web User Guide

Business Enterprise Server Help Desk Integration Guide. Version 3.5

Implementing Active Directory Rights Management Services with Exchange and SharePoint

SQL Server 2005 Features Comparison

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

NX Environment Variables

How-To Guide. Crystal Report Demo. Copyright Topaz Systems Inc. All rights reserved.

Technical Notes. EMC NetWorker Performing Backup and Recovery of SharePoint Server by using NetWorker Module for Microsoft SQL VDI Solution

evolution Fixed Network Advanced Metering Infrastructure

Getting Started with the Internet Communications Engine

Module 11 Setting up Customization Environment

Integrating Secure FTP into Data Services

: US Letter. PSA Suite Basic for CRM Invoicing 7.1: Single project invoicing

Install Linmot-Talk R in XP Mode

2) Write in detail the issues in the design of code generator.

Installation Guide for the Intel Server Control

Semester Review. CSC 301, Fall 2015

Next Generation ETS Software A preview of the upcoming new ETS5 system & user enhancements. KNX Association, Brussels André Hänel

Brekeke PBX Version 2 User Guide Brekeke Software, Inc.

Network Shutdown Module V3 Extension of the User Manual for IBM BladeCenter architecture

How to Find High Authority Expired Domains Using Scrapebox

Figure 1-1 System software for developer screen

PORTAL ADMINISTRATION

TECHNICAL NOTE TNOI27

:Introducing Star-P. The Open Platform for Parallel Application Development. Yoel Jacobsen E&M Computing LTD

Transcription:

ParametricDesignwithOpenSCAD JaySummet jay@summet.com Copyright Jay Summet All Rights Reserved

OpenSCAD OpenSourceparametricdesigntool ExecutablesforWindows,Mac,Linux Freetodistribute,freetouse,cross platform Convertstextualinstructionsinto3Dshapes SupportsConstructiveSolidGeometry(CSG) modeling

ResourceLinks Downloads: http://www.openscad.org UserManual: http://en.wikibooks.org/wiki/openscad_user_manual

Comments C/Java/C++commentingconventions Anytextafteradoubleforward slash(//)onaline isignoredbytheparser. Multi linecommentsarestartedwithaslash star (/*)andendedwithastar slash(*/)

NamedValues a.k.a.variables Anameisassignedavaluewiththeassignment operator(=).canuseexpressionsontheright handsideoftheassignmentoperatortocalculate values. CAUTION!:NamedValuesaresetatcompile time,notruntime!lastassignmenttakes precidence!(butseethe assign statement...)

Example:

VariableAdvice Tokeepyourselfsane: Alwaysmakenewvariables,neverre assignnew valuestooldvariables. Thinkofvariablesas constants or descriptive names insteadof variables.

Vectors Example:dims=[w,d,h]; Usingsquarebrackets,declareavectorofvalues, eitherfromconstants,expressions,ornamed values/variables. Example:dims=[w*2,d+3,17];

Statements REQUIREsemicolonstoend! Ifyouforgetthesemicolontheparserwilltypically displaytheerrorasoccuringatthebeginningof thenextline. Socheckthelinebeforetheerror!

Sphere

Transformations Objectsandentiresub treescanhave transformationsappliedtothemthataffecttheir size,placement,colorandshape. Mostcommonlyused:rotate,translate Alsouseful:mirror,scale,color,hull Advanced:multmatrix,minkowski

Sphere Translated

sub tree Thetranslatecommandworksonasub treethat containschildnodes.bydefault,thesub tree includestheimmediatelyfollowingobject,ended byasemicolon. Ifyouuse{curlybrackets}todeliniatesub trees, youcanincludemorethanonemoduleorchild node.

Sphere&CubeTranslated

Sphere NotTranslated Note the extra semicolon!

CenteringonOrigin Bydefault,whenasphereiscreateditiscentered ontheorigin. However,acubeiscreatedwithitscorneratthe originbydefault. Thisiswhythecubeinthepreviousslideisnot centered withinthesphereaftertheyareboth translatedthesameamount.

Sphere&CubeTranslated

Creatingacenteredcube

SpecialArcControlvariables $fn Normallysettozero(0)toallow$faand$fs totakeeffect.ifsettoanumber,allcirclesare madewithexactly$fnstraightlinefragments. $fa Minimumangleforafragment.Numberof fragments=360/$fa.defaultsto12(i.e.30 fragmentsforafullcircle) $fs Minimumfragmentsize.Defaultsto2.Very smallcircleswillhaveasmallernumberof fragmentsthan$faspecifies.

Justuse$fn $fnistheeasiesttouse Ifyouwantcircles, cylinders,andspherestobesmoother,increase $fn. Thelarger$fnis,thelongercalculationstakeand themorevertices/filesizeyourexportedmodels willhave. Cansetglobally,orpasstospecificshapes individually.

$fnexample

Modules Likefunctions,butcanaffectsub treesthatfollow them,socanbeusedtoimplementcomplex transformationsaswellasobjects. Allowyoutoreusecode. Canacceptparameters. Useacurly bracketstodeliniatethesub treeof codethatisthemodule. Havelocalvariablenames.

VariableScope root/globalscopeisdifferentfromwithinamodule, soyoucanre defineavariablewithinamodule withoutaffectingitsvalueoutsideofthemodule. Reminder:Becausevariablesaresetatcompile timeinsteadofruntime,youcannotre assigna variableinsideofanifsub tree.

HexNutModule

Justuse$fn

MakeSpheres

MakeSpheres

MakeSpheres

MakeSpheres

Iterationviaforloops for(variable=<vector>)<sub tree> variableis assignedtoeachiteminthevectorandthesub treeisexecuted. for(variable=<range>)<sub tree> Range=[<start>:<end>] Range=[<start>:<increment>:<end>] Note:Rangesyntaxusescolons,andtheresulting rangeincludesthestartandendpoints

for Range

for Vector

for(multiplevariables) rangeandvector

ifstatements Syntaxlooksabouthowyouwouldexpect. Conditionallyexecutedsub treebasedupon booleanexpressionwithoptionalelseclause. Comeinusefulifyouwanttohave twodifferentversionsoftheobject(differentbolt patterns,adapterplates,etc..) Differentstyles/shapesbaseduponuserparameters. debug vs regular mode.

if syntax if ( <boolean Expression > ) { <executes on true> } else { <executes on false> }

if example

if example

ConstructiveSolidGeometry(CSG) Consistsofmodelingcomplexpartsasunions, intersections,anddifferencesof(relatively) simplerparts. Thehullandminkowskitransformationsarealso usefulforcreatingcompoundobjects.

Makingahollowbox Makealargecubeforyouroutsidedimensions. Makeasmallercubeforyour inside dimensions. Translatethesmallercubeinsidethelargercube (andhaveitstickoutthetopbyaverysmall amountsuchas0.01) Ithasto pokeout ofthetopjustalittlebitsothat thetopfaceisdefinatelyopen!

TwoCubes

HollowBox

HalfSphere intersection

Morethanonewaytoskinacat

OrderMatersforDifference!

hull

Modifiercharacters Characters(#,!,%,*)prependedtoobjectstomodify howtheyareprocessed. Generallyusedtovisualizewhatishappening,try outalimitedsetofcodewithoutothercode interfearing,etc. Mostusefulisthe#orDebugModifier,thatdraws objectsintransparentpinkforvisualization purposes.

intersection DebugView

OtherModifierCharacters Theothermodifiercharactersactuallyaffecthow youroutputisgenerated. % backgroundmodifier drawsthesub tree/objectwithtransparentgray,butignoresit forallotherrenderingpurposes.! rootmodifier IgnoreeverythingELSEinyour file,andonlyrenderthissub tree! * disablemodifier Disable/ignorethissubtree.

ResourceLinks Downloads: http://www.openscad.org UserManual: http://en.wikibooks.org/wiki/openscad_user_manual