|
Action:
|
Creates a spline face using control points.
|
|
|
Filename:
|
cstr/cstr_scm/face_scm.cxx
|
|
|
APIs:
|
api_face_spl_ctrlpts
|
|
|
Syntax:
|
(face:spline-ctrlpts surface-data)
|
|
|
Arg Types:
|
surface-data
|
splsurf
|
|
|
Returns:
|
face
|
|
|
Description:
|
This extension creates a spline surface face with the given surface control points, weights, knot data, and parametric values.
|
|
|
surface-data is the input surface data values.
|
|
|
Example:
|
; face:spline-ctrlpts
|
|
; Create a spline surface data type.
|
|
(define surf1 (splsurf))
|
|
;; surf1
|
|
; Set the control points.
|
|
(define ctrlpoints1 (list
|
|
|
(position -10 -10 20) (position -5 0 10)
|
|
|
(position -20 20 30) (position -20 -15 10)
|
|
|
(position -30 -10 0) (position -30 25 -30)
|
|
|
(position 0 -10 -20) (position 5 -12 -30)
|
|
|
(position 0 15 15) (position 30 -6 -5)
|
|
|
(position 25 -10 0) (position 30 25 -30)
|
|
|
(position 10 -10 10) (position 25 -10 20)
|
|
|
(position 20 20 30)))
|
|
;; ctrlpoints1
|
|
(splsurf:set-ctrlpt-list surf1 ctrlpoints1 5 3)
|
|
;; #[splsurf bc4700]
|
|
; Set the u and v parameter values.
|
|
(splsurf:set-u-param surf1 3 0 0 0)
|
|
;; #[splsurf bc4700]
|
|
(splsurf:set-v-param surf1 2 0 0 0)
|
|
;; #[splsurf bc4700]
|
|
; set the u and v knot values.
|
|
(define uknots (list 0 0 0 0 0.5 1 1 1 1))
|
|
;; uknots
|
|
(splsurf:set-u-knot-list surf1 uknots 9)
|
|
;; #[splsurf bc4700]
|
|
(define vknots (list 0 0 0 1 1 1))
|
|
;; vknots
|
|
(splsurf:set-v-knot-list surf1 vknots 6)
|
|
;; #[splsurf bc4700]
|
|
; Create the spline face.
|
|
(define spline (face:spline-ctrlpts surf1))
|
|
;; spline
|
|
; OUTPUT Example
|
|
|
|
|
Figure 2-32. face:spline-ctrlpts
|