Action:
|
Returns an error if the specified annotation DOES exist.
|
|
Filename:
|
kern/kern_scm/anno_scm.cxx
|
|
Syntax:
|
(annotation:assert-not anno-save-name [history]
|
|
|
[member-name entity] ...)
|
|
Arg Types:
|
anno-save-name
|
string
|
|
history
|
history
|
|
member-name
|
string
|
|
entity
|
entity
|
|
Returns:
|
boolean
|
|
Errors:
|
Bad annotation found
|
|
Description:
|
Searches the history stream for annotations of the given type as specified by the name used to save it in a SAT file. If the history stream is not specified, the stream from the active part is used. The remaining arguments are (member-name, entity) pairs. You can have as many as necessary to fully describe which entities should be in which fields of the annotation.
|
|
|
If an annotation matching the description is found, a sys_error (BAD_ANNOTATION_FOUND) is issued. Returns a #t if the described annotation does not exist.
|
|
|
anno-save-name argument is a string that appears in the SAT file if the annotation is saved.
|
|
|
history argument defines which history stream to search.
|
|
|
member-name argument is a string indicating the name of the entity within the annotation.
|
|
|
entity argument is an entity that should have the given
member-name within the candidate annotation.
|
|
Example:
|
; annotation:assert-not
|
|
; annotate tests on bending.
|
|
; some resulting faces should have annotations,
|
|
; others should not.
|
|
(option:set "match_paren" #f)
|
|
;; #t
|
|
(cond ((= 0 (length (part:views))) (view:dl)))
|
|
;; #f
|
|
(define view (view:set-bg-color 7))
|
|
;; view
|
|
(part:clear)
|
|
;; #t
|
|
|
(define block1 (solid:block (position -30 -2 -10)
|
|
|
(position 40 2 10)))
|
|
;; block1
|
|
(define view-edges (view:edges #t))
|
|
;; view-edges
|
|
(define view-poly (view:polygonoffset #t))
|
|
;; view-poly
|
|
(define radius 20)
|
|
;; radius
|
|
(define bend-angle -100)
|
|
;; bend-angle
|
|
(define width 0)
|
|
;; width
|
|
(define center-bend #f)
|
|
;; center-bend
|
|
; set annotations to on
|
|
(option:set "annotation" #t)
|
|
;; #f
|
|
(option:set "unhook_annotations" #f)
|
|
;; #t
|
|
(define bend (entity:bend block1 (position 20 0 0)
|
|
|
(gvector 0 0 1) (gvector 0 1 0) radius bend-angle
|
|
|
width center-bend))
|
|
;; bend
|
|
; pick 6 different faces from the body with
|
|
; 6 different rays.
|
|
(define isovec
|
|
|
(gvector -0.408248 0.816497 -0.408248))
|
|
;; isovec
|
|
(define r1 (ray (position 107 -247 103) isovec ))
|
|
;; r1
|
|
(define r2 (ray (position 110 -244 107) isovec ))
|
|
;; r2
|
|
(define r3 (ray (position 122 -235 113) isovec ))
|
|
;; r3
|
|
(define r4 (ray (position 142 -225 111) isovec ))
|
|
;; r4
|
|
(define r5 (ray (position 151 -221 111) isovec ))
|
|
;; r5
|
|
(define r6 (ray (position 110 -238 119) isovec ))
|
|
;; r6
|
|
(define f1 (pick:face r1 1))
|
|
;; f1
|
|
(define f2 (pick:face r2 1))
|
|
;; f2
|
|
(define f3 (pick:face r3 1))
|
|
;; f3
|
|
(define f4 (pick:face r4 1))
|
|
;; f4
|
|
(define f5 (pick:face r5 1))
|
|
;; f5
|
|
(define f6 (pick:face r6 1))
|
|
;; f6
|
|
; check for transform annotations on f1 f2 f6.
|
|
(annotation:assert
|
|
|
"warp_anno_face-warp_annotation-annotation"
|
|
|
"transformed_faces" f1)
|
|
;; #[entity 9 1]
|
|
(annotation:assert
|
|
|
"warp_anno_face-warp_annotation-annotation"
|
|
|
"transformed_faces" f2)
|
|
;; #[entity 9 1]
|
|
(annotation:assert
|
|
|
"warp_anno_face-warp_annotation-annotation"
|
|
|
"transformed_faces" f6)
|
|
;; #[entity 9 1]
|
|
; check for no transform annotations on f3 f4 f5.
|
|
(annotation:assert-not
|
|
|
"warp_anno_face-warp_annotation-annotation"
|
|
|
"transformed_faces" f3)
|
|
;; #t
|
|
(annotation:assert-not
|
|
|
"warp_anno_face-warp_annotation-annotation"
|
|
|
"transformed_faces" f4)
|
|
;; #t
|
|
(annotation:assert-not
|
|
|
"warp_anno_face-warp_annotation-annotation"
|
|
|
"transformed_faces" f5)
|
|
;; #t
|