Action:
|
Creates a face that is a parallelogram specified by three points: origin, left, and right.
|
|
Filename:
|
cstr/cstr_scm/face_scm.cxx
|
|
APIs:
|
api_face_plane
|
|
Syntax:
|
(face:plane position width height [normal])
|
|
Arg Types:
|
position
|
position
|
|
width
|
real
|
|
height
|
real
|
|
normal
|
gvector
|
|
Returns:
|
face
|
|
Errors:
|
A plane cannot have a zero width or height. This means that both (left -
origin) and (right -
origin) must be greater than
resabs.
|
|
|
|
A plane cannot have a zero length normal. This means that the length of ((left -
origin) * (right -
origin)) must be greater than
resabs.
|
|
Description:
|
This extension creates a planar face of the given
width and height, relative to the active WCS, with its lower left-hand corner at the given
position.
|
|
|
normal becomes the
z-axis of an alternate coordinate system, (xyz). If the
z-axis and the active
x-axis are parallel, the new
y-axis is the active
y-axis. If they are not parallel, the
y-axis is the normal to the plane defined by the
z-axis and the
x-axis. The
x-axis is then determined as the normal to the plane defined
y-axis and the
z-axis.
|
|
|
If the
normal is in the direction of the z-axis, then the
width and
height are in the direction of the WCS x-axis and y-axis respectively. Orientation of
width and
height in any other case is not guaranteed.
|
|
|
position is the input position argument.
|
|
|
width is the width of the planar face.
|
|
|
height is the height of the planar face.
|
|
|
normal becomes the
z-axis of an alternate coordinate system, (xyz).
|
|
Example:
|
; face:plane
|
|
; Create planar face 1.
|
|
(define face1 (face:plane (position 0 0 0) 30 30))
|
|
;; face1
|
|
; Create planar face 2.
|
|
(define face2
|
|
|
(face:plane (position 0 0 30) 30 30))
|
|
;; face2
|
|
; Create planar face 3.
|
|
(define face3
|
|
|
(face:plane
|
|
|
(position 0 0 30) 30 30 (gvector 1 0 0)))
|
|
;; face3
|
|
; Create planar face 4.
|
|
(define face4
|
|
|
(face:plane
|
|
|
(position 30 0 30) 30 30 (gvector 1 0 0)))
|
|
;; face4
|
|
; OUTPUT Example
|
|
|
|
Figure 2-30. face:plane
|