HPS::Exchange::ModelFileImportOptionsKit

class HPS.Exchange.ModelFileImportOptionsKit : public HPS.SprocketKit

The HPS.Exchange.ModelFileImportOptionsKit class is a user space object. It contains settings (potentially) controlling how data is imported via Exchange. This particular options kit is used when importing an A3DAsmModelFile directly (see Exchange.File.Import(void*,const ModelFileImportOptionsKit&)) and as such the options will only be used if the A3DAsmModelFile permits (e.g., tessellation options will only be used if tessellation needs to be generated and the A3DAsmModelFile has BRep data). Calling HPS.Exchange.ModelFileImportOptionsKit.GetDefault() will return an options kit with values found in here.

Public Functions

override void Dispose ()
override bool Empty ()

Indicates whether this ModelFileImportOptionsKit has any values set on it.

Return

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

bool Equals (HPS.Exchange.ModelFileImportOptionsKit in_kit)

Check if the source ModelFileImportOptionsKit is equivalent to this ModelFileImportOptionsKit.

Param in_kit

The source ModelFileImportOptionsKit to compare to this ModelFileImportOptionsKit.

Return

true if the objects are equivalent, false otherwise.

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

The default constructor creates an empty ModelFileImportOptionsKit object.

ModelFileImportOptionsKit (HPS.Exchange.ModelFileImportOptionsKit in_kit)

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

Param in_kit

The source ModelFileImportOptionsKit 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.Exchange.ModelFileImportOptionsKit in_kit)

Copies the source ModelFileImportOptionsKit into this ModelFileImportOptionsKit.

Param in_kit

The source ModelFileImportOptionsKit to copy.

HPS.Exchange.ModelFileImportOptionsKit SetAnnotationCaptureFitting (HPS.Exchange.AnnotationCaptureFitting in_fitting)

Sets the type of data that should be used to generate the camera for annotation captures.

Param in_fitting

The type of fitting to use for annotation captures.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetComputePreferredOpenShellOrientation (bool in_state)

This option lets you redirect the normal of non-solid bodies. eg: when a body is not able to be sewed closed it still has the notion of an inside and outside. the in_state will be passed to A3DSewOptionsData With this option, you are asking Exchange to use a predictive algorithm to correctly identify inside vs outside.

Param in_state

The state of the option used when importing a file

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetConfiguration (string in_configuration)

Sets the configuration to import from a CAD Model. This is only applicable to Catia V4, Solidworks and I-deas file formats. If no configuration is specified, the default configuration will be loaded if possible. This corresponds to the value that will be passed to A3DRWParamsMultiEntriesData::m_ppcEntries.

Param in_configuration

UTF8-encoded configuration name to import from a CAD file.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetConfiguration (string[] in_configuration)

Sets a nested configuration to import from a CAD Model. This is only applicable to Catia V4, Solidworks and I-deas file formats. If no configuration is specified, the default configuration will be loaded if possible. These correspond to the values that will be passed to A3DRWParamsMultiEntriesData::m_ppcEntries.

Param in_configuration

List of nested configuration names to import from a CAD file.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetGeometryDefaultColor (HPS.RGBAColor in_color)

Sets the color to use for non-PMI geometry in the CAD file if none is specified.

See

SetPMIDefaultColor

Param in_color

The color to use for non-PMI geometry in the CAD file if none is specified.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetHiddenObjects (bool in_state)

Sets whether we import the hidden objects from the CAD Model or not. The in_state will be passed to A3DRWParamsGeneralData::m_bReadHiddenObjects With this option, you are asking Exchange read the objects that are marked as hidden or graphics removed.

Param in_state

The state of the option used when importing a file

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetIFCEdges (bool in_state)

Sets whether to import edges for IFC files When this is set to false the import time will decrease. It is still possible to achieve visual fidelity by turning on hard edge visibility.

See

Default value

Param in_state

Whether to import edges for an IFC file.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetLocation (HPS.ComponentPath in_path)

Sets where to insert the imported file in an existing Component hieararchy. If this option is not set, a new CADModel will be created for the imported file. If this option is specified, the underlying PRC data of the existing CADModel will be modified to include the imported file and the data will be imported into the specified location in the existing Component hierarchy and its corresponding scene graph.

Param in_path

The path describing the location to insert the imported file into. This path must either terminate at a CADModel or a Component corresponding to an A3DAsmProductOccurrence. Note that if the imported file is added along a ComponentPath with attributes specified in the PRC data, the components added to the existing PRC data will also inherit those attributes. Note also that if the path is just a CADModel, a new A3DAsmModelFile underyling the CADModel must be created to include both the existing product occurrences and the new product occurrences. This new A3DAsmModelFile will be owned by the CADModel being imported into (see CADModel.GetEntityOwnership), but the existing A3DAsmModelFile will still need to be cleaned up via A3DAsmModelFileDelete since it was not owned by the CADModel.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetLocation (HPS.ComponentPath in_path, HPS.MatrixKit in_transform)

Sets where to insert the imported file in an existing Component hieararchy. If this option is not set, a new CADModel will be created for the imported file. If this option is specified, the underlying PRC data of the existing CADModel will be modified to include the imported file and the data will be imported into the specified location in the existing Component hierarchy and its corresponding scene graph.

Param in_path

The path describing the location to insert the imported file into. This path must either terminate at a CADModel or a Component corresponding to an A3DAsmProductOccurrence. Note that if the imported file is added along a ComponentPath with attributes specified in the PRC data, the components added to the existing PRC data will also inherit those attributes. Note also that if the path is just a CADModel, a new A3DAsmModelFile underyling the CADModel must be created to include both the existing product occurrences and the new product occurrences. This new A3DAsmModelFile will be owned by the CADModel being imported into (see CADModel.GetEntityOwnership), but the existing A3DAsmModelFile will still need to be cleaned up via A3DAsmModelFileDelete since it was not owned by the CADModel.

Param in_transform

A transform to apply to the components being added to the existing CADModel. This transform will also be added to the underlying PRC data. Defaults to an identity transform.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetNURBSConversion (HPS.Exchange.NURBSConversionOptionsKit in_nurbs_conversion_options)

Converts the curves and surfaces of the model file according to the options specified.

Param in_nurbs_conversion_options

The options to use during conversion

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetPMIFlipping (bool in_flip)

Dictates whether Visualize will flip pmi when rotating so that text / symbols remain readable.

Note

If exchange reports that a markup does not contain leader lines, but the tessellation does contain lines that markup will not be flipped. This is a precaution for models where the leader line geometry was included as part of the markup tessellation and flipping the geometry would cause any present leader lines to point in the wrong direction.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetSewingTolerance (double in_tolerance)

The sewing tolerance to use on the A3DAsmModelFile prior to generating the scene graph. If this option is set, prior to generating the scene graph, the A3DAsmModelFile will be passed to A3DAsmModelFileSew with this tolerance.

Param in_tolerance

The sewing tolerance to use on the A3DAsmModelFile.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit 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 ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetTessellationAccuracy (HPS.Exchange.Tessellation.Accuracy in_type, bool in_accurate_normals)

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.

Param in_accurate_normals

Whether to compute surface normals when performing accurate tessellation. This only applies if in_type is set different than Tessellation.Accuracy.Standard. This correspond to the (negated) value that will be passed to A3DRWParamsTessellationData::m_bDoNotComputeNormalsInAccurateTessellation.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetTessellationAccuracy (HPS.Exchange.Tessellation.Accuracy in_type, bool in_accurate_normals, bool in_accurate_surface_curvatures)

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.

Param in_accurate_normals

Whether to compute surface normals when performing accurate tessellation. This only applies if in_type is set different than Tessellation.Accuracy.Standard. This correspond to the (negated) value that will be passed to A3DRWParamsTessellationData::m_bDoNotComputeNormalsInAccurateTessellation.

Param in_accurate_surface_curvatures

Whether to take into account surfaces curvature in accurate tessellation to controle triangles elongation directions. This only applies if in_type is different than Tessellation.Accuracy.Standard. This correspond to the value that will be passed to A3DRWParamsTessellationData::m_bAccurateSurfaceCurvatures.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetTessellationAccuracy (HPS.Exchange.Tessellation.Accuracy in_type, bool in_accurate_normals, bool in_accurate_surface_curvatures, double accurate_grid_maximum_stitch_length)

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.

Param in_accurate_normals

Whether to compute surface normals when performing accurate tessellation. This only applies if in_type is set different than Tessellation.Accuracy.Standard. This correspond to the (negated) value that will be passed to A3DRWParamsTessellationData::m_bDoNotComputeNormalsInAccurateTessellation.

Param in_accurate_surface_curvatures

Whether to take into account surfaces curvature in accurate tessellation to controle triangles elongation directions. This only applies if in_type is different than Tessellation.Accuracy.Standard. This correspond to the value that will be passed to A3DRWParamsTessellationData::m_bAccurateSurfaceCurvatures.

Param accurate_grid_maximum_stitch_length

Maximal grid stitch length. Disabled if value is 0. Be careful, a too small value can generate a huge tessellation. This only applies if in_type is set to Tessellation.Accuracy.GridAccurate. This correspond to the value that will be passed to A3DRWParamsTessellationData::m_bAccurateTessellationWithGrid .

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetTessellationCleanup (bool in_cleanup)

Dictates whether Exchange tesselation data will be released from their parent representation items during import.

Warning

Setting this option to true will cause future exports to output without tessellation data.

Param in_cleanup

Whether to clean up tessellation data from representation items.

Return

A reference to this ImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit 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. This implicitly sets A3DRWParamsTessellationData::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 A3DRWParamsTessellationData::m_dAngleToleranceDeg.

Return

A reference to this ModelFileImportOptionsKit.

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

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

See

Default value

Param in_level

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

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetTessellationMaximumEdgeLength (double in_length)

Sets the maximum length of triangle edges in the tessellation generated for BRep data. This corresponds to the value that will be passed to A3DRWParamsTessellationData::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, and if set to 0.0, the length will not be used when generating the tessellation.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit SetTessellationPreservesUVPoints (bool in_state)

Sets whether to keep parametric points as texture coordinates when generating the tessellation for BRep data. This corresponds to the value that will be passed to A3DRWParamsTessellationData::m_bKeepUVPoints.

See

Default value

Param in_state

Whether to keep parametric points as texture coordinates when generating the tessellation for BRep data.

Return

A reference to this ModelFileImportOptionsKit.

void Show (out HPS.Exchange.ModelFileImportOptionsKit out_kit)

Copies this ModelFileImportOptionsKit into the given ModelFileImportOptionsKit.

Param out_kit

The ModelFileImportOptionsKit to populate with the contents of this ModelFileImportOptionsKit.

bool ShowAnnotationCaptureFitting (out HPS.Exchange.AnnotationCaptureFitting out_fitting)

Shows the annotation capture fitting setting.

Param out_fitting

The type of fitting to use for annotation captures.

Return

true if an annotation capture fitting setting was specified, false otherwise.

bool ShowComputePreferredOpenShellOrientation (out bool out_state)

Shows the compute preferred open shell orientation setting.

Param out_state

The compute preferred open shell orientation to use in the A3DSewOptionsData structure when importing a file.

Return

true if compute preferred open shell orientation setting was specified, false otherwise.

bool ShowConfiguration (out string[] out_configuration)
bool ShowGeometryDefaultColor (out HPS.RGBAColor out_color)

Shows the geometry default color setting.

Param out_color

The geometry default color setting.

Return

true if a geometry default color setting was specified, false otherwise.

bool ShowHiddenObjects (out bool out_state)

Shows the read hidden objects setting.

Param out_state

Whether to import hidden objects from the CAD model or not.

Return

true if the read hidden objects setting was specified, false otherwise.

bool ShowIFCEdges (out bool out_state)

Shows the IFC edges setting.

Param out_state

Whether to import edges for an IFC file.

Return

true if an IFC edge setting was specified, false otherwise.

bool ShowLocation (out HPS.ComponentPath out_path, out HPS.MatrixKit out_transform)

Shows the location setting.

Param out_path

The path describing the location to insert the imported file into.

Param out_transform

The transform to apply to the components being added to the existing CADModel.

Return

true if a location setting was specified, false otherwise.

bool ShowNURBSConversion (out HPS.Exchange.NURBSConversionOptionsKit out_nurbs_conversion_options)

Shows the NURBS conversion setting.

Param out_nurbs_conversion_options

The options to be used during the conversion.

Return

true if NURBS conversion setting was specified, false otherwise.

bool ShowPMIFlipping (out bool out_pmi_flipping)

Shows the pmi flipping setting.

Param out_pmi_flipping

The pmi flipping setting that was specified.

Return

true if a pmi flipping setting was specified, false otherwise.

bool ShowSewingTolerance (out double out_tolerance)

Shows the sewing tolerance setting.

Param out_tolerance

The sewing tolerance to use on the A3DAsmModelFile prior to generating the scene graph.

Return

true if a sewing tolerance setting was specified, false otherwise.

bool ShowTessellationAccuracy (out HPS.Exchange.Tessellation.Accuracy out_type, out bool out_accurate_normals, out bool out_accurate_surface_curvatures, out double out_accurate_grid_maximum_stitch_length)

Shows the tessellation accuracy setting.

Param out_type

The type of the tessellation accuracy which was specified.

Param out_accurate_normals

Whether to compute surface normals when performing accurate tessellation. This only applies if out_type is different than Tessellation.Accuracy.Standard.

Param out_accurate_surface_curvatures

Whether to take into account surfaces curvature in accurate tessellation to controle triangles elongation directions. This only applies if out_type is different than Tessellation.Accuracy.Standard.

Param out_accurate_grid_maximum_stitch_length

Maximal grid stitch length. Disabled if value is 0. Be careful, a too small value can generate a huge tessellation. This only applies if out_type is Tessellation.Accuracy.GridAccurate.

Return

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

bool ShowTessellationCleanup (out bool out_cleanup)

Shows the tessellation cleanup setting.

Param out_cleanup

The tesselation cleanup setting that was specified.

Return

true if a tessellation cleanup 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. 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 ShowTessellationMaximumEdgeLength (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 ShowTessellationPreservesUVPoints (out bool out_state)

Shows the tessellation UV preservation setting.

Param out_state

Whether to keep parametric points as texture coordinates when generating the tessellation for BRep data.

Return

true if a tessellation UV preservation setting was specified, false otherwise.

HPS.Exchange.ModelFileImportOptionsKit UnsetAnnotationCaptureFitting ()

Removes the annotation capture fitting setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetComputePreferredOpenShellOrientation ()

Removes the compute preferred open shell orientation setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetEverything ()

Removes all settings from this ModelFileImportOptionsKit.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetGeometryDefaultColor ()

Removes the geometry default color setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetHiddenObjects ()

Removes the read hidden objects setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetIFCEdges ()

Removes the IFC edges setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetLocation ()

Removes the location setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetNURBSConversion ()

Removes the NURBS conversion setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetPMIFlipping ()

Removes the pmi flipping setting.

Return

A reference to this ImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetSewingTolerance ()

Removes the sewing tolerance setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetTessellationAccuracy ()

Removes the tessellation accuracy setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetTessellationCleanup ()

Removes the tessellation cleanup setting.

Return

A reference to this ImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetTessellationLevel ()

Removes the tessellation level setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetTessellationMaximumEdgeLength ()

Removes the tessellation maximum edge length setting.

Return

A reference to this ModelFileImportOptionsKit.

HPS.Exchange.ModelFileImportOptionsKit UnsetTessellationPreservesUVPoints ()

Removes the tessellation UV preservation setting.

Return

A reference to this ModelFileImportOptionsKit.

Public Static Functions

HPS.Exchange.ModelFileImportOptionsKit GetDefault ()

Creates an ModelFileImportOptionsKit 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.Import(void*,const ModelFileImportOptionsKit&).

Return

A ModelFileImportOptionsKit with the default settings.

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