mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 00:09:41 +00:00
assorted doc fixes
This commit is contained in:
parent
ec52d79c99
commit
979aa016c4
3 changed files with 16 additions and 15 deletions
|
@ -581,7 +581,7 @@ module orient(anchor, spin) {
|
|||
// do the same thing but you would have to figure out the correct child anchor, which is not always obvious.
|
||||
// .
|
||||
// Because `align()` works by setting the child anchor, it overrides any anchor you specify to the child:
|
||||
// any `anchor=` value given to the child is ignored.
|
||||
// **any `anchor=` value given to the child is ignored.**
|
||||
// .
|
||||
// Several options can adjust how the child is positioned. You can specify `inset=` to inset the
|
||||
// aligned object from its alignment location. If you set `inside=true` then the
|
||||
|
@ -648,14 +648,14 @@ module orient(anchor, spin) {
|
|||
// cyl(h=20,d=10,$fn=128)
|
||||
// align([1,.3],TOP)
|
||||
// color("lightblue")cuboid(5);
|
||||
// Example: Orienting the child is done in the global coordinate system (as usual) not in the parent coordinate system. Note that the blue prismoid is not lined up with the parent face. (To place the child on the face used {{attach()}}.
|
||||
// Example: Orienting the child is done in the global coordinate system (as usual) not in the parent coordinate system. Note that the blue prismoid is not lined up with the parent face. (To place the child on the face use {{attach()}}.
|
||||
// prismoid(50,30,25)
|
||||
// align(RIGHT)
|
||||
// color("lightblue")prismoid([10,5],[7,4],height=4,orient=RIGHT);
|
||||
// Example: Setting inside=true enables us to subtract the child from the parent with {{diff()}. The "remove" tag is automatically applied when you set `inside=true`, and we used `out=0.01` to prevent z-fighting on the faces.
|
||||
// Example: Setting `inside=true` enables us to subtract the child from the parent with {{diff()}}. The "remove" tag is automatically applied when you set `inside=true`, and we used `shiftout=0.01` to prevent z-fighting on the faces.
|
||||
// diff()
|
||||
// cuboid([40,30,10])
|
||||
// align(FRONT,TOP,inside=true,shiftout=.01)
|
||||
// align(FRONT,TOP,inside=true,shiftout=0.01)
|
||||
// prismoid([10,5],[7,5],height=4);
|
||||
// Example: Setting inset shifts all of the children away from their aligned edge, which is a different direction for each child.
|
||||
// cuboid([40,30,30])
|
||||
|
|
|
@ -588,7 +588,7 @@ function _inherit_gear_thickness(thickness,dflt=10) =
|
|||
// the gear resembles a crown. This type of gear is not the same as a bevel gear with vertical teeth, which would mate
|
||||
// to another bevel gear. A crown gear mates to a spur gear at a ninety degree angle. A feature of the crown gear assembly
|
||||
// is that the spur gear can shift along its axis without affecting the mesh.
|
||||
// Figure(2D,Med,NoAxes,VPT=[-2.19006,-1.67419,-4.49379],VPR=[67.6,0,131.9],VPD=113.4): A Crown or Face gear with its mating spur gear in blue.
|
||||
// Figure(2D,Med,NoAxes,VPR=[50.1,0,52.5],VPD=121.5,VPT=[8.28415,-8.1257,9.45986]): A Crown or Face gear with its mating spur gear in blue.
|
||||
// crown_gear(mod=1, teeth=32, backing=3, face_width=7);
|
||||
// color("lightblue")
|
||||
// back(pitch_radius(mod=1,teeth=32)+7/2)
|
||||
|
|
|
@ -745,13 +745,15 @@ specified in the child: **with parent-child anchor attachment the
|
|||
`anchor=` and `orient=` parameters to the child are ignored.**
|
||||
|
||||
When you specify attachment using a pair of anchors, the attached
|
||||
child can spin around the parent anchor while still being attached.
|
||||
As noted earlier, this ambiguity is resolved by anchors having a
|
||||
child can spin around the parent anchor while still being attached at
|
||||
the designated anchors: specifying the anchors leaves one unspecified
|
||||
degree of freedom. As noted earlier, this ambiguity is resolved by anchors having a
|
||||
defined spin which specifies where the Y+ axis is located.
|
||||
The way that BOSL2 positions objects can be understood by viewing the
|
||||
anchor arrows as shown above, or you can remember these rules:
|
||||
1. When attaching to the TOP or BOTTOM the FRONT of the child points to the front if possible; otherwise the TOP of the child points BACK.
|
||||
1. When attaching to the TOP or BOTTOM: the FRONT of the child points to the front if possible; otherwise the TOP of the child points BACK.
|
||||
2. When attaching to other faces, if possible the child's UP anchor will point UP; otherwise, the BACK of the child points up (so the FRONT is pointed down).
|
||||
|
||||
To show how this works we use this prismoid where the blue arrow is
|
||||
pointing to the front and the green arrow points up. Also note that
|
||||
the front left edge is the only right angle.
|
||||
|
@ -780,11 +782,11 @@ color_this("orange")
|
|||
|
||||
If we attach to the RIGHT using the same LEFT side anchor on the
|
||||
prismoid then we get the result below. Note that the green UP anchor
|
||||
is pointing (approximately) UP, in accordance with rule 2 from above.
|
||||
is pointing UP, in accordance with rule 2 from above.
|
||||
|
||||
```openscad-3D
|
||||
include <BOSL2/std.scad>
|
||||
cube(30) attach(TOP,LEFT)
|
||||
cube(30) attach(RIGHT,LEFT)
|
||||
color_this("orange")
|
||||
prismoid([8,8],[6,6],shift=-[1,1],h=8) {
|
||||
attach(TOP,BOT) anchor_arrow(color=[0,1,0],s=12);
|
||||
|
@ -846,8 +848,7 @@ of the parent. Sometimes it's useful to have the child overlap the
|
|||
parent by translating it into the parent. You can do this with the
|
||||
`overlap=` argument to `attach()`. A positive value will cause the
|
||||
child to overlap the parent, and a negative value will move the child
|
||||
away from the parent, leaving a small gap, which may be helpful when
|
||||
doing differences. In the first example we use a very large value of
|
||||
away from the parent, leaving a small gap. In the first example we use a very large value of
|
||||
overlap so the cube is sunk deeply into the parent. In the second
|
||||
example a large negative overlap value raises the child high above the
|
||||
parent.
|
||||
|
@ -871,7 +872,7 @@ alignment, which works in a similar way to `align()`. You can specify
|
|||
`align=` to align the attached child to an edge or corner. The
|
||||
example below shows five different alignments.
|
||||
|
||||
```openscad-3D
|
||||
```openscad-3D;Big
|
||||
include <BOSL2/std.scad>
|
||||
module thing(){
|
||||
color_this("orange")
|
||||
|
@ -1032,8 +1033,8 @@ cuboid(50){
|
|||
}
|
||||
```
|
||||
|
||||
Attachment with CENTER anchors can be surprising because the anchors
|
||||
point upwards, so in the example below, the child's CENTER anchor
|
||||
Parent-child Anchor attachment with CENTER anchors can be surprising because the anchors
|
||||
both point upwards, so in the example below, the child's CENTER anchor
|
||||
points up, so it is inverted when it is attached to the parent cone.
|
||||
Note that the anchors are CENTER anchors, so the bases of the anchors are
|
||||
hidden in the middle of the objects.
|
||||
|
|
Loading…
Reference in a new issue