STL

class HPS.STL : public IDisposable

The STL class contains objects and enumerations used for importing STL files.

Public Functions

void Dispose ()
STL (HPS.STL in_that)
class File : public IDisposable

The File class provides functions to import and export STL files.

Public Functions

void Dispose ()
File (HPS.STL.File in_that)

Public Static Functions

HPS.STL.ImportNotifier Import (string in_file_name, HPS.STL.ImportOptionsKit in_options)

Performs an asynchronous import of the specified STL file with the provided options. May throw an IOException prior to starting the asynchronous import.

Param in_file_name

Name of STL file to import.

Param in_options

Options controlling the import of the STL file (e.g., segment to import into).

Return

An ImportNotfier object that can be used to query the import progress and status.

class ImportNotifier : public HPS.IONotifier

The ImportNotifier class is a smart-pointer that is associated with an asynchronous file import. It is used to interact with an ongoing import or get the results from a completed import.

Public Functions

void Assign (HPS.STL.ImportNotifier in_that)

Associate this ImportNotifier with the same file import as the source ImportNotifier.

Param in_that

The source ImportNotifier for the assignment.

override void Dispose ()
HPS.STL.ImportResultsKit GetResults ()

Get the ImportResultsKit for the file import. Throws an IOException if the import is not complete or was not successful.

Return

The ImportResultsKit for a successful file import.

ImportNotifier ()

The default constructor creates an ImportNotifier object which is not associated with any file import.

ImportNotifier (HPS.IONotifier in_that)

The conversion constructor creates a new derived ImportNotifier object from a base IONotifier object. The copy will only be successful if the source notifier is really an upcast of this notifier type. Otherwise the copy will fail and the resulting ImportNotifier will be invalid.

Param in_that

The source IONotifier to copy.

ImportNotifier (HPS.STL.ImportNotifier in_that)

The copy constructor creates a new ImportNotifier object that is associated with the same file import as the source ImportNotifier.

Param in_that

The source ImportNotifier to copy.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

class ImportOptionsKit : public HPS.Kit

The ImportOptionsKit class contains any settings controlling the import of STL files.

Public Functions

override void Dispose ()
override bool Empty ()

Indicates whether this ImportOptionsKit has any values set on it.

Return

true if no values are set on this ImportOptionsKit, false otherwise.

bool Equals (HPS.STL.ImportOptionsKit in_kit)

Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.

Param in_kit

The source ImportOptionsKit to compare to this ImportOptionsKit.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
override int GetHashCode ()
ImportOptionsKit ()

The default constructor creates an empty ImportOptionsKit object.

ImportOptionsKit (HPS.STL.ImportOptionsKit in_kit)

The copy constructor creates a new ImportOptionsKit object that contains the same settings as the source ImportOptionsKit.

Param in_kit

The source ImportOptionsKit to copy.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

void Set (HPS.STL.ImportOptionsKit in_kit)

Copies the source ImportOptionsKit into this ImportOptionsKit.

Param in_kit

The source ImportOptionsKit to copy.

HPS.STL.ImportOptionsKit SetOptimization (bool in_state, HPS.ShellOptimizationOptionsKit in_optimization_kit)

Sets the options for the optimization performed on the shells created as a result of this import. Turning off optimization generally results in slightly faster load times and better visual fidelity, but has the downside of impacting performance. Turning optimization on increases the load time at the expense of visual fidelity but increases performance, based on the options chosen. The tolerances set as part of the optimization kit are particularly responsible for downgrading the visual fidelity. Supplying an empty optimization kit will disable optimization.

Param in_state

Whether the optimization should be enabled.

Param in_optimization_kit

The optimization options for this import

Return

A reference to this ImportOptionsKit.

HPS.STL.ImportOptionsKit SetOptimization (HPS.ShellOptimizationOptionsKit in_optimization_kit)

Sets the options for the optimization performed on the shells created as a result of this import. Turning off optimization generally results in slightly faster load times and better visual fidelity, but has the downside of impacting performance. Turning optimization on increases the load time at the expense of visual fidelity but increases performance, based on the options chosen. The tolerances set as part of the optimization kit are particularly responsible for downgrading the visual fidelity. Supplying an empty optimization kit will disable optimization.

Param in_optimization_kit

The optimization options for this import

Return

A reference to this ImportOptionsKit.

HPS.STL.ImportOptionsKit SetSegment (HPS.SegmentKey in_segment)

Sets the root segment where the STL data will be imported into. If no segment is specified, a root segment will be created for this purpose during import.

Param in_segment

Segment the STL data will be imported into.

Return

A reference to this ImportOptionsKit.

void Show (out HPS.STL.ImportOptionsKit out_kit)

Copies this ImportOptionsKit into the given ImportOptionsKit.

Param out_kit

The ImportOptionsKit to populate with the contents of this ImportOptionsKit.

bool ShowOptimization (out bool out_state, out HPS.ShellOptimizationOptionsKit out_optimization_options)

Shows the optimization options for this import

Param out_state

Whether optimization is enabled.

Param out_optimization_options

Optimization options for this import.

Return

true if optimization options were specified, false otherwise.

bool ShowSegment (out HPS.SegmentKey out_segment)

Shows the root segment where the STL data will be imported into.

Param out_segment

Segment the STL data will be imported into.

Return

true if a root segment was specified, false otherwise.

HPS.STL.ImportOptionsKit UnsetEverything ()

Removes all settings from this ImportOptionsKit.

Return

A reference to this ImportOptionsKit.

HPS.STL.ImportOptionsKit UnsetOptimization ()

Removes the optimization options for this import

Return

A reference to this ImportOptionsKit.

HPS.STL.ImportOptionsKit UnsetSegment ()

Removes the root segment specifying where the STL data will be imported into.

Return

A reference to this ImportOptionsKit.

Public Static Functions

HPS.STL.ImportOptionsKit GetDefault ()

Creates an ImportOptionsKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.

Return

An ImportOptionsKit with the default settings.

bool operator!= (HPS.STL.ImportOptionsKit a, HPS.STL.ImportOptionsKit b)
bool operator== (HPS.STL.ImportOptionsKit a, HPS.STL.ImportOptionsKit b)
class ImportResultsKit : public HPS.Kit

The ImportResultsKit class contains the results of a successful STL import.

Public Functions

override void Dispose ()
override bool Empty ()

Indicates whether this ImportResultsKit has any values set on it.

Return

true if no values are set on this ImportResultsKit, false otherwise.

bool Equals (HPS.STL.ImportResultsKit in_kit)

Check if the source ImportResultsKit is equivalent to this ImportResultsKit.

Param in_kit

The source ImportResultsKit to compare to this ImportResultsKit.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
override int GetHashCode ()
ImportResultsKit ()

The default constructor creates an empty ImportResultsKit object.

ImportResultsKit (HPS.STL.ImportResultsKit in_kit)

The copy constructor creates a new ImportResultsKit object that contains the same settings as the source ImportResultsKit.

Param in_kit

The source ImportResultsKit to copy.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

void Set (HPS.STL.ImportResultsKit in_kit)

Copies the source ImportResultsKit into this ImportResultsKit.

Param in_kit

The source ImportResultsKit to copy.

HPS.STL.ImportResultsKit SetSegment (HPS.SegmentKey in_segment)

Sets the root segment which the OBJ data was imported into. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Param in_segment

Segment the OBJ data was imported into.

Return

A reference to this ImportResultsKit.

void Show (out HPS.STL.ImportResultsKit out_kit)

Copies this ImportResultsKit into the given ImportResultsKit.

Param out_kit

The ImportResultsKit to populate with the contents of this ImportResultsKit.

bool ShowSegment (out HPS.SegmentKey out_segment)

Shows the root segment which the OBJ data was imported into. This was either the root segment specified by the user in the ImportOptionsKit passed to OBJ.File.Import, or the root segment that was created for this purpose during import.

Param out_segment

Segment the OBJ data was imported into.

Return

true if a root segment was specified, false otherwise.

HPS.STL.ImportResultsKit UnsetEverything ()

Removes all settings from this ImportResultsKit.

Return

A reference to this ImportResultsKit.

HPS.STL.ImportResultsKit UnsetSegment ()

Removes the root segment which the OBJ data was imported into. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Return

A reference to this ImportResultsKit.

Public Static Functions

bool operator!= (HPS.STL.ImportResultsKit a, HPS.STL.ImportResultsKit b)
bool operator== (HPS.STL.ImportResultsKit a, HPS.STL.ImportResultsKit b)