Faceting Output Via GO   

<<< Facet Mesh Generation Chapters Tabular Output Of Faceting >>>

Contents

[back to top]


108.1 Introduction

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:

See Chapter 114, “Symmetric Multi-Processing In Parasolid”, for more information about SMP.

 

Related Topics:

[back to top]


108.2 Output through GO

The output of the facet mesh is controlled by the option structure PK_TOPOL_render_facet_o_t, which itself references two option structures:

Example:

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( ... ); */
 

[back to top]


108.3 PK_TOPOL_render_facet_go_o_t options

108.3.1 go_normals

PK_facet_go_normals_t controls whether facet normal data are calculated at facet vertices and output through GO. The possible settings are:

 

Value

Description

PK_facet_go_normals_no_c (default)

do not output surface normals

PK_facet_go_normals_yes_c

output surface normals

108.3.2 go_parameters

PK_facet_go_parameters_t controls whether surface parameter data are calculated at facet vertices and output through GO. The possible settings are:

 

Value

Description

PK_facet_go_parameters_no_c (default)

do not output surface parameter data

PK_facet_go_parameters_d0_c

output surface parameters at vertices

PK_facet_go_parameters_d1_c

output surface parameters plus first derivative data at vertices

PK_facet_go_parameters_d2_c

output surface parameters plus first and second derivative data at vertices

108.3.3 go_curvatures

PK_facet_go_curvatures_t controls whether principal directions and curvatures of the face are output through GO. The possible settings are:

 

Value

Description

PK_facet_go_curvatures_no_c (default)

do not output principal directions and curvatures of the face.

PK_facet_go_curvatures_yes_c

output principal directions and curvatures of the face at facet vertices.

108.3.4 go_edges

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.

 

Value

Description

PK_facet_go_edges_no_c (default)

do not output edge data

PK_facet_go_edges_yes_c

output edge entities at facet edges

108.3.5 go_strips

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).

 

Value

Description

PK_facet_go_strips_no_c (default)

Do not output facet strips.

PK_facet_go_strips_yes_c

Output facet strips. Requires go_max_facets_per_strip to be >1

108.3.6 go_interleaved

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.

 

Value

Description

PK_facet_go_interleaved_no_c (default)

Output faces on a body by body basis.

PK_facet_go_interleaved_yes_c

Output faces on an interleaved basis.

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.

108.3.7 go_max_facets_per_strip

Specifies the maximum number of facets that should be combined into a single facet strip. Default: 0.

108.3.8 split_strips

Whether to split facet strips on periodic surfaces. See Section 109.4.5, “Options for outputting topological information”, for details.

108.3.9 consistent_parms

Whether to ensure consistent parameter values on periodic surfaces. See Section 109.4.5, “Options for outputting topological information”, for details.

[back to top]

<<< Facet Mesh Generation Chapters Tabular Output Of Faceting >>>