You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Interface/FITKInterfaceMeshGen/FITKGeometryMeshSize.cpp

67 lines
1.8 KiB
C++

#include "FITKGeometryMeshSize.h"
#include "FITK_Kernel/FITKCore/FITKDataRepo.h"
#include "FITK_Interface/FITKInterfaceModel/FITKAbstractGeoModel.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoShapeAgent.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoCommand.h"
namespace Interface
{
void FITKGeometryMeshSize::setGeoGroupComponentId(int geoComponentId)
{
//设置组件
_geoGroupComponentId = geoComponentId;
}
int FITKGeometryMeshSize::getGeoGroupComponentId()
{
//获取组件Id
return _geoGroupComponentId;
}
Interface::FITKGeoComponent* FITKGeometryMeshSize::getGeoComponent()
{
//获取组件数据对象
return FITKDATAREPO->getTDataByID<FITKGeoComponent>(_geoGroupComponentId);
}
Interface::FITKAbsGeoCommand* FITKGeometryMeshSize::getGeoModel()
{
//获取组件对应的模型
Interface::FITKGeoComponent* componentGeo = this->getGeoComponent();
if (!componentGeo)return nullptr;
Interface::FITKAbsGeoShapeAgent* shape = dynamic_cast<Interface::FITKAbsGeoShapeAgent*>(componentGeo->getAbstractModel());
if (!shape)return nullptr;
return shape->getGeoCommand();
}
void FITKGeometryMeshSize::setLayerNumber(int number)
{
_layerNum = number;
}
int FITKGeometryMeshSize::getLayerNumber()
{
return _layerNum;
}
void FITKGeometryMeshSize::setExpansionRatio(double expansionRatio)
{
_expansionRatio = expansionRatio;
}
double FITKGeometryMeshSize::getExpansionRatio()
{
return _expansionRatio;
}
void FITKGeometryMeshSize::setLayerThickness(double layerThickness)
{
_layerThickness = layerThickness;
}
double FITKGeometryMeshSize::getLayerThickness()
{
return _layerThickness;
}
}