HPS::Exchange::ExportSTLOptionsKit

class HPS.Exchange.ExportSTLOptionsKit : public HPS.SprocketKit

The HPS.Exchange.ExportSTLOptionsKit class is a user space object. It contains settings controlling how STL data is exported via Exchange. Calling HPS.Exchange.ExportSTLOptionsKit.GetDefault() will return an options kit with values found in here.

Public Functions

override void Dispose ()
override bool Empty ()

Indicates whether this ExportSTLOptionsKit has any values set on it.

Return

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

bool Equals (HPS.Exchange.ExportSTLOptionsKit in_kit)

Check if the source ExportSTLOptionsKit is equivalent to this ExportSTLOptionsKit.

Param in_kit

The source ExportSTLOptionsKit to compare to this ExportSTLOptionsKit.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
ExportSTLOptionsKit ()

The default constructor creates an empty ExportSTLOptionsKit object.

ExportSTLOptionsKit (HPS.Exchange.ExportSTLOptionsKit in_kit)

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

Param in_kit

The source ExportSTLOptionsKit to copy.

override int GetHashCode ()
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.Exchange.ExportSTLOptionsKit in_kit)

Copies the source ExportSTLOptionsKit into this ExportSTLOptionsKit.

Param in_kit

The source ExportSTLOptionsKit to copy.

HPS.Exchange.ExportSTLOptionsKit SetBinary (bool in_state)

Sets whether to write STL data in binary form. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_bBinaryFile.

See

Default value

Param in_state

Whether to write STL data in binary form.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit SetCurrentTessellationRetention (bool in_state)

Sets whether to keep the current tessellation. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_bKeepCurrentTessellation.

See

Default value

Param in_state

Whether to keep the current tessellation.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit SetMaximumEdgeLength (double in_length)

Sets the maximum length of triangle edges in the tessellation generated for BRep data. This is only relevant if the tessellation level is set to Tessellation.Level.UserDefined. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_dMaximalTriangleEdgeLength.

See

Default value

Param in_length

The maximum length of triangle edges in the tessellation generated for BRep data. The value must be non-negative.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit SetTessellationAccuracy (HPS.Exchange.Tessellation.Accuracy in_type)

Sets the accuracy of the tessellation that will be generated for BRep data.

See

Default value

Param in_type

The accuracy to use for tessellation generation.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit SetTessellationLevel (HPS.Exchange.Tessellation.Chord.Limit in_limit_type, double in_limit, double in_angle_tolerance)

Sets the user defined quality of the tessellation that will be generated for BRep data using the standard or accurate tessellation algorithm. This implicitly sets A3DRWParamsExportStlData::m_eTessellationLevel to kA3DTessLODUserDefined.

Param in_limit_type

The type of the chord limit to be specified.

Param in_limit

Either the ratio of the tessellation chord height to the bounding box height which should be in the range [50, 10000], or the maximum distance between the surface definition and the tessellation approximation, depending on the preceding argument.

Param in_angle_tolerance

The maximum angle in degrees between two consecutive wire elements in the generated tessellation which should be in the range [10, 40]. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_dAngleToleranceDeg.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit SetTessellationLevel (HPS.Exchange.Tessellation.Level in_level)

Sets the predefined quality of the tessellation that will be generated for BRep data using the standard tessellation algorithm. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_eTessellationLevelOfDetail.

See

Default value

Param in_level

The predefined quality of the tessellation that will be generated for BRep data using the standard tessellation algorithm.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit SetUnits (HPS.Exchange.Units in_units)

Sets the units to associate with the STL export. This corresponds to the value that will be passed to A3DRWParamsExportStlData::m_eExportUnit. This function will result in a scale being applied to the exported model. The CADModel will NOT have a unit associated with it, since STL is a unit-less format. For example: exporting a cube with a 1mm side with Units set to Meter, will cause the side of the cube to shrink by a factor of 1000, since every unit in the file, which used to correspond to one mm, now corresponds to a meter. This is useful in the case where the STL file needs to be loaded in a scene alongside another model, so that the units of the two models can match.

See

Default value

Param in_units

The units to associate with the export. Passing Units.Unknown will preserve the original units.

Return

A reference to this ExportSTLOptionsKit.

void Show (out HPS.Exchange.ExportSTLOptionsKit out_kit)

Copies this ExportSTLOptionsKit into the given ExportSTLOptionsKit.

Param out_kit

The ExportSTLOptionsKit to populate with the contents of this ExportSTLOptionsKit.

bool ShowBinary (out bool out_state)

Shows the binary export setting.

Param out_state

Whether to write STL data in binary form.

Return

true if a binary export setting was specified, false otherwise.

bool ShowCurrentTessellationRetention (out bool out_state)

Shows the current tessellation retention setting.

Param out_state

Whether to keep the current tessellation.

Return

true if a current tessellation retention setting was specified, false otherwise.

bool ShowMaximumEdgeLength (out double out_length)

Shows the tessellation maximum edge length setting.

Param out_length

The tessellation maximum edge length setting.

Return

true if a tessellation maximum edge length setting was specified, false otherwise.

bool ShowTessellationAccuracy (out HPS.Exchange.Tessellation.Accuracy out_type)

Shows the tessellation accuracy setting.

Param out_type

The type of the tessellation accuracy which was specified.

Return

true if a tessellation accuracy setting was specified, false otherwise.

bool ShowTessellationLevel (out HPS.Exchange.Tessellation.Type out_type, out HPS.Exchange.Tessellation.Level out_level, out HPS.Exchange.Tessellation.Chord.Limit out_limit_type, out double out_limit, out double out_angle_tolerance)

Shows the tessellation level setting.

Param out_type

The type of the tessellation level setting which was specified.

Param out_level

The predefined quality of the tessellation that will be generated for BRep data using the standard tessellaiton algorithm. This is only valid if out_type is Tessellation.Type.Standard.

Param out_limit_type

The type of chord limit which was specified. This is only valid if out_type is Tessellation.Type.Custom.

Param out_limit

The chord limit to use to generate tessellation for BRep data. Its interpretation depends on the preceding argument. This is only valid if out_type is Tessellation.Type.Custom.

Param out_angle_tolerance

The maximum angle in degrees between two consecutive wire elements in the generated tessellation. This is only valid if out_type is Tessellation.Type.Custom.

Return

true if a tessellation level setting was specified, false otherwise.

bool ShowUnits (out HPS.Exchange.Units out_units)

Shows the binary export setting.

Param out_units

The units that will be associated with this export.

Return

true if a units export setting was specified, false otherwise.

HPS.Exchange.ExportSTLOptionsKit UnsetBinary ()

Removes the binary export setting.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit UnsetCurrentTessellationRetention ()

Removes the current tessellation retention setting.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit UnsetEverything ()

Removes all settings from this ExportSTLOptionsKit.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit UnsetMaximumEdgeLength ()

Removes the tessellation maximum edge length setting.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit UnsetTessellationAccuracy ()

Removes the tessellation accuracy setting.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit UnsetTessellationLevel ()

Removes the tessellation level setting.

Return

A reference to this ExportSTLOptionsKit.

HPS.Exchange.ExportSTLOptionsKit UnsetUnits ()

Removes the units export setting.

Return

A reference to this ExportSTLOptionsKit.

Public Static Functions

HPS.Exchange.ExportSTLOptionsKit GetDefault ()

Creates an ExportSTLOptionsKit 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. These values will be used for import unless an option is overridden by the options passed to File.ExportSTL.

Return

An ExportSTLOptionsKit with the default settings.

bool operator!= (HPS.Exchange.ExportSTLOptionsKit a, HPS.Exchange.ExportSTLOptionsKit b)
bool operator== (HPS.Exchange.ExportSTLOptionsKit a, HPS.Exchange.ExportSTLOptionsKit b)