Action:
|
Gets the parameter value of a curve at an arc length distance along the curve.
|
|
Filename:
|
kern/kern_scm/crv_scm.cxx
|
|
Syntax:
|
(curve:param-at-dist edge-or-curve distance [parameter=0])
|
|
Arg Types:
|
edge-or-curve
|
curve | edge
|
|
distance
|
real
|
|
parameter
|
real
|
|
Returns:
|
real
|
|
Errors:
|
EDGE with no
CURVE
|
|
Description:
|
This extension returns the normalized parameter as a real, ranging from 0 to 1.
|
|
|
edge-or-curve specifies an edge or a curve.
|
|
|
distance specifies the arc length to compute.
|
|
|
parameter is an optional argument ranging from 0 to 1, specifying where on the curve to compute the distance. If
parameter is not specified, the distance is computed from the start of the curve. If
parameter is specified, the distance is computed from the input distance value and is always applied in the positive parameter direction.
|
|
Example:
|
; curve:param-at-dist
|
|
; Create a circular curve.
|
|
(define edge1 (edge:circular
|
|
|
(position 0 0 0) 25 0 185))
|
|
;; edge1
|
|
; Determine the parameter values at specific
|
|
; distances along the curves.
|
|
(curve:param-at-dist edge1 2.5)
|
|
;; 0.0309706916286932
|
|
(curve:param-at-dist edge1 2.5 0.44)
|
|
;; 0.470970691628693
|
|
(curve:param-at-dist edge1 3 1)
|
|
;; 1.03716482995443
|