Parasolid
-
class
Parasolid
The Parasolid class contains objects and enumerations used for importing and exporting CAD files via Parasolid.
Public Types
-
enum class
CompoundBodyBehavior
Enumerates the behaviors the Parasolid importer can assume when encountering compound bodies.
Values:
-
enumerator
Split
Split compound bodies into simple bodies.
-
enumerator
Keep
Import compound bodies as-is.
-
enumerator
Fail
Fail when encountering a compound body.
-
enumerator
-
enum class
Ignore
Enumerates the way the Parasolid importer chooses which facets or lines to ignore during tessellation. Corresponds to the PK_face_ignore_t struct.
Values:
-
enumerator
Absolute
specify an absolute value
-
enumerator
FeatureToModelRatio
specify ratio of feature to model box
-
enumerator
FeatureToBodyRatio
specify ratio of feature to body box
-
enumerator
-
enum class
MismatchBehavior
Enumerates the behaviors the Parasolid importer can assume when encountering attribute mismatches.
Values:
-
enumerator
Ignore
Ignore attribute mismatches.
-
enumerator
Fail
Fail on attribute mismatch.
-
enumerator
-
typedef int
ParasolidEntity
-
enum class
TessellationLevel
Enumerates predefined tessellation levels used to import Parasolid files.
Values:
-
enumerator
ExtraLow
Extra Low tessellation setting.
-
enumerator
Low
Low tessellation setting.
-
enumerator
Medium
Medium tessellation setting.
-
enumerator
High
High tessellation setting.
-
enumerator
ExtraHigh
Extra High tessellation setting.
-
enumerator
Custom
Custom tessellation setting. Chord and Angle values will need to be specified.
-
enumerator
-
class
CADModel
: public HPS::CADModel The CADModel class is a smart pointer. It is an abstract concept symbolizing the root of the Parasolid import. It is not related to any Parasolid object.
Public Functions
-
Component
AddEntity
(ParasolidEntity in_entity_to_add, FacetTessellationKit const &in_facet_tessellation, LineTessellationKit const &in_line_tessellation, Component const &in_owner = Component()) Renders the entity specified, according to the tessellation options provided. Only entities of type PK_CLASS_assembly and PK_CLASS_body can be used with this function.
Parameters: - in_entity_to_add – The Parasolid entity to import into HPS.
- in_facet_tessellation – The facet tessellation parameters used during import.
- in_line_tessellation – The line tessellation parameters used during import.
- in_owner – The component owning which will own the imported entity
Returns: The component created as part of the import of the provided entity.
-
CADModel
() The default constructor creates an uninitialized CADModel object. The Type() function will return Type::None.
-
CADModel
(Component const &in_that) This constructor creates a CADModel object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of a Parasolid::CADModel object. Otherwise the copy will fail and the resulting Parasolid::CADModel will be invalid.
Parameters: in_that – The source Component to copy.
-
CADModel
(HPS::CADModel const &in_that) This constructor creates a Parasolid::CADModel object that shares the underlying smart-pointer of the source HPS::CADModel. The copy will only be successful if the source component is really an upcast of a Parasolid::CADModel object. Otherwise the copy will fail and the resulting Parasolid::CADModel will be invalid.
Parameters: in_that – The source HPS::CADModel to copy.
-
CADModel
(Parasolid::CADModel &&in_that) The move constructor creates a Parasolid::CADModel by transferring the underlying object of the rvalue reference to this Parasolid::CADModel.
Parameters: in_that – An rvalue reference to a Parasolid::CADModel to take the underlying object from.
-
CADModel
(Parasolid::CADModel const &in_that) The copy constructor creates a Parasolid::CADModel object that shares the underlying smart-pointer of the source Parasolid::CADModel.
Parameters: in_that – The source Parasolid::CADModel to copy.
-
Component
GetComponentFromEntity
(ParasolidEntity in_entity) Returns the Component associated with the provided entity.
Parameters: in_entity – The Parasolid entity for which to return a Component. Returns: The component associated with the passed in entity, or an empty component if no component is associated with in_entity.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
CADModel &
operator=
(Parasolid::CADModel &&in_that) The move assignment operator transfers the underlying object of the rvalue reference to this Parasolid::CADModel.
Parameters: in_that – An rvalue reference to a Parasolid::CADModel to take the underlying object from. Returns: A reference to this Parasolid::CADModel.
-
void
Tessellate
(Parasolid::FacetTessellationKit const &in_facet_options, Parasolid::LineTessellationKit const &in_line_options) Re-tessellate the given CADModel with the provided options.
Parameters:
-
virtual
~CADModel
()
-
Component
-
class
Component
: public HPS::Component The Component class is a smart pointer. It represents a variety of Parasolid components. The primary purpose of this class is simply to provide access to the underlying ParasolidEntity object for use by Parasolid library functions.
Public Functions
-
bool
AddTransform
(MatrixKit const &in_transform) Appends a transform to the underlying Parasolid data associated with this component. Only components of type ParasolidAssembly, ParasolidInstance and ParasolidTopoBody can have transforms applied to them. Additionally, only transformations which are rigid motions can be applied. Calling AddTransform with a transform which is not a rigid motion, such as a shear, will cause the function to fail.
Parameters: in_transform – The transform to apply to this component. Returns: true if transform was applied correctly, false otherwise.
-
Component
() The default constructor creates an uninitialized Parasolid::Component object. The Type() function will return Type::None.
-
Component
(HPS::Component const &in_that) This constructor creates an Parasolid::Component object that shares the underlying smart-pointer of the source Component. The copy will only be successful if the source component is really an upcast of a Parasolid::Component object. Otherwise the copy will fail and the resulting Parasolid::Component will be invalid.
Parameters: in_that – The source Component to copy.
-
Component
(Parasolid::Component &&in_that) The move constructor creates a Parasolid::Component by transferring the underlying object of the rvalue reference to this Parasolid::Component.
Parameters: in_that – An rvalue reference to an Parasolid::Component to take the underlying object from.
-
Component
(Parasolid::Component const &in_that) The copy constructor creates an Parasolid::Component object that shares the underlying smart-pointer of the source Parasolid::Component.
Parameters: in_that – The source Parasolid::Component to copy.
-
ParasolidEntity
GetParasolidEntity
() const Gets the ParasolidEntity object corresponding to this Parasolid Component.
Returns: The ParasolidEntity object corresponding to this Parasolid Component.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
Component &
operator=
(Parasolid::Component &&in_that) The move assignment operator transfers the underlying object of the rvalue reference to this Parasolid::Component.
Parameters: in_that – An rvalue reference to a Parasolid::Component to take the underlying object from. Returns: A reference to this Parasolid::Component.
-
bool
SetTransform
(MatrixKit const &in_transform) Applies a transform to the underlying Parasolid data associated with this component, replacing any transform currently set on it. Only components of type ParasolidAssembly, ParasolidInstance and ParasolidTopoBody can have transforms applied to them. Additionally, only transformations which are rigid motions can be applied. Calling SetTransform with a transform which is not a rigid motion, such as a shear, will cause the function to fail.
Parameters: in_transform – The transform to apply to this component. Returns: true if transform was applied correctly, false otherwise.
-
void
Tessellate
(Parasolid::FacetTessellationKit const &in_facet_options, Parasolid::LineTessellationKit const &in_line_options) Re-tessellate the given Component with the provided options. Tessellation can only occur at the body, instance or assembly level, so calling this function on Component objects below that level will have no effect.
Parameters:
-
bool
-
class
ExportOptionsKit
: public HPS::SprocketKit The ExportOptionsKit class is a user space object. It contains settings controlling what and how data is exported via Parasolid. Default values for the various fields of this class can be found here.
Public Functions
-
virtual bool
Empty
() const Indicates whether this ExportOptionsKit has any values set on it.
Returns: true if no values are set on this ExportOptionsKit, false otherwise.
-
bool
Equals
(ExportOptionsKit const &in_kit) const Check if the source ExportOptionsKit is equivalent to this ExportOptionsKit.
Parameters: in_kit – The source ExportOptionsKit to compare to this ExportOptionsKit. Returns: true if the objects are equivalent, false otherwise.
-
ExportOptionsKit
() The default constructor creates an empty ExportOptionsKit object.
-
ExportOptionsKit
(ExportOptionsKit &&in_that) The move constructor creates an ExportOptionsKit by transferring the underlying impl of the rvalue reference to this ExportOptionsKit thereby avoiding a copy and allocation.
Parameters: in_that – An rvalue reference to an ExportOptionsKit to take the impl from.
-
ExportOptionsKit
(ExportOptionsKit const &in_kit) The copy constructor creates a new ExportOptionsKit object that contains the same settings as the source ExportOptionsKit.
Parameters: in_kit – The source ExportOptionsKit to copy.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
bool
operator!=
(ExportOptionsKit const &in_kit) const Check if the source ExportOptionsKit is not equivalent to this ExportOptionsKit.
Parameters: in_kit – The source ExportOptionsKit to compare to this ExportOptionsKit. Returns: true if the objects are not equivalent, false otherwise.
-
ExportOptionsKit &
operator=
(ExportOptionsKit &&in_that) The move assignment operator transfers the underlying impl of the rvalue reference to this ExportOptionsKit thereby avoiding a copy.
Parameters: in_that – An rvalue reference to an ExportOptionsKit to take the impl from. Returns: A reference to this ExportOptionsKit.
-
ExportOptionsKit &
operator=
(ExportOptionsKit const &in_kit) Copies the source ExportOptionsKit into this ExportOptionsKit.
Parameters: in_kit – The source ExportOptionsKit to copy. Returns: A reference to this ExportOptionsKit.
-
bool
operator==
(ExportOptionsKit const &in_kit) const Check if the source ExportOptionsKit is equivalent to this ExportOptionsKit.
Parameters: in_kit – The source ExportOptionsKit to compare to this ExportOptionsKit. Returns: true if the objects are equivalent, false otherwise.
-
void
Set
(ExportOptionsKit const &in_kit) Copies the source ExportOptionsKit into this ExportOptionsKit.
Parameters: in_kit – The source ExportOptionsKit to copy.
-
ExportOptionsKit &
SetFormat
(Parasolid::Format in_format) Sets the format type to be exported. This corresponds to the value that will be passed to PK_PART_transmit_o_t.transmit_format.
See also
Parameters: in_format – The format of the file to be exported. Returns: A reference to this ExportOptionsKit.
-
ExportOptionsKit &
SetUserFields
(bool in_export_user_fields) Sets whether to export user fields from the CAD file. This corresponds to the value that will be passed to PK_PART_transmit_o_t.receive_user_fields.
Parameters: in_export_user_fields – Whether to export user fields from the CAD file. Returns: A reference to this ExportOptionsKit.
-
void
Show
(ExportOptionsKit &out_kit) const Copies this ExportOptionsKit into the given ExportOptionsKit.
Parameters: out_kit – The ExportOptionsKit to populate with the contents of this ExportOptionsKit.
-
bool
ShowFormat
(Parasolid::Format &out_format) const Shows the format export setting.
Parameters: out_format – The format setting for this export. Returns: true if a format setting was specified, false otherwise.
-
bool
ShowUserFields
(bool &out_user_fields) const Shows the user fields export setting.
Parameters: out_user_fields – The user fields setting for this export. Returns: true if a user fields setting was specified, false otherwise.
-
ExportOptionsKit &
UnsetEverything
() Removes all settings from this ExportOptionsKit.
Returns: A reference to this ExportOptionsKit.
-
ExportOptionsKit &
UnsetFormat
() Removes the format export state.
Returns: A reference to this ExportOptionsKit.
-
ExportOptionsKit &
UnsetUserFields
() Removes the user fields export state.
Returns: A reference to this ExportOptionsKit.
-
virtual
~ExportOptionsKit
()
Public Static Functions
-
static ExportOptionsKit
GetDefault
() Creates an ExportOptionsKit 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::Export.
Returns: An ExportOptionsKit with the default settings.
-
virtual bool
-
class
Facet
Public Types
-
enum class
Degeneracy
Enumerates the way the Parasolid importer treats degeneracies during tessellation. Corresponds to the PK_face_degen_t struct.
Values:
-
enumerator
MultipleVertices
output multiple vertices at degeneracies
-
enumerator
SingleVertex
output single vertex at degeneracies
-
enumerator
Average
output average parameters at degeneracies
-
enumerator
-
enum class
Density
Enumerates the way the Parasolid importer can alter facet density during tessellation. Corresponds to the PK_face_density_t struct.
Values:
-
enumerator
ViewIndependent
Density in independent of view.
-
enumerator
Silhouette
Density increased around silhouettes.
-
enumerator
Parallel
Density increased where facet normals are close to parallel with the view.
-
enumerator
SilhouetteAndParallel
Density increased where facet normals are close to parallel with the view and near silhouettes
-
enumerator
-
enum class
IncrementalFaceting
Enumerates the way the Parasolid importer handles incremental faceting during tessellation. Corresponds to the PK_face_incr_t struct.
Values:
-
enumerator
Off
incremental faceting is not used
-
enumerator
OffNoAttributes
incremental faceting is not used, attributes are deleted
-
enumerator
OffRefreshAttributes
incremental faceting is not used, attributes are deleted and new ones are generated
-
enumerator
On
incremental faceting is used
-
enumerator
-
enum class
Match
Enumerates the way the Parasolid importer treats facets near neighboring faces during tessellation. Corresponds to the PK_face_match_t struct.
Values:
-
enumerator
Geometrical
Facets meet exactly but are topologically disjoint.
-
enumerator
Topological
Facets meet exactly and have the same topology.
-
enumerator
Trimmed
Facets may overlap or have gaps between them.
-
enumerator
-
enum class
Shape
Enumerates the way the Parasolid importer treats concave and convex facets during tessellation. Corresponds to the PK_face_shape_t struct.
Values:
-
enumerator
Any
Allow creation of holed or concaved facets.
-
enumerator
Cut
Facets with holes are cut into concave facets.
-
enumerator
Convex
Divide concave facets into convex faces.
-
enumerator
-
class
Tolerance
Public Functions
-
void
ShowTolerance
(double &out_curve_chord_tolerance, double &out_curve_chord_maximum_length, double &out_curve_chord_max_angle, double &out_surface_tolerance, double &out_surface_max_angle) const
-
Tolerance
()
-
Tolerance
(double curve_chord_tolerance, double curve_chord_maximum_length, double curve_chord_max_angle, double surface_tolerance, double surface_max_angle)
-
void
-
enum class
-
class
FacetTessellationKit
: public HPS::SprocketKit The FacetTessellationKit class is a user space object. It contains settings controlling facet tessellation for Parasolid. It corresponds to the PK_TOPOL_render_facet_o_t struct.
Public Functions
-
virtual bool
Empty
() const Indicates whether this FacetTessellationKit has any values set on it.
Returns: true if no values are set on this FacetTessellationKit, false otherwise.
-
bool
Equals
(FacetTessellationKit const &in_kit) const Check if the source FacetTessellationKit is equivalent to this FacetTessellationKit.
Parameters: in_kit – The source FacetTessellationKit to compare to this FacetTessellationKit. Returns: true if the objects are equivalent, false otherwise.
-
FacetTessellationKit
() The default constructor creates an empty FacetTessellationKit object.
-
FacetTessellationKit
(FacetTessellationKit &&in_that) The move constructor creates an FacetTessellationKit by transferring the underlying impl of the rvalue reference to this FacetTessellationKit thereby avoiding a copy and allocation.
Parameters: in_that – An rvalue reference to an FacetTessellationKit to take the impl from.
-
FacetTessellationKit
(FacetTessellationKit const &in_kit) The copy constructor creates a new FacetTessellationKit object that contains the same settings as the source FacetTessellationKit.
Parameters: in_kit – The source FacetTessellationKit to copy.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
bool
operator!=
(FacetTessellationKit const &in_kit) const Check if the source FacetTessellationKit is not equivalent to this FacetTessellationKit.
Parameters: in_kit – The source FacetTessellationKit to compare to this FacetTessellationKit. Returns: true if the objects are not equivalent, false otherwise.
-
FacetTessellationKit &
operator=
(FacetTessellationKit &&in_that) The move assignment operator transfers the underlying impl of the rvalue reference to this FacetTessellationKit thereby avoiding a copy.
Parameters: in_that – An rvalue reference to an FacetTessellationKit to take the impl from. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
operator=
(FacetTessellationKit const &in_kit) Copies the source FacetTessellationKit into this FacetTessellationKit.
Parameters: in_kit – The source FacetTessellationKit to copy. Returns: A reference to this FacetTessellationKit.
-
bool
operator==
(FacetTessellationKit const &in_kit) const Check if the source FacetTessellationKit is equivalent to this FacetTessellationKit.
Parameters: in_kit – The source FacetTessellationKit to compare to this FacetTessellationKit. Returns: true if the objects are equivalent, false otherwise.
-
void
Set
(FacetTessellationKit const &in_kit) Copies the source FacetTessellationKit into this FacetTessellationKit.
Parameters: in_kit – The source FacetTessellationKit to copy.
-
FacetTessellationKit &
SetChordTolerance
(double in_chord_tolerance, double in_maximum_chord_length, double in_maximum_chord_angle) Sets chord tolerance.
Parameters: - in_chord_tolerance – curve chordal tolerance between a curve and its facet edges. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.curve_chord_tol.
- in_maximum_chord_length – maximum chord length. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.curve_chord_max.
- in_maximum_chord_angle – maximum chord angle, in radians. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.curve_chord_ang.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetDegeneracyBehavior
(Facet::Degeneracy in_degeneracy_behavior) Sets the behavior the import assumes during tessellation when encountering a degeneracy.
Parameters: in_degeneracy_behavior – describes how vertices are handled at degeneracies. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.degen. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetDensity
(Facet::Density in_density, double in_density_tolerance = 0, double in_density_max_angle = 0, DVectorArray const &in_view_directions = DVectorArray()) Sets the density settings.
Parameters: - in_density – The density settings. This corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.density.
- in_density_tolerance – The density tolerance. Must be specified is in_density is not ViewIndependent. This corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.local_density_tol.
- in_density_max_angle – The density tolerance maximum angle. This corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.local_density_ang.
- in_view_directions – An array of view directions. Must be specified is in_density is not ViewIndependent. This corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.view_directions.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetEdges
(bool in_edges) Sets whether to output edges.
Parameters: in_edges – whether to output edges. Corresponds to the value that will be passed to PK_TOPOL_render_facet_go_o_t.go_edges. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetFacetPlaneTolerance
(double in_plane_tolerance, double in_max_plane_angle) Sets tolerance between facet and mid-plane.
Parameters: - in_plane_tolerance – distance tolerance between facet and mid-plane. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.facet_plane_tol.
- in_max_plane_angle – angular tolerance between facet and mid-plane, in radians. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.facet_plane_ang.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetFacetSize
(double in_minimum_width, double in_maximum_width, int in_maximum_sides) Sets face size constraints.
Parameters: - in_minimum_width – minimum facet width. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.min_facet_width.
- in_maximum_width – minimum facet width. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.max_facet_width.
- in_maximum_sides – maximum facet sides. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.max_facet_sides.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetFlattenVertices
(bool in_flatten_vertices) Sets whether vertices should be forced against tolerance edges.
Parameters: in_flatten_vertices – whether vertices should be forced against tolerance edges. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.vertices_on_planar. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetIgnoreCriteria
(bool in_ignore, Ignore in_ignore_criteria = Ignore::Absolute, double in_minimum_value = 0, bool in_treat_faces_individually = false) Sets criteria for ignoring facets.
Parameters: - in_ignore – whether any facet should be ignored.
- in_ignore_criteria – specifies how to interpret the minimum_value parameter. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.ignore.
- in_minimum_value – minimum value for a facet not to be ignored. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.ignore_value.
- in_treat_faces_individually – whether facets should be considered individually or as part of the face’s owning body for ignore calculations. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.ignore_scope.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetIgnoredLoops
(IntArray &in_ignored_loops) Sets which loops should be ignored while faceting. This corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.loops.
Parameters: in_ignored_loops – loops ignored during faceting. Each entry in the vector correspond to a PK_LOOP_t object Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetImprovedFacetQuality
(bool in_improved_quality) Sets whether extra checks should be performed to improve the quality of facets.
Parameters: in_improved_quality – whether extra checks should be performed to improve the quality of facets. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.quality. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetIncrementalFaceting
(Facet::IncrementalFaceting in_faceting, bool refine_tessellation = false) Sets whether incremental faceting should be used.
Parameters: - in_faceting – sets the incremental faceting behavior. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.incremental_facetting.
- refine_tessellation – whether to refine facets. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.incremental_refinement.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetInflection
(bool in_refine) Sets whether facets around points of inflections may be further refined.
Parameters: in_refine – whether facets around points of inflections may be further refined. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.inflect. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetLocalTolerances
(ToleranceArray const &in_tolerance_array, IntArray const &in_topology_array, IntArray const &in_tolerance_for_tolopoly) Sets specific tolerances for a set of topologies.
Parameters: - in_tolerance_array – array of tolerance specifications. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.local_tols.
- in_topology_array – array of topologies for which a specific tolerance will be applied. Each entry in the vector correspond to a PK_TOPOL_t object. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.topols_with_local_tols.
- in_tolerance_for_tolopoly – indexes connecting each element of the topology array to a tolerance. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.local_tols_for_topols.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetNormals
(bool in_normals) Sets whether to output surface normals.
Parameters: in_normals – whether to output surface normals. Corresponds to the value that will be passed to PK_TOPOL_render_facet_go_o_t.go_normals. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetOffsetFaces
(bool in_offset_faces) Sets whether to take into account faces which are offsets of one another.
Parameters: in_offset_faces – whether to take into account faces which are offsets of one another. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.respect_offset. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetParameters
(bool in_parameters) Sets whether to output surface parameters.
Parameters: in_parameters – whether to output surface parameters. Corresponds to the value that will be passed to PK_TOPOL_render_facet_go_o_t.go_parameters. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetShapeGeneration
(Facet::Shape in_shape) Sets constraints on the facet generation. This corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.shape.
Parameters: in_shape – The behavior used during tessellation for handling concave, convex and holed entities. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetStrips
(bool in_strips, int in_max_facets_per_strip, bool in_split_strips) Sets output settings for strips
Parameters: - in_strips – whether to output facets in strips. Corresponds to the value that will be passed to PK_TOPOL_render_facet_go_o_t.go_strips.
- in_max_facets_per_strip – maximum number of facets per strips. Corresponds to the value that will be passed to PK_TOPOL_render_facet_go_o_t.go_max_facets_per_strip.
- in_split_strips – whether to split facet strips. Corresponds to the value that will be passed to PK_TOPOL_render_facet_go_o_t.split_strips.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetSurfacePlaneTolerance
(double in_plane_tolerance, double in_max_plane_angle) Sets tolerance between surfaces and corresponding facets.
Parameters: - in_plane_tolerance – distance tolerance between surface and its facet. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.surface_plane_tol.
- in_max_plane_angle – angular tolerance between surface and its facet, in radians. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.surface_plane_ang.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetTessellationLevel
(HPS::Parasolid::TessellationLevel in_tessellation_level, double in_chord = -1, double in_angle = -1, bool in_generate_line_tessellation = true) Sets facet tessellation level. This function can optionally compute the best values for line tessellation based on the values passed in. Doing so is enabled by default and will result in lines which smoothly match their respective faces.
Parameters: - in_tessellation_level – The tessellation level used for importing facets.
- in_chord – The chord tolerance. Only considered if in_tessellation_level is set to Custom.
- in_angle – The angle tolerance. Only considered if in_tessellation_level is set to Custom.
- in_generate_line_tessellation – Automatically figure out the best parameters for line tessellation based on facet tessellation levels. True by default.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetVertexMatching
(Facet::Match in_vertex_matching) Sets the vertex matching strategy at edges This corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.match.
Parameters: in_vertex_matching – The behavior used during tessellation for handling facet meshes between neighboring faces. Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
SetWireEdges
(bool in_wire_edges) Sets whether wire edges should be taken into account while faceting.
Parameters: in_wire_edgeswhether – wire edges should be taken into account while faceting. Corresponds to the value that will be passed to PK_TOPOL_facet_mesh_o_t.wire_edges. Returns: A reference to this FacetTessellationKit.
-
void
Show
(FacetTessellationKit &out_kit) const Copies this FacetTessellationKit into the given FacetTessellationKit.
Parameters: out_kit – The FacetTessellationKit to populate with the contents of this FacetTessellationKit.
-
bool
ShowChordTolerance
(double &out_chord_tolerance, double &out_maximum_chord_length, double &out_maximum_chord_angle) const Shows the chord tolerance tessellation setting.
Parameters: - out_chord_tolerance – The tolerance setting for this kit.
- out_maximum_chord_length – The maximum chord length setting for this kit.
- out_maximum_chord_angle – The maximum chord angle setting for this kit.
Returns: true if a chord tolerance setting was specified, false otherwise.
-
bool
ShowDegeneracyBehavior
(Facet::Degeneracy &out_degeneracy_behavior) const Shows the degeneracy tessellation setting.
Parameters: out_degeneracy_behavior – The degeneracy setting for this kit. Returns: true if a degeneracy setting was specified, false otherwise.
-
bool
ShowDensity
(Facet::Density &out_density, double &out_density_tolerance, double &out_density_max_angle, DVectorArray &out_view_directions) const Shows the density tessellation setting.
Parameters: - out_density – The density setting for this kit.
- out_density_tolerance – The density tolerance.
- out_density_max_angle – The density tolerance maximum angle.
- out_view_directions – An array of view directions.
Returns: true if a density setting was specified, false otherwise.
-
bool
ShowEdges
(bool &out_edges) const Shows the edges tessellation setting.
Parameters: out_edges – The edges setting for this kit. Returns: true if a edges setting was specified, false otherwise.
-
bool
ShowFacetPlaneTolerance
(double &out_plane_tolerance, double &out_max_plane_angle) const Shows the facet plane tolerance tessellation setting.
Parameters: - out_plane_tolerance – The tolerance setting for this kit.
- out_max_plane_angle – The maximum angle setting for this kit.
Returns: true if a facet plane tolerance setting was specified, false otherwise.
-
bool
ShowFacetSize
(double &out_minimum_width, double &out_maximum_width, int &out_maximum_sides) const Shows the facet size tessellation setting.
Parameters: - out_minimum_width – The minimum facet width setting for this kit.
- out_maximum_width – The maximum facet width setting for this kit.
- out_maximum_sides – The maximum facet side setting for this kit.
Returns: true if a facet size setting was specified, false otherwise.
-
bool
ShowFlattenVertices
(bool &out_flatten_vertices) const Shows the flatten faces tessellation setting.
Parameters: out_flatten_vertices – The flatten faces setting for this kit. Returns: true if a flatten faces setting was specified, false otherwise.
-
bool
ShowIgnoreCriteria
(bool &out_ignore, Ignore &out_ignore_criteria, double &out_minimum_value, bool &out_treat_faces_individually) const Shows the ignore criteria tessellation setting.
Parameters: - out_ignore – Whether facets are ignored in this kit. If this is false the other parameters are meaningless.
- out_ignore_criteria – The ignore criteria setting for this kit. Meaningless if out_ignore is false.
- out_minimum_value – The minimum value for ignoring a facet for this kit. Meaningless if out_ignore is false.
- out_treat_faces_individually – Whether faces are considered individually when deciding if they should be ignored. Meaningless if out_ignore is false.
Returns: true if a ignore criteria were specified, false otherwise.
-
bool
ShowIgnoredLoops
(IntArray &out_ignored_loops) const Shows the ignored loops tessellation setting.
Parameters: out_ignored_loops – The ignored loops setting for this kit. Returns: true if a ignored loops setting was specified, false otherwise.
-
bool
ShowImprovedFacetQuality
(bool &out_improved_quality) const Shows the improved facet quality tessellation setting.
Parameters: out_improved_quality – The out_improved_quality setting for this kit. Returns: true if a improved facet quality setting was specified, false otherwise.
-
bool
ShowIncrementalFaceting
(Facet::IncrementalFaceting &out_faceting, bool &out_refine_tessellation) const Shows the incremental faceting tessellation setting.
Parameters: - out_faceting – The incremental faceting setting for this kit.
- out_refine_tessellation – Whether facets are refined setting for this kit.
Returns: true if an incremental faceting setting was specified, false otherwise.
-
bool
ShowInflection
(bool &out_refine) const Shows the inflection tessellation setting.
Parameters: out_refine – The inflection setting for this kit. Returns: true if a inflection setting was specified, false otherwise.
-
bool
ShowLocalTolerances
(ToleranceArray &out_tolerance_array, IntArray &out_topology_array, IntArray &out_tolerance_for_tolopoly) const Shows the local tolerance tessellation setting.
Parameters: - out_tolerance_array – The local tolerance array for this kit.
- out_topology_array – The topology array for this kit.
- out_tolerance_for_tolopoly – The index array for this kit.
Returns: true if a local tolerance setting was specified, false otherwise.
-
bool
ShowNormals
(bool &out_normals) const Shows the normals tessellation setting.
Parameters: out_normals – The normals setting for this kit. Returns: true if a normals setting was specified, false otherwise.
-
bool
ShowOffsetFaces
(bool &out_offset_faces) const Shows the offset faces tessellation setting.
Parameters: out_offset_faces – The offset faces setting for this kit. Returns: true if a offset faces setting was specified, false otherwise.
-
bool
ShowParameters
(bool &out_parameters) const Shows the parameters tessellation setting.
Parameters: out_parameters – The parameters setting for this kit. Returns: true if a parameters setting was specified, false otherwise.
-
bool
ShowShapeGeneration
(Facet::Shape &out_shape) const Shows the shape generation tessellation setting.
Parameters: out_shape – The shape generation setting for this kit. Returns: true if a shape generation setting was specified, false otherwise.
-
bool
ShowStrips
(bool &out_strips, int &out_max_facets_per_strip, bool &out_split_strips) const Shows the strips tessellation setting.
Parameters: - out_strips – The strips setting for this kit.
- out_max_facets_per_strip – The maximum number of facet per strip setting for this kit.
- out_split_strips – Whether strips can be split for this kit.
Returns: true if a strips setting was specified, false otherwise.
-
bool
ShowSurfacePlaneTolerance
(double &out_plane_tolerance, double &out_max_plane_angle) const Shows the surface plane tolerance tessellation setting.
Parameters: - out_plane_tolerance – The tolerance setting for this kit.
- out_max_plane_angle – The maximum angle setting for this kit.
Returns: true if a surface plane tolerance setting was specified, false otherwise.
-
bool
ShowTessellationLevel
(TessellationLevel &out_tessellation_level, double &out_chord, double &out_angle, bool &out_generate_line_tessellation) const Shows the shape generation tessellation setting.
Parameters: - out_tessellation_level – The tessellation level used for this import
- out_chord – The chord tolerance. Only relevant if out_tessellation_level is Custom.
- out_angle – The angle tolerance. Only relevant if out_tessellation_level is Custom.
- out_generate_line_tessellation – Whether line tessellation levels are automatically generated based on facet tessellation level.
Returns: true if a shape generation setting was specified, false otherwise.
-
bool
ShowVertexMatching
(Facet::Match &out_vertex_matching) const Shows the vertex matching tessellation setting.
Parameters: out_vertex_matching – The vertex matching tessellation setting for this kit. Returns: true if a vertex matching tessellation setting was specified, false otherwise.
-
bool
ShowWireEdges
(bool &out_wire_edges) const Shows the wire edges tessellation setting.
Parameters: out_wire_edges – The wire edge setting for this kit. Returns: true if a wire edge setting was specified, false otherwise.
-
FacetTessellationKit &
UnsetChordTolerance
() Removes the chord tolerance tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetDegeneracyBehavior
() Removes the degeneracy tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetDensity
() Removes the density tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetEdges
() Removes the edges tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetEverything
() Removes all settings from this FacetTessellationKit.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetFacetPlaneTolerance
() Removes the facet plane tolerance tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetFacetSize
() Removes the facet size tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetFlattenVertices
() Removes the vertex flattening tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetIgnoreCriteria
() Removes the ignore criteria tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetIgnoredLoops
() Removes the ignored loops tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetImprovedFacetQuality
() Removes the facet quality tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetIncrementalFaceting
() Removes the incremental faceting tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetInflection
() Removes the inflection tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetLocalTolerances
() Removes the local tolerances tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetNormals
() Removes the normals tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetOffsetFaces
() Removes the offset faces tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetParameters
() Removes the parameters tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetShapeGeneration
() Removes the shape generation tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetStrips
() Removes the strip tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetSurfacePlaneTolerance
() Removes the plane tolerance tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetTessellationLevel
() Removes the tessellation level state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetVertexMatching
() Removes the vertex matching tessellation state.
Returns: A reference to this FacetTessellationKit.
-
FacetTessellationKit &
UnsetWireEdges
() Removes the wire edges tessellation state.
Returns: A reference to this FacetTessellationKit.
-
virtual
~FacetTessellationKit
()
Public Static Functions
-
static FacetTessellationKit
GetDefault
() Creates an FacetTessellationKit 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 facet tessellation unless an option is overridden by the options passed to File::Import.
Returns: An FacetTessellationKit with the default settings.
-
virtual bool
-
class
Factory
: public HPS::Sprocket The Factory class is used to create Parasolid objects which inherit from HPS::Component or one of its subclasses.
Public Static Functions
-
static CADModel
CreateCADModel
(Model const &in_model = HPS::Factory::CreateModel()) Creates a new Parasolid::CADModel.
Parameters: in_model – The Model associated with the Parasolid::CADModel.
-
static Component
CreateComponent
(HPS::Component const &in_owner, HPS::Component::ComponentType in_type, ParasolidEntity in_entity = 0) Creates a new Parasolid::Component as a subcomponent of a given Component.
Parameters: - in_owner – The HPS::Component which owns the newly created Parasolid::Component.
- in_type – The type of Parasolid::Component to create.
- in_entity – The Parasolid entity associated with the newly created Parasolid::Component.
-
static Component
DeInstanceComponent
(ComponentPath const &in_component_path) Returns the component at whose level changes can be made without influencing other instances of the same component. For Parasolid components this function is only meaningful when in_component_path contains at least one component of type ParasolidInstance or ParasolidTopoBody. If none of these types are present in in_component_path a warning will be logged and an empty component will be returned.
Parameters: in_component_path – The ComponentPath to operate on. Returns: The newly de-instanced Component.
-
static CADModel
-
class
File
The File class provides functions to import and export CAD files via the Parasolid interface.
Public Static Functions
-
static void
Export
(CADModel const &in_cad_model, char const *in_file_name, ExportOptionsKit const &in_options) Performs a synchronous export of the given CADModel with the provided options to a given filename. An exception will be thrown if a problem is encountered during export.
Parameters: - in_cad_model – The CADModel containing the data to export. This CADModel must have come from a CAD file imported via Parasolid, if it did not, the export will not succeed.
- in_file_name – The name of the file to write the Parasolid data to.
- in_options – The options controlling the export of the Parasolid data.
-
static ImportNotifier
Import
(char const *in_file_name, ImportOptionsKit const &in_options) Performs an asynchronous import of the specified CAD file with the provided options. May throw an IOException prior to starting the asynchronous import.
Parameters: - in_file_name – The name of the CAD file to import.
- in_options – The options controlling the import of the CAD file.
Returns: An ImportNotfier object that can be used to query the import progress and status.
-
static ImportNotifier
Import
(EntityArray const &in_parts, FacetTessellationKit const &in_facet_options, LineTessellationKit const &in_line_options) Performs an asynchronous import of the specified entities. May throw an IOException prior to starting the asynchronous import.
Parameters: - in_parts – An array of PK_PART_t entities to import.
- in_facet_options – The options controlling the import of facets in the CAD file.
- in_line_options – The options controlling the import of lines in the CAD file.
Returns: An ImportNotfier object that can be used to query the import progress and status.
-
static void
-
class
ImportNotifier
: public HPS::IONotifier The ImportNotifier class is a smart-pointer that is tied to a file import. It is used to interact with an ongoing import or get the results from a completed import.
Public Functions
-
void
Assign
(ImportNotifier const &in_that) Associate this ImportNotifier with the same file import as the source ImportNotifier.
Parameters: in_that – The source ImportNotifier for the assignment.
-
Parasolid::CADModel
GetCADModel
() const Get the CADModel for the file import. Throws an IOException if the import is not complete, was not successful or was canceled.
Returns: The CADModel for a successful file import.
-
Time
GetImportTime
() const Get the number of milliseconds it took Parasolid to read the file into memory. Throws an IOException if the import is not complete, was not successful or was canceled.
-
Time
GetParseTime
() const Get the number of milliseconds it took Visualize to parse the Parasolid data and create the corresponding scene graph. Throws an IOException if the import is not complete, was not successful or was canceled.
-
ImportNotifier
() The default constructor creates an ImportNotifier object which is not tied to any file import.
-
ImportNotifier
(ImportNotifier &&in_that) The move constructor creates an ImportNotifier by transferring the underlying impl of the rvalue reference to this ImportNotifier thereby avoiding a copy and allocation.
Parameters: in_that – An rvalue reference to an ImportNotifier to take the impl from.
-
ImportNotifier
(ImportNotifier const &in_that) The copy constructor creates a new ImportNotifier object that is associated with the same file import as the source ImportNotifier.
Parameters: in_that – The source ImportNotifier to copy.
-
ImportNotifier
(IONotifier const &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.
Parameters: in_that – The source IONotifier to copy.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
ImportNotifier &
operator=
(ImportNotifier &&in_that) The move assignment operator transfers the underlying impl of the rvalue reference to this ImportNotifier thereby avoiding a copy.
Parameters: in_that – An rvalue reference to an ImportNotifier to take the impl from. Returns: A reference to this ImportNotfier.
-
ImportNotifier &
operator=
(ImportNotifier const &in_that) Associate this ImportNotifier with the same file import as the source ImportNotifier.
Parameters: in_that – The source ImportNotifier for the assignment. Returns: A reference to this ImportNotifier.
-
virtual
~ImportNotifier
()
-
void
-
class
ImportOptionsKit
: public HPS::SprocketKit The ImportOptionsKit class is a user space object. It contains settings controlling what and how data is imported via the Parasolid interface. Calling HPS::Parasolid::ImportOptionsKit::GetDefault() will return an options kit with values found in here.
Public Functions
-
virtual bool
Empty
() const Indicates whether this ImportOptionsKit has any values set on it.
Returns: true if no values are set on this ImportOptionsKit, false otherwise.
-
bool
Equals
(ImportOptionsKit const &in_kit) const Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.
Parameters: in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit. Returns: true if the objects are equivalent, false otherwise.
-
ImportOptionsKit
() The default constructor creates an empty ImportOptionsKit object.
-
ImportOptionsKit
(ImportOptionsKit &&in_that) The move constructor creates an ImportOptionsKit by transferring the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy and allocation.
Parameters: in_that – An rvalue reference to an ImportOptionsKit to take the impl from.
-
ImportOptionsKit
(ImportOptionsKit const &in_kit) The copy constructor creates a new ImportOptionsKit object that contains the same settings as the source ImportOptionsKit.
Parameters: in_kit – The source ImportOptionsKit to copy.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
bool
operator!=
(ImportOptionsKit const &in_kit) const Check if the source ImportOptionsKit is not equivalent to this ImportOptionsKit.
Parameters: in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit. Returns: true if the objects are not equivalent, false otherwise.
-
ImportOptionsKit &
operator=
(ImportOptionsKit &&in_that) The move assignment operator transfers the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy.
Parameters: in_that – An rvalue reference to an ImportOptionsKit to take the impl from. Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
operator=
(ImportOptionsKit const &in_kit) Copies the source ImportOptionsKit into this ImportOptionsKit.
Parameters: in_kit – The source ImportOptionsKit to copy. Returns: A reference to this ImportOptionsKit.
-
bool
operator==
(ImportOptionsKit const &in_kit) const Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.
Parameters: in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit. Returns: true if the objects are equivalent, false otherwise.
-
void
Set
(ImportOptionsKit const &in_kit) Copies the source ImportOptionsKit into this ImportOptionsKit.
Parameters: in_kit – The source ImportOptionsKit to copy.
-
ImportOptionsKit &
SetAttributeMismatchBehavior
(Parasolid::MismatchBehavior in_behavior) Sets the importer behavior for mismatched attributes. This corresponds to the value that will be passed to PK_PART_receive_o_t.attdef_mismatch.
See also
Parameters: in_behavior – The behavior of the importer when mismatched attributes are found. Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
SetCompoundBodyBehavior
(Parasolid::CompoundBodyBehavior in_behavior) Sets the importer behavior for compound bodies. This corresponds to the value that will be passed to PK_PART_receive_o_t.receive_compound.
See also
Parameters: in_behavior – The behavior of the importer when compound bodies are found. Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
SetFacetTessellation
(Parasolid::FacetTessellationKit const &in_facet_tessellation_kit) Sets the facet tessellation settings used during import This corresponds to the PK_TOPOL_render_facet_o_t struct.
Parameters: in_facet_tessellation_kit – The facet tessellation settings used during import Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
SetFormat
(Parasolid::Format in_format) Sets the format type to be imported. This corresponds to the value that will be passed to PK_PART_receive_o_t.transmit_format.
See also
Parameters: in_format – The format of the file to be imported. Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
SetLineTessellation
(Parasolid::LineTessellationKit const &in_line_tessellation_kit) Sets the line tessellation settings used during import This corresponds to the PK_TOPOL_render_line_o_t struct.
Parameters: in_facet_tessellation_kit – The line tessellation settings used during import Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
SetLocation
(ComponentPath const &in_path, MatrixKit const &in_transform = MatrixKit()) Sets where to insert the imported file in an existing Component hierarchy. If this option is not set, a new CADModel will be created for the imported file. If this option is specified, the underlying Parasolid 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. The file will be imported in the same PK_PARTITION_t as the one to which entities in in_path belong.
Parameters: - 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 a Parasolid Assembly. Note that if the imported file is added along a ComponentPath with attributes specified in the Parasolid data, the components added to the existing Parasolid data will also inherit those attributes.
- in_transform – A transform to apply to the components being added to the existing CADModel. This transform will also be added to the underlying Parasolid data. Valid transformations are limited to translations, rotations, uniform scaling and reflection. If the transform does not conform to these limitations it will be ignored. Defaults to an identity transform.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
SetUserFields
(bool in_import_user_fields) Sets whether to import user fields from the CAD file. This corresponds to the value that will be passed to PK_PART_receive_o_t.receive_user_fields.
See also
Parameters: in_import_user_fields – Whether to import user fields from the CAD file. Returns: A reference to this ImportOptionsKit.
-
void
Show
(ImportOptionsKit &out_kit) const Copies this ImportOptionsKit into the given ImportOptionsKit.
Parameters: out_kit – The ImportOptionsKit to populate with the contents of this ImportOptionsKit.
-
bool
ShowAttributeMismatchBehavior
(Parasolid::MismatchBehavior &out_behavior) const Shows the attribute mismatch behavior import setting.
Parameters: out_behavior – The attribute mismatch behavior setting for this import. Returns: true if an attribute mismatch behavior setting was specified, false otherwise.
-
bool
ShowCompoundBodyBehavior
(Parasolid::CompoundBodyBehavior &out_behavior) const Shows the compound body behavior import setting.
Parameters: out_behavior – The compound body behavior setting for this import. Returns: true if a compound body behavior setting was specified, false otherwise.
-
bool
ShowFacetTessellation
(Parasolid::FacetTessellationKit &out_facet_tessellation) const Shows the facet tessellation import setting.
Parameters: out_facet_tessellation – The facet tessellation setting for this import. Returns: true if a facet tessellation setting was specified, false otherwise.
-
bool
ShowFormat
(Parasolid::Format &out_format) const Shows the format import setting.
Parameters: out_format – The format setting for this import. Returns: true if a format setting was specified, false otherwise.
-
bool
ShowLineTessellation
(Parasolid::LineTessellationKit &out_line_tessellation) const Shows the line tessellation import setting.
Parameters: out_line_tessellation – The line tessellation setting for this import. Returns: true if a line tessellation setting was specified, false otherwise.
-
bool
ShowLocation
(ComponentPath &out_path, MatrixKit &out_transformation) const Shows the location setting.
Parameters: - out_path – The path describing the location to insert the imported file into.
- out_transform – The transform to apply to the components being added to the existing CADModel.
Returns: true if a location setting was specified, false otherwise.
-
bool
ShowUserFields
(bool &out_user_fields) const Shows the user fields import setting.
Parameters: out_user_fields – The user fields setting for this import. Returns: true if a user fields setting was specified, false otherwise.
-
ImportOptionsKit &
UnsetAttributeMismatchBehavior
() Removes the attribute mismatch behavior state.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
UnsetCompoundBodyBehavior
() Removes the compound body behavior state.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
UnsetEverything
() Removes all settings from this ImportOptionsKit.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
UnsetFacetTessellation
() Removes the facet tessellation state.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
UnsetFormat
() Removes the format import state.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
UnsetLineTessellation
() Removes the line tessellation state.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
UnsetLocation
() Removes the location state.
Returns: A reference to this ImportOptionsKit.
-
ImportOptionsKit &
UnsetUserFields
() Removes the user fields import state.
Returns: A reference to this ImportOptionsKit.
-
virtual
~ImportOptionsKit
()
Public Static Functions
-
static 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. These values will be used for import unless an option is overridden by the options passed to File::Import.
Returns: An ImportOptionsKit with the default settings.
-
virtual bool
-
class
Line
Public Types
-
enum class
BCurveRendering
Values:
-
enumerator
Polyline
Output bcurves as polylines.
-
enumerator
Bezier
Output bcurves in Bezier form.
-
enumerator
NURBS
Output bcurves in NURBS form.
-
enumerator
-
enum class
Hierarchical
Values:
-
enumerator
On
Do not produce hierarchical output.
-
enumerator
Off
Hierarchical output.
-
enumerator
NoGeometry
Hierarchical output - no geometry.
-
enumerator
Parameterized
Hierarchical output parameterised.
-
enumerator
-
enum class
OverlappingBehavior
Values:
-
enumerator
DoNotAllow
Do not allow for overlapping instances.
-
enumerator
Allow
Allow for overlapping instances.
-
enumerator
AllowAndIntersectAll
Allow for overlapping instances, and clash all curves.
-
enumerator
AllowAndIntersectPairs
Allow for overlapping instances, and clash pairs of curves.
-
enumerator
-
enum class
Region
Values:
-
enumerator
Output
Output regional data for all edges and silhouettes.
-
enumerator
DoNotOutput
Do not output regional data.
-
enumerator
ByAttribute
Output regional data for silhouettes and edges bounding faces with the regional attribute.
-
enumerator
-
enum class
Smooth
Values:
-
enumerator
Indicate
Indicate whether edges are smooth.
-
enumerator
DoNotIndicate
Do not indicate whether edges are smooth.
-
enumerator
Draft
Indicate whether edges are smooth, and also whether they are coincident with other lines.
-
enumerator
-
enum class
UnfixedBlends
Values:
-
enumerator
Draw
No rendering of unfixed blends.
-
enumerator
DoNotDraw
Unfixed blends are rendered.
-
enumerator
ByAttribute
Unfixed blends are rendered as defined by the blend attribute.
-
enumerator
-
enum class
Visibility
Values:
-
enumerator
DoNotEvaluate
Visibility information is not evaluated.
-
enumerator
NoHidden
Hidden lines are not drawn.
-
enumerator
MarkHiddenAsInvisible
Hidden lines are drawn and marked as invisible.
-
enumerator
Draft
Hidden lines and distinguish between those hidden by lines and those hidden by faces.
-
enumerator
Custom
Evaluate visibility based on the options passed to LineTessellationKit::SetVisibilityEvaluation()
-
enumerator
-
class
Hatching
Public Types
-
enum class
Parametric
Values:
-
enumerator
NoHatching
No hatching.
-
enumerator
ByAttribute
Hatch faces which have parametric hatch attributes.
-
enumerator
ByVectorNoLocking
Hatch faces by vector. The parametric position is not locked to a point.
-
enumerator
ByVector
Hatch faces by vector.
-
enumerator
-
enum class
-
enum class
-
class
LineTessellationKit
: public HPS::SprocketKit The LineTessellationKit class is a user space object. It contains settings controlling what and how data is imported via Parasolid.
Public Functions
-
virtual bool
Empty
() const Indicates whether this LineTessellationKit has any values set on it.
Returns: true if no values are set on this LineTessellationKit, false otherwise.
-
bool
Equals
(LineTessellationKit const &in_kit) const Check if the source LineTessellationKit is equivalent to this LineTessellationKit.
Parameters: in_kit – The source LineTessellationKit to compare to this LineTessellationKit. Returns: true if the objects are equivalent, false otherwise.
-
LineTessellationKit
() The default constructor creates an empty LineTessellationKit object.
-
LineTessellationKit
(LineTessellationKit &&in_that) The move constructor creates an LineTessellationKit by transferring the underlying impl of the rvalue reference to this LineTessellationKit thereby avoiding a copy and allocation.
Parameters: in_that – An rvalue reference to an LineTessellationKit to take the impl from.
-
LineTessellationKit
(LineTessellationKit const &in_kit) The copy constructor creates a new LineTessellationKit object that contains the same settings as the source LineTessellationKit.
Parameters: in_kit – The source LineTessellationKit to copy.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
bool
operator!=
(LineTessellationKit const &in_kit) const Check if the source LineTessellationKit is not equivalent to this LineTessellationKit.
Parameters: in_kit – The source LineTessellationKit to compare to this LineTessellationKit. Returns: true if the objects are not equivalent, false otherwise.
-
LineTessellationKit &
operator=
(LineTessellationKit &&in_that) The move assignment operator transfers the underlying impl of the rvalue reference to this LineTessellationKit thereby avoiding a copy.
Parameters: in_that – An rvalue reference to an LineTessellationKit to take the impl from. Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
operator=
(LineTessellationKit const &in_kit) Copies the source LineTessellationKit into this LineTessellationKit.
Parameters: in_kit – The source LineTessellationKit to copy. Returns: A reference to this LineTessellationKit.
-
bool
operator==
(LineTessellationKit const &in_kit) const Check if the source LineTessellationKit is equivalent to this LineTessellationKit.
Parameters: in_kit – The source LineTessellationKit to compare to this LineTessellationKit. Returns: true if the objects are equivalent, false otherwise.
-
void
Set
(LineTessellationKit const &in_kit) Copies the source LineTessellationKit into this LineTessellationKit.
Parameters: in_kit – The source LineTessellationKit to copy.
-
LineTessellationKit &
SetBCurveRenderingMethod
(Line::BCurveRendering in_bcurve_rendering_method) Sets the method used to render bcurves
Parameters: in_bcurve_rendering_method – the method used to render bcurves. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.bcurve. Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetChordTolerance
(double in_chord_tolerance, double in_maximum_chord_length, double in_maximum_chord_angle) Sets chord tolerance.
Parameters: - in_chord_tolerance – curve chordal tolerance between a curve and chord edges. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.curve_chord_tol.
- in_maximum_chord_length – maximum chord length. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.curve_chord_max.
- in_maximum_chord_angle – maximum chord angle, in radians. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.curve_chord_ang.
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetEdges
(bool in_draw_edges, bool in_internal_edges) Sets whether edges are drawn.
Parameters: - in_draw_edges – whether edges are drawn. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.edge.
- in_internal_edges – whether edges are drawn. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.internal.
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetHierarchicalOutput
(Line::Hierarchical in_hierarchical_output) Sets whether a hierarchical output is produced
Parameters: in_hierarchical_output – whether a hierarchical output is produced. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.hierarch. Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetIgnoreCriteria
(bool in_ignore, Ignore in_ignore_criteria = Ignore::Absolute, double in_minimum_value = 0) Sets criteria for ignoring lines.
Parameters: - in_ignore – whether any line should be ignored.
- in_ignore_criteria – specifies how to interpret the minimum_value parameter. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.ignore.
- in_minimum_value – minimum value for a facet not to be ignored. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.ignore_value.
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetMemoryLimit
(bool in_use_memory_limit, size_t in_limit = 0) Sets whether a memory limit should be used for rendering lines
Parameters: - in_use_memory_limit – whether a memory limit should be used for rendering lines. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.memory_target.
- in_limit – the memory limits, in bytes. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.memory_target_value.
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetMissingGeometryFailure
(bool in_fail_on_missing_geometry) Sets the behavior the import assumes when it encounters missing geometry
Parameters: in_fail_on_missing_geometry – whether the importer should fail when encountering missing geometry. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.ske_missing. Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetOverlappingBehavior
(Line::OverlappingBehavior in_overlapping_behavior, IntArray in_indices_one = IntArray(), IntArray in_indices_two = IntArray()) Sets the behavior the import assumes when it encounters overlapping curves
Parameters: - in_overlapping_behavior – the behavior the import assumes when it encounters overlapping curves. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.overlap.
- in_indices_one – array of body occurrences used for clashing. Only relevant if in_overlapping_behavior equals AllowAndIntersectAll or AllowAndIntersectPairs. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.overlap_indices1.
- in_indices_two – array of body occurrences used for clashing. Only relevant if in_overlapping_behavior equals AllowAndIntersectAll or AllowAndIntersectPairs. Corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.overlap_indices2.
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetParametricHatching
(Line::Hatching::Parametric in_parametric_hatching, double in_u = 0, double in_u_start = 0, double in_v = 0, double in_v_start = 0) Sets parametric hatching tessellation options
Parameters: - in_parametric_hatching – the type of parametric hatching desired. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.param.
- in_u – hatch spacing in u direction. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.param_u. Only relevant if in_parametric_hatching equals to either ByVectorNoLocking or ByVector
- in_u_start – start value for parametric hatching in the u direction. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.param_u_start. Only relevant if in_planar_hatching equals to either ByVectorNoLocking or ByVector
- in_v – hatch spacing in v direction. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.param_v. Only relevant if in_parametric_hatching equals to either ByVectorNoLocking or ByVector
- in_v_start – start value for parametric hatching in the v direction. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.param_v_start. Only relevant if in_planar_hatching equals to either ByVectorNoLocking or ByVector
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetPlanarHatching
(Line::Hatching::Planar in_planar_haching, double in_planar_spacing = 0, DPoint in_point_through = DPoint(0, 0, 0), DVector in_direction = DVector(0, 0, 0)) Sets planar hatching tessellation options
Parameters: - in_planar_haching – the type of planar hatching desired. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.planar.
- in_planar_spacing – distance between panes. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.planar_spacing.
- in_point_through – used with in_direction to determine the axis for planar hatching. Only relevant if in_planar_hatching equals to either ByVectorNoLocking or ByVector
- in_direction – used with in_point_through to determine the axis for planar hatching. Only relevant if in_planar_hatching equals to either ByVectorNoLocking or ByVector
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetRadialHatching
(Line::Hatching::Radial in_radial_hatching, double in_around = 0, double in_around_start = 0, double in_along = 0, double in_along_start = 0, double in_about = 0, double in_about_start = 0) Sets radial hatching tessellation options
Parameters: - in_radial_hatching – the type of radial hatching desired. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.radial.
- in_around – angular spacing around spine. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.radial_around. Only relevant if in_radial_hatching equals to either ByVectorNoLocking or ByVector
- in_around_start – starting value for angular spacing around spine. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.radial_around_start. Only relevant if in_radial_hatching equals to either ByVectorNoLocking or ByVector
- in_along – spacing along spine. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.radial_along. Only relevant if in_radial_hatching equals to either ByVectorNoLocking or ByVector
- in_along_start – starting value for angular spacing along spine. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.radial_along_start. Only relevant if in_radial_hatching equals to either ByVectorNoLocking or ByVector
- in_about – spacing about spine. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.radial_about. Only relevant if in_radial_hatching equals to either ByVectorNoLocking or ByVector
- in_about_start – starting value for angular spacing about spine. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.radial_about_start. Only relevant if in_radial_hatching equals to either ByVectorNoLocking or ByVector
Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetRegionalData
(Line::Region in_region) Sets whether regional data is produced.
Parameters: in_region – whether regional data is produced. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.region. Returns: A reference to this LineTessellationKit.
-
LineTessellationKit &
SetSilhouetteEdges
(bool in_draw_silhouette_edges, bool in_draw_circles_as_arcs) Sets whether silhouette edges are drawn. This corresponds to the value that will be passed to PK_TOPOL_render_line_o_t.silhouette.
-
virtual bool
-
enum class