lop:offset-body
List of: Scheme Extensions
Subjects: Local Operations
Contents: Local Ops

Action: Offsets faces of a body.

Filename: lop/lop_scm/lop_scm.cxx

APIs: api_offset_body

Syntax: (lop:offset-body body offset [box-h box-l] [acis-opts])

Arg Types: body body

offset real

box-h position

box-l position

acis-opts acis-options

Returns: body

Errors: In addition to the following, refer to the Errors listed for the Scheme extension, lop:tweak-faces.



Valid offset (greater than minus half the body box max side), and not a zero offset (magnitude greater than twice SPAresabs) or error;


LOP_OFF_BAD_OFFSET

Valid body transformation (no shear component) or error;


LOP_BAD_BODY_TRANSFORM



Note that entities returned in the outcome standard_error_info object are highlighted.

Description: Offsets the faces of the supplied body by an offset distance. Faces with radial surfaces which cannot be so offset are removed and the resulting wound healed by the surrounding face surfaces.


The optional intersection box limits the size of intersections between surfaces which might otherwise be very long. It cannot be used to choose faces. Its main purpose is to speed up complicated cases where the intersection curves might be very long, thus improving performance. The box must contain the final faces and if omitted defaults to the size box.


Topology Changes:


In addition to the following, refer to the topology changes listed for the Scheme extension, lop:tweak-faces.


Mergeable edges will be removed unless they have a NO_MERGE_ATTRIB.


Faces with radial surfaces which cannot be offset by the distance without degenerating or inverting (spheres, cones, blended edges, blended vertices,and tori) are removed and the resulting wound healed by the surrounding face surfaces,before the offset.


Geometry Changes:


Refer to the geometry changes listed for the Scheme extension, lop:tweak-faces.


Arguments:


body identifies the body to be offset.


offset specifies the offset distance for all faces.


box-h specifies one position defining a diagonal box for an intersection limit.


box-l specifies one position defining a diagonal box for an intersection limit.


acis-opts specifies options such as versioning and journaling.

Limitations: Refer to the Limitations listed for the Scheme extension, lop:tweak-faces.

Example: ; lop:offset-body

; Create a solid block.

(define block1


(solid:block (position -10 -10 -20)


(position 20 15 20)))

;; block1

; OUTPUT Original


; Offset the body

(define offset (lop:offset-body block1 15))

;; offset

; OUTPUT Result



Figure 2-5. lop:offset-body


; Example 2

; Clear the previous part

(part:clear)

;; #t

(define block2


(solid:block (position -25 -25 -25)


(position 25 25 25)))

;; block2

(define edge1 (blend:const-rad-on-edge


(pick:edge (ray (position 0 0 0)


(gvector 1 -1 0))) 10))

;; edge1

(define edge2 (blend:const-rad-on-edge


(pick:edge (ray (position 0 0 0)


(gvector 1 0 1))) 15))

;; edge2

(define edge3 (blend:const-rad-on-edge


(pick:edge (ray (position 0 0 0)


(gvector 0 -1 1))) 20))

;; edge3

(define vertex1 (blend:on-vertex


(pick:vertex (ray (position 0 0 0)


(gvector 1 -1 1))) 20))

;; vertex1

(define blend (blend:network


(list edge1 edge2 edge3 vertex1)))

;; blend

; OUTPUT Original


(define offset (lop:offset-body block2 -10))

;; offset

; OUTPUT Result



Figure 2-6. lop:offset-body - Example 2
PDF/LOP/02SC.PDF
HTM/DATA/LOP/LOP/02SC/0004.HTM