![]() |
omdl
v0.9.7
OpenSCAD Mechanical Design Library
|
Shape alignment tools. More...
Collaboration diagram for Alignment:Files | |
| file | align.scad |
| Shape alignment tools. | |
Functions | |
| module | orient_ll (l=z_axis3d_ul, r=z_axis3d_ul, ar=0) |
| Orient a line or vector to a reference line or vector. More... | |
| module | align_ll (l=z_axis3d_ul, r=z_axis3d_ul, lp=0, rp=0, ar=0, to=origin3d, ro=zero3d) |
| Align a line or vector to a reference line or vector. More... | |
| module | align_al (a=z_axis_ci, r=z_axis3d_ul, rp=0, ar=0, to=origin3d, ro=zero3d) |
| Align an objects Cartesian axis to reference line or vector. More... | |
Shape alignment tools.
| Requires: |
|---|
| include <omdl-base.scad>; |
| include <tools/align.scad>; |
| module align_al | ( | a | = z_axis_ci, |
| r | = z_axis3d_ul, |
||
| rp | = 0, |
||
| ar | = 0, |
||
| to | = origin3d, |
||
| ro | = zero3d |
||
| ) |
Align an objects Cartesian axis to reference line or vector.
| a | <integer> The Cartesian axis index to align (x_axis_ci, y_axis_ci, or z_axis_ci). |
| r | <line-3d | line-2d> The reference line or vector. |
| rp | <integer> The reference-line alignment point (see table). |
| ar | <decimal> Axial roll about r (in degrees). |
| to | <vector-3d | vector-2d> Translation offset about r. |
| ro | <decimal-list-1:3 | decimal> Rotation offset about r (in degrees). |
The origin will be a translated to the specified alignment point for the reference line r.
| rp | alignment point |
|---|---|
| 0 | none (no translation) |
| 1 | initial |
| 2 | median |
| 3 | termination |
| 4 | initial + termination |
See Lines and vectors for argument specification and conventions.
Definition at line 275 of file align.scad.
Here is the call graph for this function:| module align_ll | ( | l | = z_axis3d_ul, |
| r | = z_axis3d_ul, |
||
| lp | = 0, |
||
| rp | = 0, |
||
| ar | = 0, |
||
| to | = origin3d, |
||
| ro | = zero3d |
||
| ) |
Align a line or vector to a reference line or vector.
| l | <line-3d | line-2d> The line or vector to align. |
| r | <line-3d | line-2d> The reference line or vector. |
| lp | <integer> The line alignment point (see table). |
| rp | <integer> The reference-line alignment point (see table). |
| ar | <decimal> Axial roll about r (in degrees). |
| to | <vector-3d | vector-2d> Translation offset about r. |
| ro | <decimal-list-1:3 | decimal> Rotation offset about r (in degrees). |
The specified alignment point for the line l will be a translated to the specified alignment point for the reference line r.
| lp, rp | alignment point |
|---|---|
| 0 | none (no translation) |
| 1 | initial |
| 2 | median |
| 3 | termination |
| 4 | initial + termination |
See Lines and vectors for argument specification and conventions.
Definition at line 207 of file align.scad.
Here is the call graph for this function:
Here is the caller graph for this function:| module orient_ll | ( | l | = z_axis3d_ul, |
| r | = z_axis3d_ul, |
||
| ar | = 0 |
||
| ) |
Orient a line or vector to a reference line or vector.
| l | <line-3d | line-2d> The line or vector to align. |
| r | <line-3d | line-2d> The reference line or vector. |
| ar | <decimal> Axial roll about r (in degrees). |
See Lines and vectors for argument specification and conventions.
Definition at line 163 of file align.scad.
Here is the call graph for this function:
Here is the caller graph for this function: