DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Models > Entities > Attributes > Appearance Search Documentation


Appearance

Appearance is a dual purpose attribute. It defines rendering attributes for 0-dim geometries (points, vertices and sets of them). It is also the "base" for line style, which defines rendering attributes for 1-dim geometries (lines, curves, edges, wires and sets of them) and material (surfaces, faces, etc.).

Appearance can be accessed via IAppearance_DG Interface returned by IEntity_DG.GetAppearance(). Use IAppearance_DG.GetDimension() to determine the actual type of the appearance:

GetDimension() return Actual appearance type Interface to query
e0D Appearance IAppearance_DG
e1D Line Style ILineStyle_KC
e2D Material IMaterial

Appearance of mixed dimension compounds

IAppearance_DG.GetDimension() consides with the dimension returned by IGeometry_DG.GetDimension() called for geometry of the entity. An exception is the case of a compound shape with mixed dimension sub-shapes in a "BRep" geometry type. In the later case IGeometry_DG.GetDimension() returns eUd (unknown) and appearances for each dimension are stored in properties of the entity.

To access per dimension appearances for a mixed dimension compound, query IPropertyArray from IEntity_DG and use IPropertyArray.GetProperty(Property_name), where Property_name is:

Dimension of the sub-shape Property name Actual returned interface type
e0D "Appearance0D" IAppearance_DG
e1D "LineStyle" ILineStyle_KC
e2D "Material" IMaterial

And query the interface specifies in the above table from the returned object. See also IBRepCompundTest.MixedDimsTest_Apearance() in Samples\NET\C#\Tests\InterfaceTests sample project installed with the product.

IEntity_DG.GetAppearance() returns one of the per dimension appearances in the case. Which one, depends on the history of the entity. Use IAppearance_DG.GetDimension() to determine the case.