SchemeExt:Face:spline?
From DocR23
Contents |
Action
Determines if a Scheme object is a spline face.
Filename
scm/scmext/kern/qfac_scm.cpp
APIs
None
Syntax
(face:spline? object)
Argument Types
| Argument | Scheme Data Type |
|---|---|
| object | scheme-object |
Returns
boolean
Description
This extension returns #t if the specified object is a spline face; that is, the object is a face whose underlying geometry is a spline.
Arguments
- object specifies the scheme-object that has to be queried for a spline face.
Example
; face:spline ; Define a spline edge 1. (define e1 (edge:spline (list (position 0 0 0)(position 20 -20 0) (position 20 0 0)))) ;; e1 ; Define linear edge 2. (define e2 (edge:linear (position 20 0 0)(position 20 20 0))) ;; e2 ; Define linear edge 3. (define e3 (edge:linear (position 20 20 0)(position 0 20 0))) ;; e3 ; Define linear edge 4. (define e4 (edge:linear (position 0 20 0)(position 0 0 0))) ;; e4 ; Define a wire body from the spline and linear edges. (define w (wire-body (list e1 e2 e3 e4))) ;; w ; Create a solid by sweeping a planar wire along a vector. (define ws (solid:sweep-wire w (gvector 0 0 20))) ;; ws ; Get the faces of the solid. (define faces (entity:faces ws)) ;; faces ; Try to create spline body for the face that is not a spline face (define body1 (face:spline (car (cdr faces)))) ;;*** Error face:spline: wrong argument type entity (expected spline face) ; Try to create spline body for a spline face (define body1 (face:spline (car (cdr (cdr (cdr faces)))))) ;; body1