KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > IProfiles
IProfiles Interface

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-section 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.

There is a close analogy between interface structure and DIStudio editors. Queering IStrip interface from ISection is equivalent to creating a cross-section strip, which is displayed in Cross-section View. Querying IElement from IStrip is equivalent to selecting a point or a segment in Cross-section View. In this terms, a call to the GetProfile method of IProfiles is equivalent to selection of the current profile which is displayed in Profile View of DIStudio. In DIStudio this selection can be changed using context menu of the Profile View or "Current Profile" combo box on Profile Page of the Form. By default Profile View displays profile number 0. 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:

KernelCAD -> 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-section) 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 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-section) 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.