position
 List of: Scheme Extensions Subjects: Mathematics Contents: Kernel
Action: Creates a new position with coordinates x, y, and z.

Filename: kern/kern_scm/pos_scm.cxx

Syntax: (position x y z [space="models"])

Arg Types: x real

y real

z real

space string

Returns: position

x defines the x-coordinate relative to the active coordinate system.

y defines the y-coordinate relative to the active coordinate system.

z defines the z-coordinate relative to the active coordinate system.

The optional space argument defaults to "WCS". If no active WCS exists,space defaults to "model". The other optional space arguments return agvector in the new coordinate system. The following values for thespaceargument are:

- "wcs" is the default if an active WCS exists. Otherwise, the default setting is "model".

- "model" means that the x, y, and z values are with respect to the model. If the model has an origin other than the active WCS, this returns the position relative to the active coordinate system in rectangular Cartesian coordinates.

- "polar" or "cylindrical" mean that the x, y, and z values are interpreted as the radial distance from the z-axis, the polar angle in degrees measured from the xz plane (using right-hand rule), and the z coordinate, respectively. This returns the x, y, and z terms with respect to the active coordinate system.

- "spherical" means that the provided x, y, and z values are the radial distance from the origin, the angle of declination from the z-axis in degrees, and the polar angle measured from the xz plane in degrees, respectively. This returns the x, y, and z terms with respect to the active coordinate system.

A position is not saved with the part, but is used to help define geometry. Positions are not displayed in Scheme. A point is an entity. A point is different from a vertex in that it has no edge associations. Use env:set-point-size and env:set-point-style to change its appearance.

Example: ; position

; Create a position.

(define pos1 (position 3 3 3))

;; pos1

; Create a position in the

; "cylindrical" coordinate system.

(define pos-cyl (position 20 20 0 "cylindrical"))

;; pos-cyl

; Define a solid block using the created position.

(define block1 (solid:block pos1 pos-cyl))

;; block1
PDF/KERN/14SCI.PDF
HTM/DATA/KERN/KERN/14SCI/0101.HTM