Action:
|
Generates an error if the specified annotation does not exist.
|
|
Filename:
|
kern/kern_scm/anno_scm.cxx
|
|
Syntax:
|
(entity:attach-derived-tag entity string)
|
|
Arg Types:
|
entity
|
entity
|
|
string
|
string
|
|
Returns:
|
entity
|
|
Description:
|
Attaches a
DERIVED_TAG, which is derived from
ATTRIB_TAG to the given entity.
|
|
|
entity specifies an entity.
|
|
|
string specifies the attribute to be attached.
|
|
Example:
|
; entity:attach-derived-tag
|
|
; Set options
|
|
(option:set "annotations" #t)
|
|
;; #f
|
|
(option:set "unhook_annotations" #f)
|
|
;; #t
|
|
; Define a profile
|
|
(define profile (wire-body:points
|
|
|
(list (position 0 0 0) (position 10 0 0)
|
|
|
(position 10 10 0) (position 0 10 0)
|
|
|
(position 0 0 0))))
|
|
;; profile
|
|
; Define a path.
|
|
(define path (edge:linear (position 0 0 0)
|
|
|
(position 0 0 10)))
|
|
;; path
|
|
; Attach a DERIVED_TAG to the path
|
|
(define attach
|
|
|
(entity:attach-derived-tag path 'thePathEdge))
|
|
;; attach
|
|
; Do the sweep
|
|
(define opt (sweep:options "draft_angle"
|
|
|
10 "gap_type" "n" 'solid #t))
|
|
;; opt
|
|
; Sweep profile along defined path.
|
|
(define sweep (sweep:law profile path opt))
|
|
;; sweep
|
|
; View annotations on the path and see that
|
|
; the derived tag was used
|
|
(map entity:debug (entity:annotations path)
|
|
|
(make-list 100 2))
|
|
; returns the list of annotation entities
|
|
;; ("sweep_anno_vertex_lat" "sweep_anno_vertex_top"
|
|
;; "sweep_anno_edge_lat" "sweep_anno_edge_top"
|
|
;; "sweep_anno_vertex_lat" "sweep_anno_vertex_top"
|
|
;; "sweep_anno_edge_lat" "sweep_anno_edge_top"
|
|
;; "sweep_anno_vertex_lat" "sweep_anno_vertex_top"
|
|
;; "sweep_anno_edge_lat" "sweep_anno_edge_top"
|
|
;; "sweep_anno_vertex_lat" "sweep_anno_vertex_top"
|
|
;; "sweep_anno_edge_lat" "sweep_anno_edge_top")
|