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
xcoordinate relative to the active coordinate system.



y defines the
ycoordinate relative to the active coordinate system.



z defines the
zcoordinate 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
zaxis, the polar angle in degrees measured from the
xz plane (using righthand 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
zaxis 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:setpointsize and
env:setpointstyle 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 poscyl (position 20 20 0 "cylindrical"))


;; poscyl


; Define a solid block using the created position.


(define block1 (solid:block pos1 poscyl))


;; block1
