Action:
|
Creates a
linear-edge between two locations.
|
|
Filename:
|
cstr/cstr_scm/edge_scm.cxx
|
|
APIs:
|
api_curve_line, api_curve_line_tangent
|
|
Syntax:
|
(edge:linear {position | point | entray}
|
|
|
{position | point | entray})
|
|
Arg Types:
|
position
|
position
|
|
point
|
point
|
|
entray
|
entray
|
|
Returns:
|
entity
|
|
Description:
|
Specify locations as positions, points, or
entrays.
|
|
|
position specifies the start location of the line. The second
position argument specifies the end location of the line.
|
|
|
point argument specifies the start location of the line. The second
point argument specifies the end location of the line.
|
|
|
entray specifies an entity and a pick ray. The ray specifies the start position and gvector. The corresponding end of the line is tangent to the curve at the point nearest to the pick location.
|
|
Example:
|
; edge:linear
|
|
; Create two linear edges given two positions.
|
|
(define edge1
|
|
|
(edge:linear (position 0 0 0)
|
|
|
(position 30 30 0)))
|
|
;; edge1
|
|
(define edge2
|
|
|
(edge:linear (position 30 30 0)
|
|
|
(position 0 30 0)))
|
|
;; edge2
|
|
; Define point 1.
|
|
(define pt1 (point (position 30 0 0)))
|
|
;; pt1
|
|
; Define point 2.
|
|
(define pt2 (point (position 0 30 0)))
|
|
;; pt2
|
|
; Create linear edge 3 from the two points.
|
|
(define edge3 (edge:linear pt1 pt2))
|
|
;; edge3
|