Clash Detection Of Bodies   

<<< Calculating Minimum And Maximum Distance Chapters Checking >>>

Contents

[back to top]


29.1 Introduction

You can use PK_TOPOL_clash to detect clashes between any combination of solids, sheets, and wire bodies. This function receives two sets of topologies, and returns any entities that are found to clash, together with (optionally) information about the nature of each clash.

For an example of this functionality, see the code example in the C++\Code Examples\Inquiries\Model Analysis\Clashing folder, located in example_applications in your Parasolid installation folder.

 

Note: This functionality offers partial support for facet geometry.See PK_TOPOL_clash for more information.

Options available with this clash detection function for controlling the output are:

 

Option

Description

find_all

If PK_LOGICAL_true, find all the clashes between the two topologies. If PK_LOGICAL_false, stop after the first clash. (Default: PK_LOGICAL_false)

find_intersect

If PK_LOGICAL_true, classify each clash between the two topologies, and return the information in the clash_types field of PK_TOPOL_clash_t. See Section 29.2, “Types of clash”, for more information. (Default: PK_LOGICAL_false)

mul_target_tf
mul_tool_tf

You can specify transforms to apply to the targets and tools supplied to PK_TOPOL_clash using the tf1 and tf2 arguments respectively. By default, a single transform is applied to either the targets (via tf1 ) or the tools (via tf2 ). By setting mul_target_tf or mul_tool_tf to PK_LOGICAL_true, you can supply an array of transforms to apply to either targets or tools, one transform for each target or tool supplied. (Default: PK_LOGICAL_false)

target_owner
tool_owner

In the case of face clashes, clash information returned by PK_TOPOL_clash is based on the interaction of the clashing faces. If you pass in the owning bodies of the target and tool using these options, then clash information returned is based on the interaction between these owning bodies instead. (Default: null)

 

Related Topics:

[back to top]


29.2 Types of clash

If find_intersect is PK_LOGICAL_true, PK_TOPOL_clash returns information that classifies each type of clash detected. This information is returned in the clash_type structure (PK_TOPOL_clash_type_t) of the clashes return structure.

Any clash can be classified as one of three types:

The precise meaning of each type of clash depends on the nature of the entities you are examining for clashes, as described in the rest of this section.

 

Note: When detecting clashes which involve vertices, no attempt is made to describe the type of clash.

29.2.1 Clashes in entities of the same dimension

When detecting clashes in entities of the same dimension, clash_type is classified according to the behaviour of the bounding topology of the entities.

For different types of entities, clash_type is as follows:

 

Value

Description

PK_TOPOL_clash_interfere

Two solid bodies interfere if they share a common volume.

Two faces interfere if they share a common area, or they intersect.

Two edges interfere if they share a common length, or they intersect.

PK_TOPOL_clash_abut_no_class

Two solid bodies abut when they touch, but do not share a common volume.

Two faces abut when they share a common curve or point in space which lies on the bounding topology of at least one of the faces.

Two edges abut when they share a common point in space which lies on the bounding topology of at least one of the edges.

PK_TOPOL_clash_a_in_b

PK_TOPOL_clash_b_in_a

For solids, faces, and edges, one entity is contained when it lies entirely inside the other entity, and their bounding topologies do not touch.

29.2.2 Clashes in bodies of different dimensions

As in the case for entities of the same dimension, when detecting clashes between bodies of different dimensions, clash_type is classified according to the behaviour of the bounding topology of the entities

 

Value

Description

PK_TOPOL_clash_interfere

If there is a common point in space that lies within the bounding topology of the two bodies, then the bodies are said to interfere.

PK_TOPOL_clash_abut_no_class

If no common point exists, but the bounding topologies of the two bodies touch, then the bodies are said to abut.

PK_TOPOL_clash_a_in_b

PK_TOPOL_clash_b_in_a

If one body lies entirely within the bounding topology of the other, and the bounding topology of the two bodies do not touch then the entity is contained.

29.2.3 Clashes in sheet bodies and wire bodies

Clash detection in sheet bodies and wire bodies is treated as a special case, since it does not depend solely on the interaction of the bounding topologies of the bodies in which you are looking for clashes.

Two sheet bodies only interfere if they actually cross each other (as shown in Figure 29-1(a)). Two sheet bodies that lie coincident within the same plane will abut ( Figure 29-1(b)).

 

Note: Sheet bodies behave differently to faces. For faces, Figure 29-1(b) would be classed as interference, rather than abutment.

 

Figure 29-1 Detecting clashes in sheet bodies

When two wire bodies clash, they are not classified, since any classification is meaningless. Instead, the clash_type is returned as PK_TOPOL_clash_exists for any wire body clashes.

[back to top]


29.3 Returned information

PK_TOPOL_clash returns any entities in the two sets of topologies that are found to clash. The types of those entities depends on both:

The following table shows what entities are returned if a clash exists.

 

Bodies being clashed

Entity for clash

Entity for containment

Solid body v Solid body

Faces

Bodies

Solid body v Sheet body

Faces

Bodies

Solid body v Wire body

Edges or faces

Bodies

Sheet body v Sheet body

Faces

Faces

Sheet body v Wire body

Edges

Bodies

Wire body v Wire body

Edges

Edges

The second column shows the entities that are returned if interference or abutment is detected. The third column shows the entities that are returned if one set of topologies is entirely contained by the other.

 

Note: When looking for clashes between bodies of different topological dimensions, the entity with the lowest possible dimension is returned first. When seeking clashes between solid and wire bodies, two types of entity may be returned:

  • First, PK_TOPOL_clash determines whether the wire body intersects or abuts any edges on the solid body, and returns those edges.
  • If this is not the case, PK_TOPOL_clash determines whether the wire body intersects or abuts any faces on the solid body, and returns those faces.
  • If this is not the case, PK_TOPOL_clash determines whether the wire body is contained by the solid body.

[back to top]


29.4 When clashes of faces can go undetected

Face clashes can go undetected in either of the following situations:

 

[back to top]

<<< Calculating Minimum And Maximum Distance Chapters Checking >>>