Deleting Entities   

<<< Overview of Editing Models Chapters Identifying And Simplifying Model Details >>>

Contents

[back to top]


63.1 Introduction

Parasolid provides a range of tools for deleting faces and healing the resulting wounds. This chapter describes the main function, PK_FACE_delete_2, and also tells you where you can find information on related tools offered by Parasolid.

For an example of this functionality, see the code example in the C++\Code Examples\Modelling\LOP\Face Delete folder, located in example_applications in your Parasolid installation folder.

 

Related Topics:

[back to top]


63.2 Deleting faces and healing wounds

A common operation during model editing is to delete one or more faces from a body. When performing this type of operation, your application must ensure that the resulting body remains valid afterwards; deleting a face from a solid body leaves a wound in the body that requires healing if validity is to be maintained.

63.2.1 Methods for healing wounds

A variety of methods are available for healing wounds created when editing, and in particular deleting, faces in a body. These are exposed in the PK_FACE_heal_t structure, which is used by the following functions:

The following table describes the various healing methods available.

 

Note: Not all of the methods available can be used in all functions. The table below provides details.

 

Method

Value of heal_action

Description

Capping

PK_FACE_heal_cap_c

Calculates a surface that can cover a wound; this surface must therefore contain all edges of the wound

Allow shrinkage

PK_FACE_heal_shrink_c

Allow faces adjacent to the wound to shrink or grow in order to heal the wound.

Not available to PK_FACE_make_solid_bodies or PK_FACE_remove_to_solid_bodies.

Grow from parent

PK_FACE_heal_grow_from_parent_c

Faces from the original body that are not inputs in the operation (parent face set) are grown around the hole until the hole is covered.This heal action offers a subset of the functionality of PK_FACE_heal_shrink_c, and should only be used with PK_FACE_make_solid_bodies or PK_FACE_remove_to_solid_bodies; for all other functions, use PK_FACE_heal_shrink_c.

Grow from child

PK_FACE_heal_grow_from_child_c

Extends the set of input faces (child face set) around the hole until they cover the hole.

Not available to PK_FACE_delete_2.

Only available as a child_heal_action to PK_FACE_remove_to_solid_bodies.

Leave rubber

PK_FACE_heal_no_c

Leave each hole as a face with no surface geometry

 

Note: Where the edges bounding the wound are tolerant, you can only heal the wound by capping if the wound can be capped with a planar surface.

63.2.2 Calling PK_FACE_delete_2

PK_FACE_delete_2 receives an array of faces that you want to delete, together with an options structure that contains the following options:

 

Argument

Description

heal_action

The method for healing the wounds caused by the operations. See Section 63.2.3, “Heal actions when deleting faces”, for more information.

heal_loops

Whether loops should be healed together or separately. See Section 63.2.4, “Healing faces with multiple loops”, for more information.

local_check

Whether you want to perform a local check on entities that are created by the operation. If this is PK_LOGICAL_true, then checking results are returned in a report of type PK_REPORT_1_t. See Chapter 11, “Using Reports”, for more information.

allow_disjoint

Whether or not to allow a disjoint result. See Section 63.2.5, “Allowing disjoint results”, for more information.

repair_fa_fa

Whether to repair face-face inconsistencies found by local checking. See Section 63.2.6, “Repairing face-face inconsistencies”, for more information.

track

Whether to track new entities resulting from a delete operation. Default: PK_delete_track_no_c. See Section 63.3, “Deleting faces without healing wounds” for more information.

Provided the faces received by PK_FACE_delete_2 are locally manifold, the body that they are part of may be a general body: PK_FACE_delete_2 deletes the faces, heals the wounds as requested, and returns a general body as shown in Figure 63-1.

 

Figure 63-1 Deleting faces and healing wounds on a general body

It returns a tracking structure that contains a split tracking record if the operation split the body into multiple bodies (and allow_disjoint was PK_LOGICAL_false). It is empty otherwise.

63.2.3 Heal actions when deleting faces

PK_FACE_delete_2 supports a subset of the heal actions described in Section 63.2.1, “Methods for healing wounds” when healing wounds. This section describes the methods supported, and provides examples.

In practice, there are only two heal actions that you need to use when calling PK_FACE_delete_2:

Figure 63-2 shows a simple example that illustrates the difference between these heal actions; the pad can be removed from the pyramid either by capping it, to create a truncated pyramid, or by extending the adjacent faces, to create a complete pyramid.

 

Figure 63-2 Deleting faces using “capping” and “allow shrinkage” methods

Figure 63-3 shows an example where the result is the same no matter what heal action is chosen: deleting the faces that comprise the blind hole caps the resulting wound whether a capping face is created, or the adjacent face is extended.

 

Figure 63-3 Healing wounds by capping a hole with a surface

Figure 63-4 shows an example in which the surrounding faces must be grown in order to heal the wound successfully. PK_FACE_heal_cap_c cannot be used in this case because neither a plane nor any single one of the surfaces of the surrounding faces cover the whole wound. PK_FACE_heal_shrink_c is therefore required.

 

Figure 63-4 Healing wounds by growing the faces around the hole: PK_FACE_heal_shrink_c

Figure 63-5 shows an example where some faces surrounding the wound must be grown while others must be shrunk. Again, PK_FACE_heal_shrink_c is the correct heal_action to use.

 

Figure 63-5 Healing wounds growing some faces around a hole while shrinking others: PK_FACE_heal_shrink_c

 

Note: You can also supply PK_FACE_heal_grow_from_parent_c. However, this heals wounds by growing faces in exactly the same way as PK_FACE_heal_shrink_c, as shown in Figure 63-4, but does not provide the shrinking behaviour shown in Figure 63-5.

63.2.4 Healing faces with multiple loops

The wound left when deleting a face is actually a hole that has one or more loops. If the hole contains more than one loop, and if you have set heal_action to PK_FACE_heal_shrink_c, Parasolid needs to either deal with these loops individually in order to heal the wound, or deal with them as a single composite, reducing the total number of loops remaining in the healed body. The method used depends on the configuration of the loops in the original body; only one method will yield a valid body. You can use the heal_loops option to control how the loops are treated.

 

Note: You are strongly recommended to set the heal_loops option to PK_FACE_heal_loops_auto_c. Using this value instructs Parasolid to decide on the appropriate method for healing the loops.

Figure 63-6 shows an example where there are several independent loops enclosed by the faces to be deleted. Healing these loops separately preserves them in order to produce the valid body shown.

 

Figure 63-6 Healing multiple loops separately when deleting faces

Figure 63-7 and Figure 63-8, by contrast, show examples where the loops inside the faces to be deleted are dependent on each other. These loops need to be healed together in order to produce the valid bodies shown.

 

Figure 63-7 Healing multiple loops together when deleting faces

 

Figure 63-8 Healing multiple loops together when deleting faces

Parasolid can heal loops in complex configurations, such as those that contain vertices with three or more edges. In Figure 63-9, although the loops lie solely on the face to be deleted, they contain vertices with three attached edges.

 

Figure 63-9 Healing wounds with loops that contain multiple edge vertices by growing

Parasolid can heal wounds such as this even when faces need to shrink as well as grow. In Figure 63-10 the planar face can be deleted as shown. This shrinks the faces around the rectangular loop even though they have different surfaces attached, while growing the spherical surface to heal the wound.

 

Figure 63-10 Healing wounds with loops that contain multiple edge vertices by growing and shrinking

63.2.5 Allowing disjoint results

By default, if the healing process splits the original body into multiple components, each component results in a separate body. However, you can ensure that all components remain in a single body using the allow_disjoint option. Figure 63-11 illustrates a simple example in which the middle face of a solid body is deleted. Depending on the setting for allow_disjoint , the result is either two spherical solid bodies (the default), or a single disjoint body comprising two disjoint spherical solid components.

 

Figure 63-11 Returning a single disjoint body when deleting faces

 

Note: You cannot set this option to PK_LOGICAL_true if heal_action is PK_FACE_heal_no_c and heal_loops is PK_FACE_heal_loops_separate_c.

63.2.6 Repairing face-face inconsistencies

You can use the repair_fa_fa option to choose whether to repair face-face inconsistencies that remain after a successful face deletion.

 

Values

Description

PK_repair_fa_fa_no_c

No repairs performed.This is the default value.

PK_repair_fa_fa_yes_c

Repairs performed.

 

Figure 63-12 Repairing self-intersections that remain after a face deletion

If repair_fa_fa is PK_repair_fa_fa_yes_c and the repairs are successful, a report of type PK_REPORT_1_t is returned via the Parasolid Report which contains the following information:

 

Field

Description

status

This has the value of PK_REPORT_1_fa_fa_repair_c.

new_items

Edges created by intersecting the pairs of clashing faces.

 

Note: If local_check is set to PK_LOGICAL_false and PK_repair_fa_fa_yes_c is chosen, PK_ERROR_bad_combination is returned

63.2.7 Tracking capping faces when healing wounds

You can delete a face from a classic or facet body and heal the resultant wounds with capping faces. These capping faces can be tracked by setting the track option to PK_delete_track_cap_c. When set to this value, each capping face created generates a tracking record of type PK_TOPOL_track_create_c that contains the tags of the original faces and the new capping faces.

 

Figure 63-13 Deleting faces from a facet body and healing the wound with capping faces

 

Note: The track option can only be set to PK_delete_track_cap_c if heal_action is set to PK_FACE_heal_cap_c.

[back to top]


63.3 Deleting faces without healing wounds

You can delete a face from a body without healing the resultant wounds. This creates rubber faces (i.e a face without geometry) that can be used in later downstream operations. You can track these rubber faces by setting the track option to PK_delete_track_rubber_c. When set at this value, each rubber face created generates a tracking record of type PK_TOPOL_track_create_c that contains the tags of the original faces and the new rubber faces.

 

Figure 63-14 Deleting faces from a body without healing the wound

 

Note: The option can only be set to PK_delete_track_rubber_c if heal_action is set to PK_FACE_heal_no_c.

63.3.1 Limitations/restrictions on healing wounds

It is not possible to heal wounds in a single operation if the set of faces that need to be healed are themselves non-manifold, as shown in Figure 63-15. This operation is possible if the faces are deleted using two calls to PK_FACE_delete_2, each using the PK_FACE_heal_shrink_c option.

 

Figure 63-15 Non-manifold face set boundary

63.3.2 Related functionality

PK_FACE_delete_2 is not the only tool provided by Parasolid for removing faces from a body. Other tools that you can use are as follows:

 

Tool

Description

PK_FACE_delete_facesets

Delete a set of faces identified using PK_FACE_identify_facesets. See Section 63.5, “Deleting face sets”.

PK_FACE_remove_to_solid_bodies

Remove faces from a body to create another body. See Section 71.2, “Removing faces to create new bodies”.

PK_FACE_delete_blends

Remove blend faces from a body. See Section 63.6, “Deleting blend faces”.

PK_FACE_delete_from_sheet

Removes a set of faces from a sheet. No healing is required when using this function.

PK_FACE_delete_from_gen_body

Deletes faces from a general body. See Section 15.9.3, “Deleting entities from general bodies”.

By combining these functions with other functionality, you can implement sophisticated tools that let your users edit models interactively and intuitively. For example, you could delete a face from a solid body to leave an open sheet body by first using PK_REGION_make_void to convert the solid body to a sheet, and then using PK_FACE_delete_from_sheet to remove the face in question. Using this strategy avoids the need to heal wounds, letting you implement editing tools that are not possible using PK_FACE_delete_2 alone.

 

Figure 63-16 Deleting a face from a solid to leave an open sheet

[back to top]


63.4 Deleting edges

You can use PK_EDGE_delete to remove trimmed boundary features such as laminar and wire edges in order to simplify a model. This general purpose deleting function can heal gaps in the resulting model, making it particularly useful for simplification, and producing a model that is better suited, for example, to CAE operations. You can also use PK_EDGE_delete as an alternative to PK_TOPOL_delete_redundant_2 for removing redundant or mergeable edges, in which case it also fills the gap by extending or trimming adjacent edges rather than simply removing the edge. See Section 33.1, “Introduction”, for more information about PK_TOPOL_delete_redundant_2.

 

Note: This functionality does not support facet geometry.

Figure 63-17 shows several examples that illustrate how PK_EDGE_delete can remove edges and heal the resulting wound. In each example, the edge to be deleted is shown in red.

PK_EDGE_delete can only heal wounds if the 3-space curves of the edges adjacent to the resulting wound can meet when extended and lie in the surface. If this is not the case, the PK_EDGE_delete returns PK_ERROR_cant_heal_wound.

In addition, edges that are shared between two faces can be deleted if the two faces are mergeable; otherwise PK_ERROR_not_implemented is returned.

 

Figure 63-17 Deleting edges and healing the resulting wound

You can delete edges in non-manifold bodies so long as the edge you want to delete is in a locally manifold part of the body. Figure 63-18 shows an example in which an edge can be successfully deleted from a non-manifold “T-sheet” body, because the only non-manifold part of the body is the area where three faces meet at a single edge.

 

Figure 63-18 Deleting edges in a locally manifold part of a non-manifold body

63.4.1 Deleting holes in a sheet body

You can remove holes from single and multi-faced sheet bodies using PK_EDGE_delete. Alternatively, providing that the hole lies completely within a single face, you can use PK_LOOP_delete_from_sheet_body to specify a list of interior loops to delete.

 

Note: PK_EDGE_delete does not support facet geometry.

63.4.2 Update control

PK_EDGE_delete_o_t contains an update option to maintain consistency when rebuilding models built in older versions of Parasolid. See Section 62.5.2, “Update control”, for information.

[back to top]


63.5 Deleting face sets

You can use PK_FACE_delete_facesets to delete face sets from a body. These face sets could typically be those identified by calls to either PK_BODY_find_facesets, PK_BODY_identify_details, or PK_FACE_identify_blends.

PK_FACE_delete_facesets receives and returns the following arguments:

 

Received

Description

n_facesets
facesets

The number of face sets to delete, together with an array of those face sets. Each element in facesets is itself an array of faces.

options

A set of options.

Returned

Description

n_bodies
bodies

The number of resulting bodies, together with the bodies themselves.

n_failed_facesets
failed_facesets_indices

The number of face sets that could not be deleted, together with indices into the facesets array indicating which face sets could not be deleted.

63.5.1 Options when deleting face sets

PK_FACE_delete_facesets takes a number of options, available in PK_FACE_delete_facesets_o_t. The options available are as follows:

 

Option

Description

allow_disjoint

If PK_LOGICAL_true, PK_FACE_delete_facesets returns a disjoint body if deleting face sets splits the body into two or more components. Default: PK_LOGICAL_false.

heal_action

If PK_FACE_heal_yes_c, PK_FACE_delete_facesets attempts to heal the body using any available method after deleting the face sets. This may split the body into two or more bodies. If PK_FACE_heal_no, wounds are not healed, and each deleted face set is replaced by a single rubber face. If any other value, only the specified heal_action is attempted. See Section 63.2.1, “Methods for healing wounds” for details about the available values. Default: PK_FACE_heal_yes_c.

n_details
details

These options are used to pass detail types to PK_FACE_delete_facesets for the face sets you want to delete. If you know the detail type of each of the face sets you are passing into the function, passing this information as well can help performance.

The details array contains an array of detail types corresponding to the array of facesets passed to the function. n_details represents the size of this array. The detail types may be any of the values described in Section 64.4.1, “Finding and returning detail types”, and in addition may include the following type:

Setting n_details to 0 (the default) is equivalent to setting details to a single element array containing PK_detail_any_c.

tolerance

Tolerance for healing.

update

Update switch to maintain consistency when rebuilding models built in older versions of Parasolid. See Section 62.5.2, “Update control”, for information.

Default: PK_local_ops_update_default_c.

 

Note: This functionality does not support facet geometry unless the heal_action option is set to PK_FACE_heal_no_c, or it is set to PK_FACE_heal_yes_c and the details option for the faceset containing facet geometry is set to PK_.detail_blend_rb_const_r_c.

[back to top]


63.6 Deleting blend faces

PK_FACE_delete_blends is used to delete blend faces. In general, PK_FACE_delete_blends is intended for deleting either single blend faces or complete chains of blends. The faces supplied must all come from the same body. PK_FACE_delete_blends takes into account topological changes that occur during blending in order to provide a delete operation that is as close to an inverse blend as possible. Using this information, PK_FACE_delete_blends can delete a higher proportion of faces than PK_FACE_delete_2.

If blend faces cannot be deleted, PK_ERROR_cant_heal_wound is returned and in cases where specific blend faces can be identified as having caused the failure, a Parasolid Report of type PK_REPORT_1_t is generated with a status of PK_REPORT_1_bad_blend_c indicating which faces could not be deleted. See Chapter 11, “Using Reports”, for more information about the Parasolid Report mechanism.

 

Note: Because chamfer blends do not maintain any information about the original edge, there are some configurations in which, though a rolling ball-like blend could be deleted, a chamfer blend cannot. In most cases, you can use the unders_data option to handle this. See Section 63.6.4, “Specifying underlying entities for blends to be deleted”, for information. This operation can also be performed using PK_FACE_delete_2 instead: see Section 63.1, “Introduction”, for details.

 

Figure 63-19 Before and after deleting the faces created by a blend operation

You can delete blend faces in non-manifold bodies so long as the blend you want to delete is in a locally manifold part of the body as shown in Figure 63-20.

 

Figure 63-20 Deleting blends on locally manifold bodies

 

Warning: PK_FACE_delete_blends assumes that the faces specified have been created by a blend operation. It is not suitable as a tool for general face deletion.

A PK_FACE_delete_blends_o_t options structure contains the following options that let you control blend deletion:

 

Option

Description

check_fa_fa

Check face-face consistency on the resulting body. See Section 63.6.1, “Checking face-face consistency”, for more information.

simplify

Simplify the surfaces of adjacent blend faces in the model. See Section 63.6.2, “Simplifying adjacent blend faces”, for more information.

cap
cap_data

Whether to add cap faces to any resulting wounds. See Section 63.6.3, “Adding cap faces to heal wounds”, for more information.

update

Update switch to maintain consistency when rebuilding models built in older versions of Parasolid.See Section 62.5.2, “Update control” for information.

Default: PK_local_ops_update_default_c.

unders_data

Optional sub-structure to allow you to specify blends together with their underlying faces. See Section 63.6.4, “Specifying underlying entities for blends to be deleted”, for information.

Default: do not specify data for underlying faces.

You can also use PK_FACE_delete_facesets to delete constant-radius rolling-ball blends from a body. See Section 63.5, “Deleting face sets”for details.

 

Related Topics:

63.6.1 Checking face-face consistency

You use the check_fa_fa option to specify whether face-face consistency checking should be performed on the body resulting from the operation. The permitted values are:

 

Value

Description

PK_check_fa_fa_yes_c

Check for face-face inconsistencies (the default)

PK_check_fa_fa_no_c

Do not check for face-face inconsistencies

If face-face consistency checking is performed, then altered faces are checked against each other and against unaltered faces.

63.6.2 Simplifying adjacent blend faces

You use the simplify option to choose whether to simplify the surfaces of blend-like faces that are adjacent to any deleted blends. You can use this option to eliminate any B-surfaces from suitable faces adjacent to those being deleted.

With this option switched on, healing the gaps created when deleting blends is more likely to be successful, because blend surfaces can be extended more easily than B-surfaces. Using the option simplifies the overall model, and can improve performance for downstream operations. In some cases, it can improve the chance of PK_FACE_delete_blends succeeding.

Switching the simplify option on does not make any significant difference to the shape of the model, since replacement surfaces are always within tolerance of the original surface.

This option only simplifies faces that satisfy all three of the following conditions:

Faces that satisfy these conditions have their surfaces replaced by either blend, torus, or cylinder surfaces as appropriate.

The permitted values for the option are:

 

Value

Description

PK_FACE_simplify_adj_blends_c

Try to simplify blend surfaces that are vertex-adjacent to blends to be deleted.

PK_FACE_simplify_no_c

Do not try to simplify any adjacent blend surfaces.

 

Note: Parasolid reapplies the surfaces of any blend faces (of class PK_CLASS_blendsf) that are dependent on faces that have been simplified to ensure that their underlying surfaces reference the new simplified geometry.

63.6.3 Adding cap faces to heal wounds

As mentioned in Section 63.6, “Deleting blend faces”, PK_FACE_delete_blends is intended for deleting either single blend faces or complete chains of blends. Sometimes you might just want to delete a few blends from a longer chain; in particular, you might want to delete a number of blends in order to add a new feature to the model in the area of those blends, before reblending that area. This section describes how to delete such blends.

You can delete a partial chain of blends using the cap option. By setting this option to PK_blend_delete_cap_planar_c, Parasolid creates planar cap faces with which to heal the wounds left by deleting only part of a chain of blends.

 

Note: By default, any cap faces created by this option are placed approximately 10% from the end of the blend; however, this can be controlled using the cap_data option.

The effect of using this option is shown in Figure 63-21. Here, the middle blend face in a chain of three blends has been deleted, with a view to editing the model in the area of the deleted blend before reblending.

 

Figure 63-21 Creating capping faces when deleting blends

In addition, you can control where blend caps are added using the cap_data option. This is a structure containing the following information:

 

Field

Description

blends

A list of blends to be partially deleted.

end_idents

A corresponding list of entities that identifies one end of each blend specified in blends .

keep

A corresponding list of tokens that specifies whether the blend should be retained or deleted, for each blend end specified in end_idents .

type

A corresponding list of tokens that specifies the type of capping for each end blend specified in end_idents .

Figure 63-22 shows an example where two blend chains have been applied to a body. Suppose that you want to delete the blend with the larger radius (which was also applied last), as indicated. You may want to do this in order to resize the blend with the smaller-radiused blend (shown in orange), for example.

You can remove the relevant part of this blend using the cap option. However, doing this without supplying any cap_data creates a very small unwanted cap face, as shown in Figure 63-22. This cap face can be eliminated by supplying cap_data that specifies that the blend should be kept at one end only.

 

Figure 63-22 Using cap controls to remove unwanted faces

Better still, Figure 63-23 shows how you can create a result in which the majority of the larger blend is retained. You can do this by specifying where you want the blend to be removed, rather than where you want it to be retained. Again, no unwanted cap face is created in the region of the blend with the smaller radius.

 

Figure 63-23 Using cap controls to remove minimal blend material

Using the type field, you can choose the type of capping you want to place at the edge of a blend. This field takes the following values:

 

Value

Description

PK_blend_cap_type_within_c

Delete the edge to within 10% of the end of the blend. The planar cap is placed approximately10% from the edge of the blend.

PK_blend_cap_type_beyond_c

Delete beyond the blend. The cap will be placed beyond the blend, close to the edge.

PK_blend_cap_type_at_edge_c

Delete at the edge. The blend will be capped by a surface passing through the edge, which may not be planar.

Figure 63-24 shows examples of using the type field.

 

Figure 63-24 Using the type field to create different placements of cap faces

63.6.4 Specifying underlying entities for blends to be deleted

You can use the unders_data sub-structure to specify underlying entities for some of the blends you wish to delete. Specifying underlying entities for some or all of the blends you are deleting facilitates:

 

Figure 63-25 Deleting cliff blends and replacing the missing underlying faces

 

Figure 63-26 Deleting notch edge blends

The unders_data sub-structure takes the following fields:

 

Field

Description

n_blends
blends

The blends for which you want to specify underlying entities. These should be faces that are also supplied in the faces received argument to PK_FACE_delete_blends.

unders

An array of arrays of entities. The entities that you need to supply depend on the type of blend you are deleting. See PK_blend_delete_unders_data_t in the PK Interface Programming Reference Manual for more information.

Note: If you are deleting cliff or notch blends the underlying entities of the blend must be supplied for the delete operation to succeed.

 

[back to top]

<<< Overview of Editing Models Chapters Identifying And Simplifying Model Details >>>