mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-08 12:36:51 +02:00
tutorial update, doc fixes, bugfixes
This commit is contained in:
@@ -1172,25 +1172,34 @@ cube(50, center=true)
|
||||
|
||||
## Attaching 2D Children
|
||||
You can use attachments in 2D as well. As usual for the 2D case you
|
||||
can use TOP and BOTTOM as alternative to BACK and FORWARD.
|
||||
can use TOP and BOTTOM as alternative to BACK and FORWARD. With
|
||||
parent-child anchor attachment you cannot use the spin parameter to
|
||||
`attach()` nor can you specify spin to the child. Spinning the child
|
||||
on the Z axis would rotate the anchor arrows out of alignment.
|
||||
|
||||
```openscad-2D
|
||||
include <BOSL2/std.scad>
|
||||
square(50,center=true)
|
||||
rect(50){
|
||||
attach(RIGHT,FRONT)
|
||||
trapezoid(w1=30,w2=0,h=30);
|
||||
color("red")trapezoid(w1=30,w2=0,h=30);
|
||||
attach(LEFT,FRONT,align=[FRONT,BACK],inset=3)
|
||||
color("green") trapezoid(w1=25, w2=0,h=30);
|
||||
}
|
||||
```
|
||||
|
||||
```openscad-2D
|
||||
include <BOSL2/std.scad>
|
||||
circle(d=50)
|
||||
diff()
|
||||
circle(d=50){
|
||||
attach(TOP,BOT,overlap=5)
|
||||
trapezoid(w1=30,w2=0,h=30);
|
||||
attach(BOT,BOT,inside=true)
|
||||
tag("remove")
|
||||
trapezoid(w1=30,w2=0,h=30);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Tagged Operations
|
||||
BOSL2 introduces the concept of tags. Tags are names that can be given to attachables, so that
|
||||
you can refer to them when performing `diff()`, `intersect()`, and `conv_hull()` operations.
|
||||
|
Reference in New Issue
Block a user