DGKC Control Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > Models > Entities > Attributes > Appearance Go to ActiveX docs 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_DG
e2D Material IMaterial_DG

Appearance of mixed dimension compounds

IAppearance_DG.GetDimension() coincides 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, obtain extended properties via IEntity_DG.GetExtendedProperties() and use IDictionary_DG.GetInterface(Property_name), where Property_name is:

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

And query the interface specified 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.

See also: Material