12-28-2009 09:47 AM
We are using the technique mentioned here (but in C++):
After we call api_remove_face on the common face(s), the number of cells is what we would expect, but edges remain that I would have expected to be removed per the api_remove_face documentation. The simple case there 2 boxes overlap demonstrates this.
01-04-2010 08:47 AM
Would it be possible for you to attach an image of the issue you are experiencing. Specifically showing the edges remained that you expected to be removed.
01-04-2010 09:39 AM
Here you go. The first one (capture.jpg) show the 2 overlapping boxes. Capture2.jpg shows what I want it to look like after the cell merging. Capture3.jpg shows what it does look like.
I basically want it to look the same as if it did if I unioned the boxes, but for a variety of reasons I can't use a regular boolean.
01-27-2010 08:29 PM
Here is the modified scheme example from the FAQ. Is this what you are looking for?
(define b (solid:block (position 0 0 0) (position 20 5 5)))
(define t (solid:block (position 0 0 5) (position 5 5 20)))
(bool:nonreg-unite b t)
(define cells (entity:cells b))
(define num_cells_before (length cells))
(test:equal num_cells_before 2 "Incorrect cells")
(define faces_cell1 (entity:faces (list-ref cells 0)))
(define faces_cell2 (entity:faces (list-ref cells 1)))
;;Get the common face from the above lists.
(define common_face (list-ref faces_cell1 5))
(test:equal common_face (list-ref faces_cell2 0) "Not a common face")
;;Remove common face.
;;There is one 3D cell after merge
(define num_cells_after (length (entity:cells b)) )
(test:equal num_cells_after 1 "3D cells did not merge")
The last call to bool:merge will remove the scar edges. bool:merge implements api_clean_entity (http://doc.spatial.com/qref/ACIS/html/group__BOOLA
01-31-2010 11:15 AM
That works great! Thanks.
When api_clean_entity removes edges and vertices, what, if anything, happens to attributes on the associated faces/edges? Can I assume they follow the typical actions defined when the attributes are added?
09-21-2010 06:26 AM
Is there a fast way to remove a lot of faces from a body? I have a case where I need to remove > 10000 faces and calling api_remove_face takes a long time (> 10 minutes). I've tried api_remove_faces (preceeded by a call to api_initialize_face_removal), but this doesn't reduce the number of cells in my CT model.
09-21-2010 06:48 AM
When you say "remove faces", what end result are you looking for? Api_remove_face does a lot of expensive geometric work to close up the solid body after removing a face or faces. If you just want to take faces away and leave an open solid, then use api_unhook_face or api_unhook_faces followed by deleting the unhooked entities.
If you really do want the operation of api_remove_face -- preserving the integrity of the solid body -- then you can get some improvement by removing multiple connected faces at once. 10,000 faces is a lot to be removing - what sort of models are they?
09-21-2010 06:53 AM
I need to keep the solid body closed up. Basically we are trying to merge a bunch of 3D Cells together (http://doc.spatial.com/index.php/HowTo:Merge_two_3
You indicate that I may see some improvement by removing multiple connected faces at once. How can I try this out? As I mentioned api_remove_faces didn't work.