Simplifying Models   

<<< Modeling Support Chapters Partitions and Rollback >>>

Contents

Parasolid includes the following support for simplifying models:

[back to top]


40.1 Simplifying geometry

Parasolid provides two functions that you can use to simplify the geometry in a body:

These functions attempt the following simplifications for the geometry shown:

 

Geometry Original form Simplified form

Curve

Rational B-curve

Non-rational B-curve

B-curve

Line or circle

Surface

Rational B-surface

Non-rational B-surface

B-surface

Plane, cylinder, cone, sphere, or torus

These functions are particularly useful for simplifying all or part of a body after importing it into Parasolid. See Chapter 44, "Data Import", for more information.

[back to top]


40.2 Finding facesets

You can use PK_BODY_find_facesets to find sets of faces bounded by a given set of edges in a body. These facesets can then be deleted from the body, if desired, as described in Section 40.5, "Deleting facesets".

PK_BODY_find_facesets receives and returns the following arguments:

 

Received Description
body

The body in which to find facesets.

n_edges
edges

The number of edges bounding the facesets, together with the array of edges bounding the facesets.

options

A set of options

Returned Description
results

A structure containing the identified facesets, together with, optionally, the sets of edges that bound each faceset.

The options that you can specify are as follows:

 

Option Description
selector

Specifies which facesets to return if one or more selecting_topol are specified. See Section 40.2.1, "Choosing which facesets to return" for more information.

alternate

Whether or not to return alternating facesets, starting with the supplied selecting_topol. Default: PK_LOGICAL_false.

See Section 40.2.2, "Returning alternating facesets", for more information.

n_selecting_topol
selecting_topol

An array of topologies that are used to select which facesets are returned, together with the number of elements in the array. The precise facesets that are returned depends on the value of selector : see Section 40.2.1, "Choosing which facesets to return", for more information.

If selecting_topol is empty (the default), then all found facesets are returned.

want_bounds

Whether to return the bounding edges of each faceset. Default: PK_LOGICAL_false.

[back to top]

40.2.1 Choosing which facesets to return

You can use the selector and selecting_topol options to choose exactly which facesets are returned by PK_BODY_find_facesets.

The selector option takes the following values:

 

Value Description

PK_boolean_off_c

Return all facesets bound by the supplied edges, regardless of the value of selecting_topol .

PK_boolean_include_c

Return only those facesets that include one or more of the topologies in selecting_topol .

PK_boolean_exclude_c

Return only those facesets that do not include any of the topologies in selecting_topol .

This is illustrated in Figure 40-1.

 

Figure 40-1 Choosing which facesets to return

If a given topology in selecting_topol belongs to several facesets, then they are all selected or not selected, depending on the value of selector .

 

Note: The above description applies only if alternate is PK_LOGICAL_false (the default). Section 40.2.2, "Returning alternating facesets", describes the behavior of selector and selecting_topol when alternate is PK_LOGICAL_true.

[back to top]

40.2.2 Returning alternating facesets

If the alternate option is PK_LOGICAL_true, you can return alternate facesets in a body. The behavior of this option depends on the value of selector , and requires that selecting_topol contains a single topological entity, which is used to identify the "root" faceset in a body from which alternating facesets are calculated.

Consider the body shown in Figure 40-2. The "root" faceset is the innermost faceset that contains the selecting topology.

 

Figure 40-2 Returning alternating facesets

[back to top]


40.3 Identifying model details

You can use the function PK_BODY_identify_details to identify specific types of details in a body. The function returns each detail of a specified type as a faceset, which you might then delete from the model as described in Section 40.5.

PK_BODY_identify_details receives and returns the following arguments:

 

Argument Description
body

The body in which to identify details.

details
n_details

The types of detail you want to identify, together with the number of types of detail.

options

A set of options

Returned Description
results

The facesets identified, together with their detail types.

You should delete any redundant topology before calling this function, using PK_TOPOL_delete_redundant.

[back to top]

40.3.1 Finding and returning detail types

The types of detail that you can identify can be any of the following:

 

Detail Description

PK_detail_rubber_c

One or more connected rubber faces

PK_detail_hole_cyl_c

Any cylindrical hole

PK_BODY_identify_details returns a PK_identify_details_r_t structure that includes an array of identified facesets , together with an array of details . Each detail in the details array describes the type of detail represented by the corresponding faceset in the facesets array. The returned detail values may be any of the following:

 

Detail Description

PK_detail_any_c

Detail is unspecified.

PK_detail_rubber_c

One or more connected rubber faces.

PK_detail_hole_cyl_c

Any cylindrical hole.

PK_detail_hole_cyl_through_c

A cylindrical hole with two open ends.

PK_detail_hole_cyl_blind_c

A cylindrical hole with one open end and one closed end.

PK_detail_hole_cyl_closed_c

A cylindrical hole with two closed ends (i.e. enclosing a cavity).

PK_details_blend_rb_const_r_c

A rolling ball blend with a constant radius.

A cylindrical hole contains at least one face with the following restrictions:

A cylindrical hole may also have additional faces, so long as each additional face has two loops and a ruled surface. Additional faces make it possible to identify cylindrical holes that contain countersinks and counterbores.

Cylindrical holes can be closed by any face that has a ruled surface, in particular a plane or cone.

[back to top]

40.3.2 Constraining the radius of a cylindrical hole

You can use the hole_cyl_radius option in PK_BODY_identify_details_o_t to constrain PK_BODY_identify_details to only return cylindrical holes with a radius of less than a specified value.

[back to top]


40.4 Identifying blends

You can use PK_FACE_identify_blends to identify blends within a body. This function lets you specify a number of constraints to control the characteristics of the blend faces that are returned.

 

Note: PK_FACE_identify_blends can only identify constant radius blends with a rolling-ball cross section plane. However, the blends need not necessarily be specified as constant radius rolling-ball blends. For example, a B-surface, or even a variable radius rolling-ball blend, may be correctly identified if its radius only varies along the extent of the blend within a specified tolerance.

[back to top]

40.4.1 Calling PK_FACE_identify_blends

PK_FACE_identify_blends receives and returns the following arguments:

 

Received Description
n_faces
faces

The number of faces from which to search for blends, and the faces themselves.

ident_type

How to identify blends from the supplied faces . See Section 40.4.2, "Choosing how to identify blends" for more information.

options

A set of options.

Returned Description
results

A return structure containing details about the blend facesets identified from the supplied faces . This may include information about the radii and convexity of the blends. See Section 40.4.5, "Controlling returned information" for more information.

The PK_FACE_identify_blends_o_t options structure contains the following fields:

 

Option Description
limit_radii

Control which blends are returned based on their radii. See Section 40.4.3, "Identifying blends based on radius" for information. Default: Return all identified blends, regardless of size.

convexity

Control which blends are returned based on their convexity. See Section 40.4.4, "Identifying blends based on convexity" for information. Default: Return all identified blends, regardless of convexity.

tolerance

A tolerance. This is used when checking the constraints specified by limit_radii , and when classifying supplied faces as blends. Default: 1.0e-6.

want_radii

Whether to return the radius of each identified chain of blends. See Section 40.4.5, "Controlling returned information" for information. Default: PK_LOGICAL_false.

want_convexities

Whether to return the convexity of each identified chain of blends. See Section 40.4.5, "Controlling returned information" for information. Default: PK_LOGICAL_false.

[back to top]

40.4.2 Choosing how to identify blends

PK_FACE_identify_blends works by identifying and returning chains of connected blend faces. For each blend face in the supplied faces , PK_FACE_identify_blends can find other blend faces that are connected to it (whether or not they are in faces ).

In a chain of blends, a branch face is a blend face that splits the chain into two or more branches.

You use the ident_type argument of PK_FACE_identify_blends to control how chains of blends are returned, with respect to the branch faces in the chain and the supplied faces . This can take one of the following values:

 

Value Description

PK_blend_identify_within_c

Only return chains of blends that are contained in the supplied faces .

PK_blend_identify_exc_chain_c

Return a minimal chain of connected blends, excluding branch faces. This option looks for chains of blends starting from the supplied faces. If a branch face is identified outside the specified faces , the chain stops, and the branch face itself is not included in the returned blends.

Branch faces that lie in the supplied faces are returned.

PK_blend_identify_inc_chain_c

This is the same as PK_blend_identify_exc_chain_c, except that branch faces outside the specified faces are also included in the returned blends.

PK_blend_identify_max_chain_c

Return a maximal chain of blends. This option makes the chains as long as possible. If a branch face is identified, it is included in the returned blend faces, and the function continues the chain of blends along each branch.

PK_blend_identify_dependent_c

Return chains of blends that are not within the supplied faces , but are dependent on one or more of them. Dependent blends are identified recursively, so for instance blends that are dependent on blends that are dependent on the supplied faces are returned.

The difference between these values is illustrated in Figure 40-3. Note in particular the difference between PK_blend_identify_inc_chain_c, which returns branch faces that are not in the supplied faces , and PK_blend_identify_exc_chain_c, which only returns branch faces if they are in the supplied faces .

 

Figure 40-3 Choosing how to identify blends in the supplied set of faces

[back to top]

40.4.3 Identifying blends based on radius

PK_FACE_identify_blends contains powerful controls to let you control whether or not a given chain of blends is returned based on its radius. These controls are available in the limit_radii field of PK_FACE_identify_blends_o_t.

The limit_radii structure contains two elements:

When PK_FACE_identify_blends identifies a chain of blends, the radius of the blends in the chain is tested using the supplied interval and comparison . If the result of this comparison is true, then the chain of blends is returned by PK_FACE_identify_blends. If the result is false, then the chain of blends is not returned.

The comparison operations available are as follows:

 

Value Description

PK_comparison_always_c

Always return the blend chain, regardless of its radius.

PK_comparison_less_c

Return the blend chain if its radius is less than or equal to the low value.

PK_comparison_equal_c

Return the blend chain if its radius is equal to the low value.

PK_comparison_greater_c

Return the blend chain if its radius is greater than or equal to the high value.

PK_comparison_between_c

Return the blend chain if its radius is between or equal to the low value and the high value.

PK_comparison_outside_c

Return the blend chain if its radius is outside the specified range, i.e. it is greater than or equal to the high value, or less than or equal to the low value.

PK_comparison_never_c

Never return the blend chain, regardless of its radius.

 

Note: PK_FACE_identify_blends only finds blends with a constant radius. It cannot be used to identify any blend whose radius varies by more than the tolerance specified in the options structure.

[back to top]

40.4.4 Identifying blends based on convexity

You can use the convexity field in PK_FACE_identify_blends_o_t to ensure that only chains of blends with a particular convexity are returned. This can take the following values:

 

Value Description

PK_convexity_unset_c

Convexity not known

PK_convexity_arbitrary_c

Any convexity

PK_convexity_concave_c

Convex

PK_convexity_convex_c

Concave

[back to top]

40.4.5 Controlling returned information

You can control the information that PK_FACE_identify_blends returns using the want_radii and want_convexities fields in PK_FACE_identify_blends_o_t.

In each case, the information is returned in the PK_FACE_identify_blends_r_t return structure as an array parallel to the blend_facesets array.

[back to top]


40.5 Deleting facesets

You can use PK_FACE_delete_facesets to delete facesets from a body. These facesets 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 facesets to delete, together with an array of those facesets. 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 facesets that could not be deleted, together with indices into the facesets array indicating which facesets could not be deleted.

[back to top]

40.5.1 Options when deleting facesets

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 facesets 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 facesets. If PK_FACE_heal_no, wounds are not healed, and each deleted faceset is replace by a single rubber face. If any other value, only the specified heal_action will be attempted. See Section 14.2, "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 facesets you want to delete. If you know the detail type of each of the facesets 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 40.3.1, "Finding and returning detail types".

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

 

[back to top]

<<< Modeling Support Chapters Partitions and Rollback >>>