Home > User Guide > Graph Theory
Other Ways to Create Graphs
A method has also been added to return a subgraph that is a shortest path between two vertices in the same component of a graph. The shortest path from A to G in the following figure is the path (A, B, H, F, G).
For cycle vertices, a method has been added to return a subgraph that is a shortest cycle that contains the vertex. The shortest cycle of the graph in the following figure that contains C is the cycle (C, B, H, D, C).
Figure. Connectivity Graph
The following figure shows a blank body consisting of a block with two slots cut out of it and a tool body consisting of a cylinder that penetrates the block three times.
Figure. Blank and Tool Bodies
The first stage of the selective Booleans creates a non-regular unite of the two bodies and attaches cellular topology to the result (refer to the following figure). In addition, the connectivity graph (Figure. Connectivity Graph) of the resulting cells is returned and the vertices, or cells, of the graph are marked in a way that lets one know which body or bodies they came from.
Figure. Blank Body After the First Stage of Selective Booleans
Graphs may be copied by calling the copy method or created for an ENTITY_LIST of CELLs by calling api_create_graph_from_cells. Figure. Connectivity Graph is the graph that is created if the eight cells in Figure. Blank Body After the First Stage of Selective Booleans are sent to api_create_graph_from_cells.
The gvertex and gedge classes also have pointers for holding true or false information as to what kind of vertex or edge they are. The meaning of kind is left to the user. A vertex or edge may (or may not) be any number of kinds.
For example, the cells of the body in Figure. Blank Body After the First Stage of Selective Booleans may be marked as kind 0 (meaning being from the tool body) or kind 1 (meaning being from the blank body). Some cells may be of both kind 0 and kind 1.
The kind method of the class generic_graph returns a subgraph of all edges and vertices of, or not of, a given kind. The graph in Figure. Connectivity Graph is returned by the first stage of the selective Boolean on the bodies in Figure. Blank and Tool Bodies. The linear subgraph formed by the vertices (A, B, C, D, E, F, G) are from the tool body and marked as kind 0. The subgraph formed by the vertices (B, H, D, G) are from the blank body and are marked as kind 1.
The second stage of the selective Boolean engine takes the non-regular united body and a list or graph of cells. It returns a regularized body that is made up of the given cells or vertices of the graph (refer to the following figure).
Figure. Result of Picking C, G, and H to Keep
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.