Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.
interface CATIMmiTemporaryVisProperties
Interface to apply temporary graphic properties.
Role: This interface enables to overload temporarily the graphic attributes of a component,
and to visualize them in the 3D representation. This interface is implemented on 2D surface objects of
selection (subelements - implementing - of solid, surface and volume features). The permanent (i.e persistent) graphic attributes are the ones specified by CATIVisProperties interface.
Supplied graphic properties are the ones defined for CATVisGeomType 'CATVPMesh'.
In principle, overloading takes place inside a command. After using SetTemporaryVisProperties, calling ResetTemporaryVisProperties before the end of the command is mandatory. Permanent graphic attributes must be restored before switching to another command.
In both methods, 3D visualization refresh of the resulting graphic properties is included : do not send any refresh event by yourself. If temporary properties are applied to a surface, their visualization overrides the one of the persistent properties.
Using this interface will not make your document dirty : temporary properties cannot be saved ; they do not modify the persistent properties applied using CATIVisProperties.
public virtual ResetTemporaryVisProperties( | iGlobalReset | = FALSE) |
Role: Call this method on each object of selection for which temporary graphic properties
have been applied using SetTemporaryVisProperties. Be careful there must always be as many calls to
ResetTemporaryVisProperties as there have been to SetTemporaryVisProperties, whatever the iGlobalReset value.
S_OK
if temporary graphic properties had been applied on the corresponding surface subelements, and could be reset
E_FAIL
otherwise
public virtual SetTemporaryVisProperties( | iValues, | |
iPropertyType, | ||
iGeomType) |
Role: This method applies temporary graphic properties to an object, and refreshes 3D visualization with respect to
these properties.
To use this method, create an object of selection on the surface that is to modify (using the method in CATIMmiUseBRepDecodeServices). The surface cells matching the object of selection in the visualized geometry are computed, and their represented graphic properties are refreshed taking into account the temporary properties.
For example, to change a color :
int red, green, blue;
CATVisPropertiesValues color;
color.SetColor(red, green, blue);
object of selection -> SetTemporaryVisProperties(color, CATVPColor, CATVPMesh);
S_OK
if temporary graphic properties could be applied
E_INVALIDARG
: bad argument.
E_FAIL
otherwise.
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.