3D Visualization (3DV)

Rendering Configurations

Rendering Configurations are used to define alternate rendering properties (color, transparency) to apply to 3D geometry in the Dynamic or Streaming Viewer. The intent is to isolate/highlight certain 3D components or represent some aspect of related Items using color to differentiate from other 3D components. Each of these Rendering Configurations are accessible in the Dynamic or Streaming Viewer via the View Modes dropdown on the viewer toolbar.

The above figure shows sample View Modes created by the inclusion of Rendering Configurations (see code related to #5 in Section Processing Query Results). The top diagram shows the 3D geometry rendered using the default colors as defined when the CAD data was imported. The diagram on the lower left shows a View Mode that applies alternate colors to all 3D Components associated with Parts that have a cost greater than $60. The diagram on the lower right shows a View Mode that renders parts in Coral that are manufactured and light Green that are purchased. Note the use of transparency (Opacity) in each example.

Each of the bottom two examples were created using two Rendering Configurations with a ‘Name’ that is displayed as a View Mode in the 3D Dynamic or Streaming Viewer. When creating Rendering Configurations, the name is what distinguishes them. There can be multiple Rendering Configurations added to the same set of Product Occurrences; each must have a unique Name.

The following code snippet shows an example of creating the Rendering Configuration shown in the bottom right above:

ProductOccurrenceRenderingConfiguration rConfigMakeBuy = new

ProductOccurrenceRenderingConfiguration();

rConfigMakeBuy.SetColor(c.isManufactured() ? Color.LightCoral :

Color.LightSeaGreen);

rConfigMakeBuy.Opacity = .5;

rConfigMakeBuy.Name = “Make / Buy";

poInst.RenderingConfigurations.Add(rConfigMakeBuy);

Rendering Configurations are defined using the ProductOccurrenceRenderingConfiguration class and are added to each Product Occurrence Instance.

Note
It is required that all Product Occurrence Instance objects have a Rendering Configuration object added if View Modes are going to be used within a Query Processor.

Each unique View Mode must use the same string name value for the Name Property. Thus, a View Mode represents the collection of all Rendering Configuration Objects with the associated Name.

  1. A Rendering Configuration Object is created.
  2. Logic included in the Data Model Object determines whether the associated CAD Item is related to a manufactured Part. Note that when constructing Query Definitions for a Query Processor, additional Properties may be needed to be used solely for Rendering Configurations (View Modes).

    The default color is black, and the default opacity is 0 (completely hidden). As mentioned, it is important to add a Rendering Configuration to each Instance to prevent default settings from applying.

Note
Use of 0 transparency does not prevent parts from being selected in the viewer. If an Opacity property is set to 0, the geometry will still be loaded, and it will be selectable even though the geometry isn’t shown.

  1. A unique Name is applied. It will be same for all Product Occurrences returned for the View Data.
  2. The Rendering Configuration object is added to the Product Occurrence Instance object.