curve:normal
List of: Scheme Extensions
Subjects: Construction Geometry
Contents: Kernel

Action: Gets the normal of a given planar edge or curve.

Filename: kern/kern_scm/crv_scm.cxx

Syntax: (curve:normal edge-or-curve)

Arg Types: edge-or-curve edge | curve

Returns: gvector

Description: This extension returns a gvector that is normal to the given curve.


edge-or-curve specifies an edge or a curve. If the curve is linear, #f is returned. #f is also returned if the curve is nonplanar

Example: ; curve:normal

; Create a circular edge.

(define edge1


(edge:circular


(position 0 0 0) 25 0 185))

;; edge1

; Determine the normal to the edge.

(curve:normal edge1)

;; #[gvector 0 0 1]

; Create a linear edge.

(define edge2


(edge:linear (position -10 -10 0)


(position 20 20 0)))

;; edge2

; Determine the normal to the edge, which

; should return #f because it is not a curve.

(curve:normal edge2)

;; #f
PDF/KERN/12SCA.PDF
HTM/DATA/KERN/KERN/12SCA/0040.HTM