-
Notifications
You must be signed in to change notification settings - Fork 166
Tutorial Attachment Parts
Some objects provide named attachable parts that you can select instead of using the main geometry for the object. One important kind of attachable part is the inside of a tube.
Here is a tube with its anchors shown:
include<BOSL2/std.scad>
tube(id=20,h=15,wall=3)
show_anchors();
The anchors are all on the outside wall of the tube and give you no
method for placing a child inside the tube. In order to attach
inside the tube, we select the "inside" part using the attach_part()
module.
include<BOSL2/std.scad>
tube(id=20,h=15,wall=3)
attach_part("inside")
align(BACK,TOP)
color("lightblue") cuboid(4);
Now when we align the cube to the BACK wall of the tube it appears on
the inside of the tube. If you need to attach to both the inside and
outside you can place some attachments using attach_part()
and some
with the standard attachment geometry on the outside like this:
include<BOSL2/std.scad>
diff()
tube(id=20,h=15,wall=3){
attach([1,-1/2],BOT)
color("green")cyl(d=4,h=3,$fn=12);
attach_part("inside"){
attach(LEFT,BOT,align=TOP)
color("lightblue")cuboid(4);
attach(BACK,CTR,align=TOP,inside=true, inset=-0.1)
cuboid(4);
}
}
Table of Contents
Function Index
Topics Index
Glossary
Cheat Sheet
Tutorials
Basic Modeling:
- constants.scad STD
- transforms.scad STD
- attachments.scad STD
- shapes2d.scad STD
- shapes3d.scad STD
- drawing.scad STD
- masks2d.scad STD
- masks3d.scad STD
- distributors.scad STD
- color.scad STD
- partitions.scad STD
- miscellaneous.scad STD
Advanced Modeling:
- paths.scad STD
- regions.scad STD
- skin.scad STD
- vnf.scad STD
- beziers.scad STD
- nurbs.scad
- rounding.scad STD
- turtle3d.scad
- isosurface.scad
Math:
- math.scad STD
- linalg.scad STD
- vectors.scad STD
- coords.scad STD
- geometry.scad STD
- trigonometry.scad STD
Data Management:
- version.scad STD
- comparisons.scad STD
- lists.scad STD
- utility.scad STD
- strings.scad STD
- structs.scad STD
- fnliterals.scad
Threaded Parts:
Parts:
- ball_bearings.scad
- cubetruss.scad
- gears.scad
- hinges.scad
- joiners.scad
- linear_bearings.scad
- modular_hose.scad
- nema_steppers.scad
- polyhedra.scad
- sliders.scad
- tripod_mounts.scad
- walls.scad
- wiring.scad
STD = Included in std.scad