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 Models > Import/Export > Adanced Data Exchange > ISTLDataContext Interface
ISTLDataContext Interface

ISTLDataContext Interface

SetBinary
SetSeparateObjects
SetCreaseAngle
SetBuildTree
SetAnalysisType

ISTLDataContext is the base interface for setting different options for import/export of STL files.  Reference to this interface is used in various Save/Load methods. The set of options accessed by this interface is kept by the model object normally for the lifetime of the application.

ISTLDataContext can be queried from IModel or IModelEx interfaces

ISTLDataContext is available only in componets of KernelCAD Enterprise product

See also Interface List


HRESULT SetBinary( VARIANT_BOOL binary )

Parameters

binary - [in] - If true the solid will be saved in binary STL format.

Returns

S_OK in case of success.
Remarks:

The property has effect only during saving STL files. If binary is true the file will be saved in binary STL format. The default for this property is true.


HRESULT SetSeparateObjects( VARIANT_BOOL separate )

Parameters

separate - [in] Separate solids during load/save STL file operation.  

Return Values

S_OK in case of success.
Remarks:

By default during the load of an STL file the component analyses the loaded mesh and separates linked meshes as different objects. Set this property to false to improve performance. 

This property should also be set to true when saving or loading is performed to/from an STL Data Directory. In this case each STL file will be stored or loaded into/from different object in the model.

This property is ignored when surface analysis is disabled with a call to SetAnalysisType((int)ESTLAnalysis.eStlAnalysSkip) or if analysis type was set to auto with SetAnalysisType((int)ESTLAnalysis.eStlAnalysAuto) and the model was very large.


HRESULT SetCreaseAngle( double degrees )

Parameters

degrees - [in] Crease angle in degrees. See remarks

Return Values

S_OK in case of success.
Remarks:

This property has any effect only during load of an STL file. Crease angle is used to determine how to handle normals during the load.  When two adjoined faces have angle more than the crease angle two separate normals will be created one for each face. In the latter case edge between the face will look sharp. Set this property to a higher value to make the surface appear smooth.  The default value is 0.0.


HRESULT SetBuildTree( VARIANT_BOOL build )

Parameters

build - [in] Indicates whether to build the STL directory tree or save all objects as a flat set of STL files Default: true

Return Values

S_OK in case of success.
 
Remarks:

If the method is called with build set to false, during the next relevant saving operation the STL directory will not be created. Instead all object will be saved in a single folder.  It also would mean that any next relevant loading operation will load only files from the requested folder, not from its subdirectories, and all the objects will be made top-level objects of the model and will not have any children.


HRESULT SetAnalysisType( int type )

Parameters

type - [in] Member of ESTLAnalysis enumeration. Determines whether the surface analysis will be performed during the import

Remarks:

The method is relevant to STL load only and does not affect saving to STL. The method determines whether the surface analysis will be performed during the import. It is provided to allow faster load of very large files. The analysis separates objects which are geometrically isolated in the surface if the separation was enabled with SetSeparateObjects and recalculates normals to the surface to make the surface smooth instead of the faceted appearance common for STL models. When type is eStlAnalysAuto (value 0, default) the analysis is performed depending on size of the STL file to reduce load time when the file is large or to improve quality of the surface. The other two options force to perform improvement of the surface: eStlAnalysPerform (value 1) or skipping the analysis: eStlAnalysSkip (value 2). When analysis is not performed separation of objects is not performed either irrespectively of values set with SetSeparateObjects