DG Kernel Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > Deprecated > Deprecated API Reference > Model > Section > 3DS > IProfiles Search Documentation


IProfiles Interface

GetProfile

GetNamedProfile

IProfiles interface is implemented by 3D elements of Generic 3D Objects, namely by surface patches and 3D curves.  IProfiles gives access to the geometry of 3D elements in axial direction. Every 3D element has a set of parameters, which is managed by the IElement interface. For example, a 3D curve has two parameters, which are correspondent to x and y coordinates of the cross-entity point at the current z cross position. Plot of x coordinate versus cross position z is called Profile. The IProfiles interface manages collection of profiles for the selected 3D element.

Profiles and their names for every type of element are listed in Geometric Elements.

IProfiles can be obtained with query or cast from an IElement interface implemented by an element of a Generic 3D Object surface strip. The path to the interface is:

DG Kernel -> IModel-> ISection -> IStrip -> IElement-> IProfiles. 

See also Interface List

 


HRESULT GetProfile( int id, IStrip **ppIStrip)

Parameters

id - [in] zero-based index of the profile.

ppIStrip - [out] pointer to a variable that will receive the IStrip pointer. 

Return Values:

S_OK in case of success
 
DISP_E_BADINDEX - if id is greater than or equal to the number of parameters.
 
Remarks
 
This method returns the strip representing id-th component of the compound element which implements the interface. Information about range of index and correspondent names can be retrieved from the parent IElement interface, where this interface was queried from. For example, if this interface was queried from IElement implemented by a 3D curve (point in cross-entity) than after a call GetProfile(0, (void**)pIStrip) pIStrip will represent projection of the curve to the (x, z) plane. Values of the profile for different points can be obtained using IStrip methods of pIStrip and GetParam method called for elements of pIStrip.
 

HRESULT GetNamedProfile(char* szParamName, IStrip **ppIStrip)

Parameters:

szParamName - [in] - pointer to a string containing the parameter name.

ppIStrip - [out] pointer to a variable, which will receive the IStrip reference. 

Return Values:

S_OK in case of success

DISP_E_PARAMNOTOPTIONAL - if szParamName is NULL.

DISP_E_UNKNOWNNAME - In case there is no parameter with this name.

Remarks:

This method returns IStrip pointer to the interface implemented by profile, which represents the named component of the compound element. Information about range of index and correspondent names can be retrieved from the parent IElement interface, where this interface was queried from. For example, if this interface was queried from IElement implemented by a 3D curve (point in cross-entity) than after a call GetProfile("Component0", (void**)pIStrip) pIStrip will represent projection of the curve to the (x, z) plane. Values of the profile for different points can be obtained using IStrip methods of pIStrip and GetParam method called for elements of pIStrip.