Component:Repair Body Intersections

From DocR21

Jump to: navigation, search
All Repair Body Intersections Articles | C++ APIs | Scheme Extensions | Global Options | Error Codes
edit  

Repair Body Intersections Component


The Repair Body Intersections Component (RBI), repairs body self-intersections that arise from performing a modeling operation. RBI is used by Local Operations , Shelling , and other components like Sweeping and Blending.

Self-intersecting bodies have mutually intersecting faces, that is, faces intersecting in places other than any common boundaries between them. This extension is intended to repair any self-intersections on a body that may result from local operations or shelling. This extension does not handle topology changes which presently prevent these operations from completing. Instead, it repairs self-intersections resulting from completed operations. Body self-intersections made by other operations such as sweeping or blending may be repaired if the body is in a suitable state.

From R15 onwards, RBI is enabled within Local Operations by default and it is controlled by a default lop_options object, whose repair_self_intersections flag is set to TRUE. To perform a Local Operation without RBI, supply a lop_options object with the repair_self_intersections flag set to FALSE.

Now RBI can repair exclusive sheet bodies. If the input body is a sheet, the API will not throw RBI_FREE_EDGE exception, instead the algorithm will try to repair the body.

Self-intersecting Body
Repaired Body
Self-intersecting Sheet
Repaired Sheet Body


edit  

Repair Body Intersections Operations


Repairing operations has been implemented in SPArbi component as a API function api_repair_body_self_ints. Following are the main repairing operations for a self-intersecting body:

Operation Description
Fix faces with self-intersecting loops This operation repairs a loop which is self intersecting.
Fix faces with intersecting loops This operation repairs the loops of a face which are intersecting.
Fix inverted faces This operation repairs a face which has inconsistent loops.
Fix shells that self-intersect This operation repairs a shell whose faces are intersecting.
Fix shells that intersect This operation repairs the shells which intersects with other shell of the same body.
Remove inverted faces This operation removes the inverted faces created while repairing a self-intersecting body, if the option rbi_remove_inv_face turned on.


edit  

Repair Body Intersections Interface


Repair Body Intersections

The API function api_repair_body_self_ints is intended to repair body self-intersections made by Local Ops or Shelling. The API takes a body and the list of changed faces as input for the operation. If the list of changed faces is empty, it considers that all the faces in the body has changed.

outcome api_repair_body_self_ints( body to repair, 
                                   number of changed faces, 
                                   list of changed faces, 
                                   options)                  

Remove and Repair Body

The API function api_remove_and_repair_body attempts to remove the specified faces from the body, and form a closed solid by growing the remaining adjacent faces and intersecting them amongst themselves and with remote faces. The API takes a list of faces to be removed as input.

outcome api_remove_and_repair_body( number of faces to be removed, 
                                   list of faces to be removed, 
                                   bounding box for intersection, 
                                   options)

It is recommended not to use api_remove_and_repair_body; use api_remove_faces instead.

Options

Main article: :Category:Repair Body Intersections


The main Repair Body Intersections APIs take options to control their behavior.

Important: For historical reasons, there are some global options that also affect the behavior of Repair Body Intersections operations.


Error Codes

Main article: Repair Body Intersections - Error Codes


Upon failure of an Repair Body Intersections API,error codes will be returned that explain the failure and suggest possible actions for correction.


edit  

Repair Body Intersections Topics


Assumptions

The following assumptions are made while repairing a self-intersecting body by RBI.

  • The set of faces known to have been changed by the modeling operation (like Local Ops, Shelling) are supplied with the body as input.
  • If the set of changed faces is empty, RBI considers all the faces in the body to have changed.
  • The faces involved in intersection may be in different shells or lumps.
  • The body consists of a number of solid shells, with a distinct inside and outside.
  • The body was formerly valid and has become self-intersecting as a result of one or more faces passing through other faces during a local operation, or becoming partially or completely coincident with them.
  • The faces themselves must be valid except that they may be self-intersecting, or inverted or both.
  • The body shells may intersect.
  • The body shells may self-intersect.
  • Faces may have intersecting loops.
  • Faces may have self-intersecting loops.
  • Self-intersecting faces have some edges that intersect in places other than any common boundary vertices between themselves, but the geometry of faces is assumed not to intersect itself.

Limitations

  • The directions of open edges on periodic curves must be correct. Local Operations and Shelling will do this if repair_self_intersections option is set to TRUE or option lop_check_invert is off.
  • The body is assumed to consist entirely of valid connected faces.
  • The shells must not be non-manifold.
  • Faces must not have self-intersecting surfaces.
  • Edges must not have self-intersecting curves.


edit  

See Also


Personal tools
Live