3.5.0-rc1
Loading...
Searching...
No Matches
tigl::CCPACSDeckComponentBase Class Reference

Representing a CPACS <deck> element. More...

#include <CCPACSDeckComponentBase.h>

Inheritance diagram for tigl::CCPACSDeckComponentBase:

Data Structures

struct  MassCache

Public Member Functions

TIGL_EXPORT CCPACSDeckComponentBase (CCPACSCargoContainers *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSCeilingPanels *parent, CTiglUIDManager *uidMgr)
 Constructs a CCPACSDeckComponentBase.
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSClassDividers *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSGalleys *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSGenericFloorModules *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSLavatories *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSLuggageCompartments *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSSeatModules *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CCPACSDeckComponentBase (CCPACSSidewallPanels *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT boost::optional< CTiglPointGetCenterOfGravityGlobal () const
 Returns the center of gravity in the global coordinate system.
TIGL_EXPORT boost::optional< CTiglPointGetCenterOfGravityLocal () const
 Returns the center of gravity in the component's local coordinate system.
TIGL_EXPORT TiglGeometricComponentIntent GetComponentIntent () const override
 Returns the TiGL geometric component intent.
TIGL_EXPORT TiglGeometryRepresentation GetComponentRepresentation () const
 Returns the geometric representation type of the referenced deck element.
TIGL_EXPORT std::string GetComponentRepresentationAsString () const
 Returns the geometry representation of the referenced deck element as string.
TIGL_EXPORT TiglGeometricComponentType GetComponentType () const override
 Returns the TiGL geometric component type.
TIGL_EXPORT CCPACSConfiguration const & GetConfiguration () const
TIGL_EXPORT std::string GetDefaultedUID () const override
 Returns the component UID (defaulted if required).
TIGL_EXPORT boost::optional< double > GetMass () const
 Returns the component mass.
TIGL_EXPORT boost::optional< CTiglMassInertiaGetMassInertiaLocal () const
 Returns the mass inertia tensor components in the local coordinate system.
TIGL_EXPORT void ReadCPACS (const TixiDocumentHandle &tixiHandle, const std::string &objectXPath) override
 Reads the CPACS subtree of this component.
Public Member Functions inherited from tigl::generated::CPACSDeckComponentBase
TIGL_EXPORT CPACSDeckComponentBase (CPACSCargoContainers *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSCeilingPanels *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSClassDividers *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSGalleys *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSGenericFloorModules *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSLavatories *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSLuggageCompartments *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSSeatModules *parent, CTiglUIDManager *uidMgr)
TIGL_EXPORT CPACSDeckComponentBase (CPACSSidewallPanels *parent, CTiglUIDManager *uidMgr)
virtual TIGL_EXPORT const std::string & GetDeckElementUID () const
virtual TIGL_EXPORT const boost::optional< std::string > & GetDescription () const
virtual TIGL_EXPORT const std::string & GetName () const
virtual TIGL_EXPORT CTiglUIDObjectGetNextUIDParent ()
virtual TIGL_EXPORT const CTiglUIDObjectGetNextUIDParent () const
template<typename P>
P * GetParent ()
template<typename P>
const P * GetParent () const
virtual TIGL_EXPORT boost::optional< CPACSDeckStructuralMounts > & GetStructuralMounts ()
virtual TIGL_EXPORT const boost::optional< CPACSDeckStructuralMounts > & GetStructuralMounts () const
virtual TIGL_EXPORT CPACSDeckStructuralMountsGetStructuralMounts (CreateIfNotExistsTag)
virtual TIGL_EXPORT boost::optional< CCPACSTransformation > & GetTransformation ()
virtual TIGL_EXPORT const boost::optional< CCPACSTransformation > & GetTransformation () const
virtual TIGL_EXPORT CCPACSTransformationGetTransformation (CreateIfNotExistsTag)
virtual TIGL_EXPORT const std::string & GetUID () const
TIGL_EXPORT CTiglUIDManagerGetUIDManager ()
TIGL_EXPORT const CTiglUIDManagerGetUIDManager () const
template<typename P>
bool IsParent () const
virtual TIGL_EXPORT void RemoveStructuralMounts ()
virtual TIGL_EXPORT void RemoveTransformation ()
virtual TIGL_EXPORT void SetDeckElementUID (const std::string &value)
virtual TIGL_EXPORT void SetDescription (const boost::optional< std::string > &value)
virtual TIGL_EXPORT void SetName (const std::string &value)
virtual TIGL_EXPORT void SetUID (const std::string &value)
virtual TIGL_EXPORT void WriteCPACS (const TixiDocumentHandle &tixiHandle, const std::string &xpath) const
virtual TIGL_EXPORT ~CPACSDeckComponentBase ()
Public Member Functions inherited from tigl::CTiglReqUIDObject
boost::optional< std::string > GetObjectUID () const
virtual ~CTiglReqUIDObject ()=default
Public Member Functions inherited from tigl::CTiglUIDObject
TIGL_EXPORT void Invalidate (const boost::optional< std::string > &source=boost::none) const
Public Member Functions inherited from tigl::ITiglUIDRefObject
virtual ~ITiglUIDRefObject ()=default
Public Member Functions inherited from tigl::CTiglRelativelyPositionedComponent
TIGL_EXPORT CTiglRelativelyPositionedComponent (MaybeOptionalPtr< std::string > parentUid, MaybeOptionalPtr< CCPACSTransformation > trans)
TIGL_EXPORT CTiglRelativelyPositionedComponent (MaybeOptionalPtr< std::string > parentUid, MaybeOptionalPtr< CCPACSTransformation > trans, boost::optional< TiglSymmetryAxis > *symmetryAxis)
TIGL_EXPORT CTiglRelativelyPositionedComponent (MaybeOptionalPtr< std::string > parentUid, MaybeOptionalPtr< CCPACSTransformationSE3 > trans)
TIGL_EXPORT CTiglRelativelyPositionedComponent (tigl::CTiglRelativelyPositionedComponent *parent, MaybeOptionalPtr< CCPACSTransformation > trans)
TIGL_EXPORT CTiglRelativelyPositionedComponent (tigl::CTiglRelativelyPositionedComponent *parent, MaybeOptionalPtr< CCPACSTransformation > trans, boost::optional< TiglSymmetryAxis > *symmetryAxis)
TIGL_EXPORT ChildContainerType GetChildren (bool recursive)
TIGL_EXPORT boost::optional< const std::string & > GetParentUID () const
virtual TIGL_EXPORT CTiglPoint GetRotation () const
virtual TIGL_EXPORT ECPACSTranslationType GetRotationType () const
virtual TIGL_EXPORT CTiglPoint GetScaling () const
virtual TIGL_EXPORT ECPACSTranslationType GetScalingType () const
TIGL_EXPORT TiglSymmetryAxis GetSymmetryAxis () const override
virtual TIGL_EXPORT CTiglTransformation GetTransformationMatrix () const
virtual TIGL_EXPORT CTiglPoint GetTranslation () const
virtual TIGL_EXPORT ECPACSTranslationType GetTranslationType () const
TIGL_EXPORT void Reset () const
TIGL_EXPORT void SetParentUID (const std::string &parentUID)
virtual TIGL_EXPORT void SetSymmetryAxis (const TiglSymmetryAxis &axis)
virtual TIGL_EXPORT void SetTransformation (const CCPACSTransformation &transform)
Public Member Functions inherited from tigl::CTiglAbstractGeometricComponent
 CTiglAbstractGeometricComponent ()
TIGL_EXPORT Bnd_Box const & GetBoundingBox () const
virtual TIGL_EXPORT bool GetIsOn (const gp_Pnt &pnt) const
TIGL_EXPORT bool GetIsOnMirrored (const gp_Pnt &pnt) const
TIGL_EXPORT PNamedShape GetLoft () const override
virtual TIGL_EXPORT PNamedShape GetMirroredLoft () const
TIGL_EXPORT void Reset () const
Public Member Functions inherited from tigl::ITiglGeometricComponent
virtual bool IsIndependentGeometry () const
virtual ~ITiglGeometricComponent ()

Protected Member Functions

virtual PNamedShape BuildLoft () const override
Protected Member Functions inherited from tigl::CTiglUIDObject
 ~CTiglUIDObject ()=default

Private Member Functions

PNamedShape BuildLocalLoft () const
void BuildMass (MassCache &cache) const
const CCPACSElementGeometryGetElementGeometry () const

Private Attributes

std::string _cpacsDocPath
Cache< MassCache, CCPACSDeckComponentBasem_mass
const CCPACSDecksDeckm_parentDeck

Additional Inherited Members

Public Types inherited from tigl::CTiglRelativelyPositionedComponent
typedef std::vector< CTiglRelativelyPositionedComponent * > ChildContainerType
Protected Types inherited from tigl::CTiglRelativelyPositionedComponent
typedef std::map< int, int > FusedElementsContainerType
Protected Attributes inherited from tigl::generated::CPACSDeckComponentBase
std::string m_deckElementUID
 UID of the corresponding element in the cpacs/vehicles/deckElemets node.
boost::optional< std::string > m_description
 Description.
std::string m_name
 Name.
void * m_parent
const std::type_info * m_parentType
boost::optional< CPACSDeckStructuralMountsm_structuralMounts
boost::optional< CCPACSTransformationm_transformation
std::string m_uID
CTiglUIDManagerm_uidMgr
Protected Attributes inherited from tigl::CTiglAbstractGeometricComponent
Cache< Bnd_Box, CTiglAbstractGeometricComponentbounding_box
Cache< PNamedShape, CTiglAbstractGeometricComponentloft

Detailed Description

Representing a CPACS <deck> element.

Mass properties:

  • The referenced element may define either an explicit mass or a density.
  • The mass returned represents the mass of the transformed component instance. If the component is subject to scaling when instantiated at deck level, the returned mass is scaled by the corresponding volume scale factor.
  • The center of gravity (CoG) can be given explicitly via CPACS location. If not provided, it is derived from the geometric centroid of the component.

Coordinate frames:

  • The local center of gravity and local mass inertia are expressed in the component's local coordinate system.

Constructor & Destructor Documentation

◆ CCPACSDeckComponentBase() [1/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSCeilingPanels * parent,
CTiglUIDManager * uidMgr )

Constructs a CCPACSDeckComponentBase.

Parameters
parentParent CPACS container owning this component.
uidMgrUID manager for resolving referenced deck elements.

◆ CCPACSDeckComponentBase() [2/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSClassDividers * parent,
CTiglUIDManager * uidMgr )

◆ CCPACSDeckComponentBase() [3/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSGalleys * parent,
CTiglUIDManager * uidMgr )

◆ CCPACSDeckComponentBase() [4/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSGenericFloorModules * parent,
CTiglUIDManager * uidMgr )

◆ CCPACSDeckComponentBase() [5/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSLavatories * parent,
CTiglUIDManager * uidMgr )

◆ CCPACSDeckComponentBase() [6/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSLuggageCompartments * parent,
CTiglUIDManager * uidMgr )

◆ CCPACSDeckComponentBase() [7/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSSeatModules * parent,
CTiglUIDManager * uidMgr )

◆ CCPACSDeckComponentBase() [8/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSSidewallPanels * parent,
CTiglUIDManager * uidMgr )

◆ CCPACSDeckComponentBase() [9/9]

TIGL_EXPORT tigl::CCPACSDeckComponentBase::CCPACSDeckComponentBase ( CCPACSCargoContainers * parent,
CTiglUIDManager * uidMgr )

Member Function Documentation

◆ BuildLocalLoft()

PNamedShape tigl::CCPACSDeckComponentBase::BuildLocalLoft ( ) const
private

◆ BuildLoft()

virtual PNamedShape tigl::CCPACSDeckComponentBase::BuildLoft ( ) const
overrideprotectedvirtual

◆ BuildMass()

void tigl::CCPACSDeckComponentBase::BuildMass ( MassCache & cache) const
private

◆ GetCenterOfGravityGlobal()

TIGL_EXPORT boost::optional< CTiglPoint > tigl::CCPACSDeckComponentBase::GetCenterOfGravityGlobal ( ) const

Returns the center of gravity in the global coordinate system.

The global CoG is obtained by applying the component transformation hierarchy to the local CoG.

Returns
Global CoG, or boost::none if unavailable.

◆ GetCenterOfGravityLocal()

TIGL_EXPORT boost::optional< CTiglPoint > tigl::CCPACSDeckComponentBase::GetCenterOfGravityLocal ( ) const

Returns the center of gravity in the component's local coordinate system.

If a CPACS location is provided, that value is used. Otherwise, the geometric centroid of the untransformed local component volume is computed.

If the center of gravity cannot be determined (e.g., missing mass definition or zero-volume geometry), boost::none is returned.

Returns
Local CoG (x, y, z), or boost::none if not available.

◆ GetComponentIntent()

TIGL_EXPORT TiglGeometricComponentIntent tigl::CCPACSDeckComponentBase::GetComponentIntent ( ) const
overridevirtual

Returns the TiGL geometric component intent.

Implements tigl::ITiglGeometricComponent.

◆ GetComponentRepresentation()

TIGL_EXPORT TiglGeometryRepresentation tigl::CCPACSDeckComponentBase::GetComponentRepresentation ( ) const

Returns the geometric representation type of the referenced deck element.

The representation is obtained from the referenced element geometry definition. It is returned as one of the TiGL constants TIGL_GEOMREP_PHYSICAL (1), TIGL_GEOMREP_ENVELOPE (2), or TIGL_GEOMREP_PLACEHOLDER (4). If no explicit representation is given in CPACS, TIGL_GEOMREP_PHYSICAL (1) is returned.

Returns
Geometry representation type of the component.

◆ GetComponentRepresentationAsString()

TIGL_EXPORT std::string tigl::CCPACSDeckComponentBase::GetComponentRepresentationAsString ( ) const

Returns the geometry representation of the referenced deck element as string.

Possible return values are:

  • "physical"
  • "envelope"
  • "placeholder"

If no explicit representation is given in CPACS, "physical" is returned.

Returns
Geometry representation as human-readable string.

◆ GetComponentType()

TIGL_EXPORT TiglGeometricComponentType tigl::CCPACSDeckComponentBase::GetComponentType ( ) const
overridevirtual

Returns the TiGL geometric component type.

Implements tigl::ITiglGeometricComponent.

◆ GetConfiguration()

TIGL_EXPORT CCPACSConfiguration const & tigl::CCPACSDeckComponentBase::GetConfiguration ( ) const

◆ GetDefaultedUID()

TIGL_EXPORT std::string tigl::CCPACSDeckComponentBase::GetDefaultedUID ( ) const
overridevirtual

Returns the component UID (defaulted if required).

Implements tigl::ITiglGeometricComponent.

◆ GetElementGeometry()

const CCPACSElementGeometry & tigl::CCPACSDeckComponentBase::GetElementGeometry ( ) const
private

◆ GetMass()

TIGL_EXPORT boost::optional< double > tigl::CCPACSDeckComponentBase::GetMass ( ) const

Returns the component mass.

The mass is obtained from the predefined deck element and represents the mass of the transformed component instance at deck level:

  • If an explicit mass is provided in CPACS, it is used as the reference mass.
  • Otherwise, if a density is provided, the reference mass is computed from the local component geometry volume.
  • The resulting reference mass is scaled by the transformation at deck level.
  • If neither mass nor density is available, no mass value is returned.
Returns
Component mass, or boost::none if the mass cannot be determined.

◆ GetMassInertiaLocal()

TIGL_EXPORT boost::optional< CTiglMassInertia > tigl::CCPACSDeckComponentBase::GetMassInertiaLocal ( ) const

Returns the mass inertia tensor components in the local coordinate system.

If a CPACS massInertia definition is present, its values are returned. Otherwise, boost::none is returned. Cross terms (Jxy, Jxz, Jyz) are optional as in the CPACS schema.

Returns
Local mass inertia components, or boost::none if not defined.

◆ ReadCPACS()

TIGL_EXPORT void tigl::CCPACSDeckComponentBase::ReadCPACS ( const TixiDocumentHandle & tixiHandle,
const std::string & objectXPath )
overridevirtual

Reads the CPACS subtree of this component.

Reimplemented from tigl::generated::CPACSDeckComponentBase.

Field Documentation

◆ _cpacsDocPath

std::string tigl::CCPACSDeckComponentBase::_cpacsDocPath
private

◆ m_mass

Cache<MassCache, CCPACSDeckComponentBase> tigl::CCPACSDeckComponentBase::m_mass
private

◆ m_parentDeck

const CCPACSDecksDeck* tigl::CCPACSDeckComponentBase::m_parentDeck
private

The documentation for this class was generated from the following file: