OpenSCADCookbook

From Clothbot

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:17, 11 May 2011 (edit)
AndrewPlumb (Talk | contribs)
(Model Design for 3D Fabrication)
← Previous diff
Revision as of 17:49, 24 May 2011 (edit)
AndrewPlumb (Talk | contribs)

Next diff →
Line 1: Line 1:
 += OpenSCAD Quickstart =
 +
 +This chapter's purpose is to ramp you up quickly on the basics of solid model coding in OpenSCAD.
 +
 +== Primitive Objects ==
 +
 +== Boolean Operators ==
 +
 +
 +
= Model Design for Re-Use = = Model Design for Re-Use =

Revision as of 17:49, 24 May 2011

Contents

OpenSCAD Quickstart

This chapter's purpose is to ramp you up quickly on the basics of solid model coding in OpenSCAD.

Primitive Objects

Boolean Operators

Model Design for Re-Use

This chapter's purpose is designed to get you thinking in terms of model re-use.

Positive and Negative Space

Your code-fu may be strong, but even the simplest of models may be less than manifold. Here are some tricks to help force the issue.

Keep 'em Separated

  • Design your object body parts separate from your object holes

Add Glue Objects to Faces Intended to Bind

  • Design-in simple cube, cylinder and/or sphere geometry at the interface where two parallel object surfaces are intended to join. Helps accomodate floating point errors.

Extend Holes Beyond the Edge

  • Design-in extensions to the holes to fully cut thru the positive space boundary. Helps accomodate floating point errors.

Intersection Masks

Adding a Bevel to a Cylinder

  • Simple example to illustrate masking operations.

Creating Shells - 2D

  • Introduction to the concept for 2D outlines of areas. Creating the second, inner wall.

Creating Shells - 3D

  • Embrace and extend the 2D example.

Polygons and Polyhedrons

Using Projections for 2D Slicing

  • Useful for generating 2D slices (like MRI slices) and for combining with linear and rotational extrude operations for quantizing 3D models in an algorithmic fashion.

Array Reuse With File Include and Use Statements

  • Define point arrays in separate files for include and reuse
  • Create functions to access full array of points and size
  • Use violin example.

Interpolated Lookup

  • Quantize, re-index and/or interpolate intermediate points with lookup().

Troubleshooting Polyhedra

  • It's tricky coding these up so they work.

Model Design for 3D Fabrication

Things to consider when designing for quirks in your chosen 2D, 2.5D and 3D fabrication process.

Parametric Tolerances

  • Designing for interlock and separation.

Design Simple Unit Test Print Structures

  • Think up the simplest object you can print to measure the limits of your fabrication process.
  • Laser kerf versus thermal expansion.

Holes

  • 3D printed holes may shrink in diameter by up to the deposited material wall (path) thickness.
    • Is often compensated for in the slicing software and/or printer calibration. More of an issue with low-end printers or two-stage manufacturing processes like bronze-infused stainless steel.
    • Circular holes are only as precise as the line segments that define them.
    • See Polygonal hole test by nophead.
  • Laser cut holes grow in diameter by the laser beam's width.
    • Most laser cutters don't know anything about inner vs outer points of enclosed areas

Pegs

  • 3D printed peg-type structures may grow or shrink in diameter by the deposited material wall (path) thickness.
    • Is often compensated for in the slicing software and/or printer calibration. More of an issue with low-end printers or two-stage manufacturing processes like bronze-infused stainless steel.
    • Circular pegs are only as precise as the line segments that define them.

Just Say No to Bell Bottoms

  • Bottom layer edges sometimes flair out in 3D printed designs
    • Design in a bevel around the perimeter to compensate.
    • Is often compensated for in the slicing software and/or printer calibration. More of an issue with low-end FDM printers when printing without a raft or other sacrificial material.

Magnetic Perimeters

  • Close object surfaces tend to merge.
    • All 3D printers have design rules that specify how far apart distinct surfaces must be to remain distinct.
    • Applies to sharp inner angles and longer, narrow-diameter holes.

Orient for Your Strengths

  • Many 3D printing processes are strong in two of three dimensions. In fused deposition modeling (FDM) techniques like those used in MakerBot and RepRap printers, the Z-axis is weakest to shearing forces.
    • Design long, thin parts in the XY plane.
    • Consider orienting irregular shapes at a diagonal X-Z or Y-Z angle for compromise.

Over Hangover

Teardrop Tunnels

  • Design in 45-degree maximum overhangs in horizontal holes using tear-drop and truncated tear-drop shapes.

Polar Diamonds

  • Think polar coordinates to create diamond-shaped tunnels and channels at any elevation.
Personal tools