omdl
v0.9.5
OpenSCAD Mechanical Design Library
|
Tests and operations for Euclidean 3d space. More...
Go to the source code of this file.
Functions | |
function | is_point (v) |
Test if a value defines a point. More... | |
function | is_vector (v) |
Test if a value defines a Euclidean vector. More... | |
function | is_line (v) |
Test if a value defines a line. More... | |
function | is_vol (v) |
Test if a value defines a vector or a line. More... | |
function | is_plane (v) |
Test if a value defines a plane. More... | |
function | distance_pp (p1, p2) |
Compute the distance between two points. More... | |
function | distance_pl (p, l) |
Compute the shortest distance between a point and a line. More... | |
function | distance_pn (p, n, np) |
Compute the shortest distance between a point and a plane. More... | |
function | is_left_ppp (p1, p2, p3) |
Test if a point is left, on, or right of an infinite line in a 2d-space. More... | |
function | point_closest_pl (p, l) |
Compute the coordinates of the closest point on a line to a given point. More... | |
function | point_closest_pn (p, n, np) |
Compute the coordinates of the closest point on a plane to a given point. More... | |
function | point_to_3d (p) |
Return 3d point unchanged or add a zeroed third dimension to 2d point. More... | |
function | interpolate2d_l_pp (p1, p2, x, y) |
Linearly interpolate along a line established by two points in 2d. More... | |
function | line2d_new (m=1, a=0, p1=origin2d, p2, v) |
Construct a 2 dimensional directed line. More... | |
function | line3d_new (m=1, a=0, t=90, p1=origin3d, p2, v) |
Construct a 3 dimensional directed line. More... | |
function | line_new (m=1, a=0, t, p1, p2, v) |
Construct a directed line. More... | |
function | line_dim (l) |
Return the number of dimensions of a line or vector. More... | |
function | line_tp (l) |
Return the terminal point of a line or vector. More... | |
function | line_ip (l) |
Return the initial point of a line or vector. More... | |
function | vol_to_origin (l) |
Convert line to vector by shifting it to the origin. More... | |
function | vol_to_point (l, p) |
Convert a vector to a line or move a line to another coordinate point. More... | |
function | dot_ll (l1, l2) |
Compute the dot product of two lines or vectors in a 3d or 2d-space. More... | |
function | cross_ll (l1, l2) |
Compute the cross product of two lines or vectors in a 3d or 2d-space. More... | |
function | striple_lll (l1, l2, l3) |
Compute the scalar triple product of three lines or vectors in a 3d or 2d-space. More... | |
function | angle_ll (l1, l2, s=true) |
Compute the angle between two lines or vectors in a 3d or 2d-space. More... | |
function | angle_lll (l1, l2, n) |
Compute the angle between two lines or vectors in a 3d-space. More... | |
function | unit_l (l) |
Compute the normalized unit vector of a line or vector. More... | |
function | are_coplanar_lll (l1, l2, l3, d=6) |
Test if three lines or vectors are coplanar in 3d-space. More... | |
function | plane_to_normal (n, cw=true) |
Convert a planes' normal specification into a normal vector. More... | |
Tests and operations for Euclidean 3d space.
This file is part of omdl, an OpenSCAD mechanical design library.
The omdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
The omdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the omdl; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA; or see http://www.gnu.org/licenses/.
Definition in file euclidean.scad.