omdl  v0.9.5
OpenSCAD Mechanical Design Library
coordinate.scad File Reference

Coordinate systems and conversions. More...

Go to the source code of this file.

Functions

function coordinate_unit_name (s=coordinate_unit_default)
 Return the name of the given coordinate system identifier. More...
 
function coordinate (c, from=coordinate_unit_default, to=coordinate_unit_base)
 Convert point from one coordinate system to another. More...
 
function coordinate_inv (c, from=coordinate_unit_base, to=coordinate_unit_default)
 Convert point from one coordinate system to another. More...
 
function coordinate_scale2d_cpc (c, r, t=false)
 Radially scale a list of 2d cartesian coordinates. More...
 
function coordinate_scale2d_p2c (p, r, t=false)
 Radially scale and convert a list of 2d polar coordinates to cartesian. More...
 
function coordinate_scale3d_csc (c, r, t=false)
 Spherically scale a list of 3d cartesian coordinates. More...
 
function coordinate_scale3d_s2c (s, r, t=false)
 Spherically scale and convert a list of 3d spherical coordinates to cartesian. More...
 

Variables

 coordinate_unit_base = "c"
 <string> The base units for value storage.
 
 coordinate_unit_default = "c"
 <string> The default units when unspecified.
 
 coordinate_positive_angle = true
 <boolean> When converting to angular measures add 360 to negative angles.
 

Detailed Description

Coordinate systems and conversions.

Author
Roy Allen Sutton
Date
2017-2024

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 coordinate.scad.