SchemeExt:Rem:remove-faces

From DocR21

Jump to: navigation, search

Contents

Action

Removes faces by growing adjacent faces to fill the gap.

Filename

scm/scmext/rem/rem_scm.cpp

APIs

api_remove_faces

Syntax

(rem:remove-faces face-list [box-h box-l] [lopt] [acis-opts])

Argument Types

Argument Scheme Data Type
face-list face|face...)
box-h position
box-l position
lopt lop_options
acis-opts acis-options

Returns

owner-body | (list error-entity ...)

Errors

Refer to Remove Face Error Codes.

Note: Error entities contained in the outcome's error_info object are returned and highlighted.


Description

This Scheme extension removes an array of faces, growing the adjacent faces to fill the gap. Curves and surfaces of edges and faces surrounding the removed faces, and which end in your supplied box, are extended by a length approximately equal to twice the diagonal of the supplied box. Similarly the intersections required to produce new edges and vertices, are limited by the size of you supplied box.

Thus, you should supply a box likely to contain the changed faces. An overly large box will result in wasted computation. The default box is twice the body box of the original body.

Note: There may be no solution to the gap filling problem, or no solution using adjacent faces only. If the function detects these circumstances it issues an error and leaves the body unchanged.


Adjacent faces become infinite and with no loops will be deleted. An example of this would be when the tops of cylindrical bosses have the cylindrical face removed, leaving the remaining space unbound. If the faces to be removed are isolated from one another, they are removed in the order supplied.

The body shells and lumps are corrected at the end of the operation, should they have been split. New shells of different solidity to the original shell are deleted, for example, void shells made from a shell originally solid.

To have api_remove_faces heal gaps using adjacent and remote faces set option rem_use_rbi to TRUE, and api_remove_and_repair_body will be called.

Refer to Remove Face Operation for more information.

Arguments

  • face-list identifies faces of a body to be moved.
  • 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.
  • lopt is the local operation option.
  • acis-opts specifies options such as versioning and journaling.

Limitations

  • Body must be manifold.
  • Some growing faces may shrink if necessary, but not so far as their boundaries. The healing 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 are not rigorously done between unconnected regions of growing faces.
  • If the geometry of the edges lateral to the face(s) being removed do not have a well behaved extension, this can cause the Scheme extension to fail.

Examples

(part:clear)
(define block1 (solid:block (position -25 -25 -25) (position 25 25 25))) 
(ray:queue 0 0 0 1 0 1 .1)
(define e (pick-edge))
(define blend (solid:blend-edges e 10)) 
(ray:queue 0 0 0 1 0 1 1)
(define f (pick-face))
(entity:set-color f 1)
(define remove (rem:remove-faces f))
rem:remove-faces
rem:remove-faces
(part:clear) 
(define surf1 (splsurf)) 
(define ctrlpoints1 (list (position -25 25 20) (position 0 25 50) (position 25 25 30) (position -25 0 10) (position 0 0 50) (position 25 0 25) (position -25 -25 30) (position 0 -25 50) (position 25 -25 20))) 
(splsurf:set-ctrlpt-list surf1 ctrlpoints1 3 3) 
(splsurf:set-u-param surf1 2 0 0 0) 
(splsurf:set-v-param surf1 2 0 0 0) 
(define uknots (list 0 0 1 1)) 
(splsurf:set-u-knot-list surf1 uknots 4) 
(define vknots (list 0 0 1 1)) 
(splsurf:set-v-knot-list surf1 vknots 4) 
(define face1 (face:spline-ctrlpts surf1)) 
(define block2 (solid:block (position -25 -25 -25) (position 25 25 25))) 
(ray:queue 0 0 0 0 0 1 1)
(define f (pick-face))
(define tweak (lop:tweak-faces f face1 #f)) 
(entity:delete face1)
(ray:queue 0 0 0 1 0 0 1)
(define f (pick-face))
(entity:set-color f 1)
(define remove (rem:remove-faces f))
rem:remove-faces (Remove and Extend Faces)
rem:remove-faces (Remove and Extend Faces)
;Remove and split 
(part:clear) 
(define pyr1 (solid:pyramid 100 25 25 6 25)) 
(define rotate (entity:rotate  pyr1 0 1 0 90)) 
(define sphere1 (solid:sphere (position 0 0 40) 25)) 
(define unite (solid:unite pyr1 sphere1)) 
(define pyr2 (solid:pyramid 100 25 25 6 25)) 
(define rotate2 (entity:rotate pyr2  1 0 0 90))
(define translate (entity:move pyr2  0 0 80))
(define unite (solid:unite pyr1 pyr2)) 
(ray:queue 0 0 40 1 0 0 1)
(define f (pick-face))
(entity:set-color f 1)
define remove (rem:remove-faces f ))
rem:remove-faces (Remove and Split Faces)
rem:remove-faces (Remove and Split Faces)
rem:remove-faces (Remove and Split Faces)
;Remove and delete 
(part:clear) 
(define block1 (solid:block (position -25 -25 -25) (position 25 25 25))) 
(define cyl1 (solid:cylinder (position 0 0 -5) (position 0 0 45) 20)) 
(define unite (solid:unite block1 cyl1)) 
(ray:queue 0 0 30 1 0 0 1)
(define f (pick-face))
(entity:set-color f 1)
(define remove (rem:remove-faces f))
rem:remove-faces (Remove and Delete Faces)
rem:remove-faces (Remove and Delete Faces)
Personal tools
Live