mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Fix projection_on_plane() example.
This commit is contained in:
parent
d139384b36
commit
697368b3a3
2 changed files with 11 additions and 4 deletions
|
@ -1005,10 +1005,17 @@ function plane_transform(plane) =
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane.
|
// plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane.
|
||||||
// points = List of points to project
|
// points = List of points to project
|
||||||
// Example(3D):
|
// Example(3D,FlatSpin):
|
||||||
// points = move([10,20,30], p=yrot(25, p=path3d(circle(d=100))));
|
// plane = plane_from_normal([1,0,1]);
|
||||||
// plane = plane3pt([1,0,0],[0,1,0],[0,0,1]);
|
|
||||||
// proj = projection_on_plane(plane,points);
|
// proj = projection_on_plane(plane,points);
|
||||||
|
// color("red") move_copies(points) sphere(d=2,$fn=12);
|
||||||
|
// color("blue") move_copies(proj) sphere(d=2,$fn=12);
|
||||||
|
// rot(from=UP,to=plane_normal(plane)) {
|
||||||
|
// left(10) {
|
||||||
|
// anchor_arrow(30);
|
||||||
|
// %cube([120,150,0.1],center=true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
function projection_on_plane(plane, points) =
|
function projection_on_plane(plane, points) =
|
||||||
assert( _valid_plane(plane), "Invalid plane." )
|
assert( _valid_plane(plane), "Invalid plane." )
|
||||||
assert( is_path(points), "Invalid list of points or dimension." )
|
assert( is_path(points), "Invalid list of points or dimension." )
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,514];
|
BOSL_VERSION = [2,0,515];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue