|
Scheme Extensions:lop:offset-body,
lop:offset-faces,
lop:offset_specific
|
|
|
C++ APIs:api_offset_body,
api_offset_faces,
api_offset_faces_specific,
api_offset_planar_face_loops
|
|
|
The offset APIs offset a body or an array of faces by an offset distance. In face offsetting and body offsetting, radial faces whose geometry
would degenerate as a result of the offset are removed prior to the offset. Thus, if a body with blended edges or vertices is offset inwards by more than the blend radius, the blends are removed prior to the offset. This uses the "remove faces" functionality (e.g., shells may be split). If some faces can not be removed, the offset fails.
|
|
|
In the first example, the top surface is offset vertically. In the second example, all the surfaces are offset, resulting in a larger block.
|
|
|
Scheme Example
|
|
|
; Offset Example 1 - lop:offset-faces
|
|
; Create a solid block.
|
|
(define block1
|
|
(solid:block (position -10 -10 -20)
|
|
(position 5 30 20)))
|
|
;; block1
|
|
; OUTPUT Original
|
|
|
; Offset a face on the body
|
|
(lop:offset-faces (pick:face (ray (position 0 0 0)
|
|
(gvector 0 0 1))) 10)
|
|
;; #[entity 2 1]
|
|
; OUTPUT Result
|
|
|
|
|
Figure 1-4. lop:offset-faces
|
|
|
; Offset Example 2 - 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
|
|
(lop:offset-body block1 15)
|
|
;; #[entity 2 1]
|
|
; OUTPUT Result
|
|
|
|
|
Figure 1-5. lop:offset-body
|