Remove Face
From DocR21
Remove Faces is the removal of one or more faces from a body and the healing of the gap by extending the neighboring surfaces.
Contents |
Remove Face(s) Interface
Interface
The API function api_remove_faces is used to perform this operation. The API can take one or more faces that all belong to the same sheet or solid body. The body which owns the faces given as input is modified directly, no copy is made.
The user-supplied bounding box must be large enough to contain the final "grown" body. (The body can grow in size due to the extensions of the neighboring surfaces.)
Blend Removal
The faces do not have to be adjacent; however, when removing blends, better robustness is achieved when the entire blend chain is given as input or use the option rem_blend_network_add_vent.
In general, three entity blends or Face Edge blends cannot be removed, but if they have been created in ACIS post R18, then Remove Face can recover the missing supports.
Partial Blend Removal
| Summit Content | ||
|---|---|---|
| Topic: | Partial Blend Removal | |
| Product: | ACIS | |
| Release: | R18 | |
| Year: | 2007 | |
If the option rem_blend_network_add_vent is enabled, cross EDGEs (tangent EDGE between two blend surfaces) at the boundary of the blend sequence can grow a vent FACE that helps heal the gap.
Remove Face Info
After a blend removal, Remove Face reports back the created edges. This information can be retrieved through the lop_options object, passed into api_remove_faces. Newly created edges are highlighted in the example below. For implementation, refer to the source code of lop:get-remove-face-info.
| C++ | Scheme | Description |
|---|---|---|
| api_remove_faces | rem:remove-faces | Removes specified faces from a body, healing the gap by extending the neighboring surfaces. |
| lop_options | lop:options | Local Operations behavior control. Recognizes the following lop_options: |
| rem_blend_network_add_vent | option:set("rem_blend_network_add_vent" #t) | Toggles the option for partial blend removal. |
Versioning and Journaling are available for the remove APIs through the standard ACIS options class.
Limitations
Remove Faces has the following limitations:
- The body must be manifold.
- The faces to be removed cannot be on the boundary of a sheet, except if they are blend faces or if the free edges form an internal gap.
- Some remaining faces may shrink if necessary, but not so far as to let edges between them degenerate to zero length. The mending process must be entirely within the faces adjacent to those removed.
- No checks are made to see if the faces grown intersect with other non-growing faces in the model. Checks that the growing faces intersect with one another is not rigorously done between unconnected regions of growing faces.
- Mixed convexity blended vertex faces are generally not removable in isolation, as the underlying blends cannot combine to mend the gap. Such vertices can, however, be removed along with one or more of their underlying blends.
Error Codes
In addition to the Tweak Operation Error Codes, this API can generate the following errors:
| Error Code | Message Text | Description |
|---|---|---|
| REM_NO_FACE | no faces supplied | At least one face must be supplied for removal. |
| REM_BAD_FACE | face(s) supplied invalid, duplicate or from different shells | Face(s) that are being removed are either invalid, duplicate or belong to different shells. |
| REM_NON_MANIFOLD | non-manifold edge detected | Supplied body contains a non-manifold edge. |
| REM_FREE_EDGE | free edge detected | Face(s) being removed should not contain free edges. Exceptions to this are blend faces and faces with entirely enclosed free edges. Refer to removing faces with free edges. |
| REM_LAST_SHELL | only shell in body would be lost | All faces in a shell or lump may be removed, as long as another shell remains. |
| REM_BAD_BOX | invalid box supplied | The user supplied intersection box is invalid. |
| REM_NO_SOLUTION | gap cannot be filled | Unable to fill the gap left by the removed faces by extending the adjacent faces. |
| REM_REMOTE_FACE_INTR | remove operation affects remote face(s) | Healing the gap left by the removed faces affects (intersects) non-adjacent faces. This error will be active only if check_remote_face_face_intersections option is set to TRUE. Refer to Example. |
| REM_INTERNAL | internal error | Remove operation was unsuccessful due to internal algorithmic problems. |
Face Removal Examples
The following Scheme examples illustrate various face removal operations.
Removing a Vertex Blend
(part:clear) (define block1 (solid:block (position -25 -25 -25)(position 25 25 25))) (iso) (zoom-all) ; Attach blend attribute to edge 0. (define attach0 (blend:round (list-ref(entity:edges block1) 0) 10)) ; Attach blend attribute to edge 3. (define edge3 (blend:round (list-ref(entity:edges block1) 3) 10)) ; Attach blend attribute to edge 9. (define edge9 (blend:round (list-ref(entity:edges block1) 9) 10)) ; OUTPUT Original ; Attach blend attribute for autoblend on vertex 0 (define autoblend0 (blend:vertex (list-ref(entity:vertices block1) 0) "autosetback")) ; Execute blend on vertex and edges. (blend:fix (list-ref (entity:vertices block1) 0)) (view:refresh) ; pick the vertex blend (ray:queue 266.786 -369.845 205.129 -0.529697 0.747274 -0.401252 1.97972) (define rem_face (pick-face)) (entity:set-color rem_face RED) ; remove the face (rem:remove-faces rem_face)
Solid with a Vertex Blend |
Shells or Lumps Separating
Shells and lumps may be split into two or more lumps when faces are removed. Shells of opposite solidity to the original are deleted. Faces left infinite are also removed, such as planar faces with no edges.
(part:clear) (define b1 (solid:pyramid 50 25 25 5)) (iso) (zoom-all) (entity:move b1 0 0 -26) (define b2 (entity:copy b1)) (entity:rotate b2 0 1 0 180) (solid:unite b1 b2) (define b3 (solid:cylinder 0 0 -50 0 0 50 15)) (solid:unite b1 b3) (iso) (zoom-all) (ray:queue 63.6563 -126.896 59.6118 -0.408248 0.816497 -0.408248 1.97972) (define rem_face (pick-face)) (entity:set-color rem_face RED) (rem:remove-faces rem_face)
Using the Bounding Box
The user-supplied bounding box must be large enough to contain the final grown remaining faces. As the box is used to limit surface-surface and curve-surface intersections, and curve or surface extensions, the smaller the box, the better the performance. The box default is twice the size of the original body box. This may be too small on bodies with acute angles between remaining faces.
(part:clear) (define b1 (solid:pyramid 50 25 25 10 10)) (ray:queue 58.9619 -117.507 83.0834 -0.408248 0.816497 -0.408248 1.97972) (define rem_face (pick-face)) (entity:set-color rem_face RED) (rem:remove-faces rem_face (position -50 -50 -50) (position 50 50 100))
Remove Faces Affecting Remote Faces
The following example illustrates an unsuccessful remove operation caused due to non-adjacent (remote) faces being affected while trying to heal the gap left by removed faces.
;; ;; Create a solid block (define block (solid:block (position -20 -20 -20) (position 20 20 20))) ;; block (ray:queue 46.3049 -59.7387 46.3498 -0.408248 0.816497 -0.408248 1) (define bl_edge (pick-edge)) ;; bl_edge ;; Create a blend on one of the edges (blend:const-rad-on-edge bl_edge 10 'fix) (blend:fix bl_edge) ;; #[entity 2 1] ;; Convert into a sheet body (ray:queue 17.9549 -80.9806 32.8071 -0.408993 0.803499 -0.432566 1) (entity:delete (face:unhook (pick-face))) ;; () (ray:queue 17.9723 -76.5742 40.9756 -0.408993 0.803499 -0.432566 1) (entity:delete (face:unhook (pick-face))) ;; () (ray:queue 26.7368 -82.3145 22.026 -0.408993 0.803499 -0.432566 1) (entity:delete (face:unhook (pick-face))) ;; () (ray:queue 29.0968 -72.2172 38.5507 -0.408993 0.803499 -0.432566 1) (entity:delete (face:unhook (pick-face))) ;; () ;; Make a thickened body (define body (shell:sheet-thicken block -2 #f)) ;; body (ray:queue 44.1126 -82.2163 34.1219 -0.312006 0.930134 -0.193658 1) (define outer_blend (pick-face)) ;; outer_blend (ray:queue -23.26 -84.2378 -6.98984 0.377247 0.901269 0.213069 1) (define inner_blend (pick-face)) ;; inner_blend ;; Try to remove the inner blend face - Unsuccessful remove operation (rem:remove-faces inner_blend) ;;*** Error rem:remove-faces: remove operation affects remote face(s) ;; Now try to remove the outer blend first (rem:remove-faces outer_blend) ;; ;; Remove the inner blend now - successful remove operation (rem:remove-faces inner_blend)







