Action:
|
Creates a transform that takes an object from model space to the space defined by the new origin and axes.
|
|
Filename:
|
kern/kern_scm/tran_scm.cxx
|
|
Syntax:
|
(transform:axes origin-position x-axis y-axis)
|
|
Arg Types:
|
origin-position
|
position
|
|
x-axis
|
gvector
|
|
y-axis
|
gvector
|
|
Returns:
|
transform
|
|
Description:
|
After applying this transform to an entity, the entity has the same relationship to the working coordinate system that it had to the model coordinate system.
|
|
|
origin-position specifies the origin of the new coordinate system.
|
|
|
x-axis specifies the
x-axis gvector.
|
|
|
y-axis specifies the
y-axis gvector. The
y-axis is perpendicular to the
x-axis.
|
|
Example:
|
; transform:axes
|
|
; Create a WCS.
|
|
(define wcs1
|
|
|
(wcs (position 0 0 0) (gvector 1 0 0)
|
|
|
(gvector 0 1 0)))
|
|
;; wcs1
|
|
; Set the color of the wcs.
|
|
(entity:set-color wcs1 6)
|
|
;; ()
|
|
; Create a solid block.
|
|
(define block1
|
|
|
(solid:block (position 0 0 0)
|
|
|
(position 15 20 15)))
|
|
;; block1
|
|
; OUTPUT Original
|
|
|
; Transform the solid block from model space to
|
|
; the created working space as defined by the WCS.
|
|
(define transform (entity:transform block1
|
|
|
(transform:axes (position 0 0 0)
|
|
|
(gvector -8 0 0) (gvector 0 6 0))))
|
|
;; transform
|
|
; OUTPUT Result
|
|
|
|
|
Figure 15-2. transform:axes
|