![]() |
Faceting Output Via GO |
<<< Facet Mesh Generation | Chapters | Tabular Output Of Faceting >>> |
This chapter describes the output of facet geometry through the Graphical Output (GO) interface. This is the output method used by PK_TOPOL_render_facet.
Note: This function offers partial support for topology that has facet geometry (meshes and plines). See the
PK Interface Programming Reference Manual for more information. |
There is further information on this method of graphical output in Chapter 4, “Graphical Output”, of the Parasolid Downward Interfaces Manual.
For an example of this faceting functionality, see the code example in the
C++\Code Examples\Application
Support\Rendering
folder, located in
example_applications
in your Parasolid installation folder
See Chapter 109, “Tabular Output Of Faceting”, for information on Parasolid’s alternative method of faceting: the tabular output of facet geometry.
Both methods of faceting can take advantage of the multi-threading capabilities of a processor, if SMP has been enabled in the Parasolid session:
go_interleaved
option. See the description of
go_interleaved
in Section 108.3, “PK_TOPOL_render_facet_go_o_t options” for more information on the benefits this can have.
smp
option. See Section 109.3, “Tabular faceting and threads”, for more information. See Chapter 114, “Symmetric Multi-Processing In Parasolid”, for more information about SMP.
The output of the facet mesh is controlled by the option structure PK_TOPOL_render_facet_o_t, which itself references two option structures:
The following sample code shows how to set up the default option settings, prior to calling PK_TOPOL_render_facet.
/* declaration and initialisation */ PK_TOPOL_render_facet_o_t my_render_option_struct; PK_TOPOL_render_facet_o_m (my_render_option_struct); /* set default mesh and GO options */ /* now set application-specific mesh options */ my_render_option_struct.control.<field1> = <value1>; my_render_option_struct.control.<field2> = <value2>; /* and set application-specific GO options */ my_render_option_struct.go_option.<field1> = <value1>; my_render_option_struct.go_option.<field2> = <value2>; /* ... now call PK_TOPOL_render_facet( ... ); */ |
PK_facet_go_normals_t controls whether facet normal data are calculated at facet vertices and output through GO. The possible settings are:
PK_facet_go_normals_no_c (default) |
|
PK_facet_go_parameters_t controls whether surface parameter data are calculated at facet vertices and output through GO. The possible settings are:
PK_facet_go_parameters_no_c (default) |
|
output surface parameters plus first derivative data at vertices |
|
output surface parameters plus first and second derivative data at vertices |
PK_facet_go_curvatures_t controls whether principal directions and curvatures of the face are output through GO. The possible settings are:
PK_facet_go_curvatures_no_c (default) |
do not output principal directions and curvatures of the face. |
output principal directions and curvatures of the face at facet vertices. |
PK_facet_go_edges_t controls whether edge entity values are output through GO. These allow the application to identify which facet edges (fins) lie on the boundary of a facet mesh and to associate them with an originating edge entity.
PK_facet_go_edges_no_c (default) |
|
PK_facet_go_strips_t controls whether facets are output individually through GO or as facet strips. The latter are a repeating sequence of connected triangular facets which are output through GO in terms of shared coordinates
The value of
max_facet_sides
in the facet mesh options structure is ignored when facet strips are output (facets are always triangular).
PK_facet_go_strips_no_c (default) |
|
Output facet strips. Requires |
PK_facet_go_interleaved_t controls whether facets are output from the GO on a body by body basis (that is, all the faces from one body are output, then all the faces from the next body, and so on), or whether faces from the total list of bodies output are interleaved (so that faces from different bodies may be output consecutively). Interleaving helps reduce the amount of facet data that is stored prior to outputting. Parasolid always outputs facets from a single face together, whether interleaving is used or not.
PK_facet_go_interleaved_no_c (default) |
|
If interleaving is used, and you need to keep track of the body with which a given face is associated, then you should use its occurrence number. For more information about occurrence numbers, see “Occurrence numbers” in Chapter 104, “Rendering Functions”.
If interleaving is used and multi-threading is enabled, then:
Note: If faceting concurrently, facets may be interleaved with facets from calls to PK_TOPOL_render_facet from other threads which are also faceting concurrently. |
Specifies the maximum number of facets that should be combined into a single facet strip. Default: 0.
Whether to split facet strips on periodic surfaces. See Section 109.4.5, “Options for outputting topological information”, for details.
Whether to ensure consistent parameter values on periodic surfaces. See Section 109.4.5, “Options for outputting topological information”, for details.
<<< Facet Mesh Generation | Chapters | Tabular Output Of Faceting >>> |