HPS::Parasolid::Component

class HPS::Parasolid::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
  • in_facet_options – The facet tessellation options to use to generate the new tessellation for this Component.

  • in_line_options – The line tessellation options to use to generate the new tessellation for this Component.

virtual ~Component()

Releases a reference to this Component. The Component will not be deleted unless the final reference is destroyed.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::ParasolidComponent