lop:remove-attributes
List of: Scheme Extensions
Subjects: Local Operations
Contents: Local Ops

Action: Removes all attributes that a local operation attached to EDGEs and VERTEXs contained in an ENTITY.

Filename: lop/lop_scm/lop_scm.cxx

APIs: api_remove_lop_attribs

Syntax: (lop:remove-attributes entity [acis-opts])

Arg Types: entity entity

acis-opts acis-options

Returns: body

Description: Removes all ATTRIB_LOP_EDGE and ATTRIB_LOP_VERTEX attributes attached to EDGEs and VERTEXs on an ENTITY. These attributes are attached when using the APIs api_tweak_faces_init, api_tweak_fix_edge, and api_tweak_fix_vertex.


Arguments:


entity identifies the entities on a body which will have their attributes removed.


acis-opts specifies options such as versioning and journaling.

Example: ; lop:remove-attributes

; Make a body

; Define options in data structure for sweep:law.

(define opts (sweep:options "cut_end_off" #t))

;; opts

; Create an edge from the specified law.

(define path (edge:law "vec(cos(x),


sin(x),x/5)" 0 20))

;; path

; Create an edge that is part of an ellipse.

(define profile (edge:ellipse (position 1 0 0)


(gvector 0 1 0) (gvector .2 0 0)))

;; profile

; Create surface by sweeping.

(define sweep (sweep:law profile path opts))

;; sweep

; Delete "path".

(entity:delete path)

;; ()

; Select a face.

(define f (pick:face (ray


(position 1 .01 0) (gvector 0 -1 0))))

;; f

; Attach lop attributes to edges in the model

(define tweak (lop:tweak-faces-init f f #f))

;; tweak

; Get data structure info. for "sweep 3".

(entity:debug sweep 3)

;
1 body record,

32 bytes

;
6 attribute records, 512 bytes

;
1 lump record,

32 bytes

;
1 shell record,

40 bytes

;
3 face records,

132 bytes

;
3 loop records,

96 bytes

;
3 surface records
472 bytes

;
6 coedge records,
264 bytes

;
3 edge records,

216 bytes

;
4 pcurve records,
352 bytes

;
2 vertex records,
48 bytes

;
3 curve records,
336 bytes

;
2 point records,
96 bytes

; Total storage 2640 bytes

;; "solid body"

; Remove the attribute

(define remove (lop:remove-attributes sweep))

;; remove

; Get adjusted data structure info. for "sweep 3".

(entity:debug sweep 3)

;
1 body record,

32 bytes

;
5 attribute records, 216 bytes

;
1 lump record,

32 bytes

;
1 shell record,

40 bytes

;
3 face records,

132 bytes

;
3 loop records,

96 bytes

;
3 surface records
472 bytes

;
6 coedge records,
264 bytes

;
3 edge records,

216 bytes

;
4 pcurve records,
352 bytes

;
2 vertex records,
48 bytes

;
3 curve records,
336 bytes

;
2 point records,
96 bytes

; Total storage 2328 bytes

;; "solid body"
PDF/LOP/02SC.PDF
HTM/DATA/LOP/LOP/02SC/0007.HTM