PK_ERROR_code_t PK_BODY_fill_hole ( --- received arguments --- PK_BODY_t target, --- target body int n_edges, --- number of edges const PK_EDGE_t edges[], --- boundary edges of hole double tolerance, --- tolerance const PK_BODY_fill_hole_o_t *options, --- options structure --- returned arguments --- PK_TOPOL_track_r_t *const tracking, --- tracking information PK_fill_hole_fault_t *const fault, --- status int *const n_fault_topols, --- number of fault topologies PK_TOPOL_t **const fault_topols --- topologies associated --- with fault ) This function will fill a hole in a body or collection of bodies with a set of faces. Specific Errors: PK_ERROR_general_body general body PK_ERROR_not_in_same_partition edges are not all in the same partition PK_ERROR_bad_option_data a fill sheet body is required PK_ERROR_not_sheet fill_sheet is not a sheet body PK_ERROR_not_in_same_body target is a solid body and all the edges are not in the same body PK_ERROR_wire_body a wire edge has been supplied when using option to trim to laminar edges of sheet PK_ERROR_same_tool_and_target fill_sheet is also target body PK_ERROR_cant_fill_hole failed to patch hole PK_BODY_fill_hole will patch a hole with a collection of faces. The hole may consist of a gap in one or more sheet bodies, or it may be a single rubber face in a solid or sheet body. The boundary of the hole is specified by the array edges. If the hole is a rubber face, then the edges in edges should be the boundary edges of the rubber face. If the hole is a gap in one or more sheet bodies, then the edges in edges should be the laminar edges around the gap. At least one of the edges in edges should be an edge of the target body. The method field in the options structure is used to determine how the hole will be patched. If method is set to either of `PK_fill_hole_trim_to_hole_c or PK_fill_hole_trim_to_sheet_c then the application must supply a fill sheet body to define the geometry to use for the patch over the hole. The fill sheet body should be sufficiently large to cover the hole. There must be only one connected set of laminar edges in the fill sheet body. If method is set to PK_fill_hole_trim_to_hole_c, then the fill sheet body will be trimmed back to the boundary edges of the hole before it is used to patch the hole. The geometry of the boundary edges of the hole must form a single closed loop. The boundaries of the hole must also all lie within tolerance of the fill sheet body. If the hole is a gap in one or more sheet bodies, then PK_BODY_fill_hole will accept edges of wire bodies in the edges array in order to specify the edge geometry of the patch between the bodies. If method is set to PK_fill_hole_trim_to_sheet_c, then the target bodies will be first trimmed back to meet the laminar edges of the fill sheet body. The whole of the fill sheet body will then be used for the patch over the hole. The laminar edges of the fill sheet body must all lie within tolerance of a body where it is intended that the fill sheet should be joined to the body. At least one of the laminar edges of the fill sheet body should lie within tolerance of every body specified in the edges array. Edges of wire bodies are not permitted in the edges array. If method is set to PK_fill_hole_create_patch_c, then no fill sheet body should be provided. Instead Parasolid will create a suitable set of faces to fill the hole. The boundary edges of the hole will be maintained and the created patch will meet the surrounding geometry smoothly where possible. target will be the only body which survives the operation, all the other bodies will be merged into target. The bodies of edges should not intersect or have edges which meet other than at vertices in the boundary of the hole. The function will not attempt to sew the bodies of edges together if they do have any edges which breach this condition. Tracking The returned tracking structure contains topology tracking information on the operation. If the function is successful, then the faces which have been used to cover the hole will be returned in the product_topols array of a track record of type PK_TOPOL_track_create_c. Error handling If this function returns PK_ERROR_no_errors, the result of the operation will be indicated by the value of fault. When this value is not set to PK_fill_hole_ok_c, it indicates the operation has failed and an array of entities involved in this failure may also be returned in fault_topols. The number of fault_topols returned will depend on the value of fault and it might be zero. If the value of fault is PK_fill_hole_face_c or PK_fill_hole_face_face_c then this indicates that the hole has been patched, but the resultant body is invalid. This function is not supported for general bodies.