Warning fixes.

This commit is contained in:
Leonardo Zide 2019-05-28 11:10:21 -07:00
parent e45fe81ace
commit 0d1af47be4
3 changed files with 69 additions and 69 deletions

View file

@ -82,7 +82,7 @@ void lcPartSelectionListModel::Redraw()
beginResetModel(); beginResetModel();
for (int PartIdx = 0; PartIdx < mParts.size(); PartIdx++) for (size_t PartIdx = 0; PartIdx < mParts.size(); PartIdx++)
mParts[PartIdx].second = QPixmap(); mParts[PartIdx].second = QPixmap();
endResetModel(); endResetModel();
@ -207,7 +207,7 @@ void lcPartSelectionListModel::SetFilter(const QString& Filter)
{ {
mFilter = Filter.toLatin1(); mFilter = Filter.toLatin1();
for (int PartIdx = 0; PartIdx < mParts.size(); PartIdx++) for (size_t PartIdx = 0; PartIdx < mParts.size(); PartIdx++)
{ {
PieceInfo* Info = mParts[PartIdx].first; PieceInfo* Info = mParts[PartIdx].first;
bool Visible; bool Visible;
@ -251,7 +251,7 @@ int lcPartSelectionListModel::rowCount(const QModelIndex& Parent) const
QVariant lcPartSelectionListModel::data(const QModelIndex& Index, int Role) const QVariant lcPartSelectionListModel::data(const QModelIndex& Index, int Role) const
{ {
int InfoIndex = Index.row(); size_t InfoIndex = Index.row();
if (Index.isValid() && InfoIndex < mParts.size()) if (Index.isValid() && InfoIndex < mParts.size())
{ {
@ -318,7 +318,7 @@ void lcPartSelectionListModel::RequestPreview(int InfoIndex)
void lcPartSelectionListModel::PartLoaded(PieceInfo* Info) void lcPartSelectionListModel::PartLoaded(PieceInfo* Info)
{ {
for (int PartIdx = 0; PartIdx < mParts.size(); PartIdx++) for (size_t PartIdx = 0; PartIdx < mParts.size(); PartIdx++)
{ {
if (mParts[PartIdx].first == Info) if (mParts[PartIdx].first == Info)
{ {
@ -416,7 +416,7 @@ void lcPartSelectionListModel::SetIconSize(int Size)
beginResetModel(); beginResetModel();
for (int PartIdx = 0; PartIdx < mParts.size(); PartIdx++) for (size_t PartIdx = 0; PartIdx < mParts.size(); PartIdx++)
mParts[PartIdx].second = QPixmap(); mParts[PartIdx].second = QPixmap();
endResetModel(); endResetModel();

View file

@ -551,42 +551,42 @@ void lcSynthInfo::AddFlexHoseParts(lcMemFile& File, lcLibraryMeshData& MeshData,
const lcLibraryMeshVertex OutsideSectionVertices[16] = const lcLibraryMeshVertex OutsideSectionVertices[16] =
{ {
{ lcVector3( 4.00000f, 0.0f, 0.00000f), lcVector3( 1.000000f, 0.0f, 0.000000f), 4.0f }, { lcVector3( 4.00000f, 0.0f, 0.00000f), lcVector3( 1.000000f, 0.0f, 0.000000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 3.69552f, 0.0f, 1.53073f), lcVector3( 0.923880f, 0.0f, 0.382683f), 4.0f }, { lcVector3( 3.69552f, 0.0f, 1.53073f), lcVector3( 0.923880f, 0.0f, 0.382683f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.82843f, 0.0f, 2.82843f), lcVector3( 0.707107f, 0.0f, 0.707107f), 4.0f }, { lcVector3( 2.82843f, 0.0f, 2.82843f), lcVector3( 0.707107f, 0.0f, 0.707107f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 1.53073f, 0.0f, 3.69552f), lcVector3( 0.382683f, 0.0f, 0.923880f), 4.0f }, { lcVector3( 1.53073f, 0.0f, 3.69552f), lcVector3( 0.382683f, 0.0f, 0.923880f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.00000f, 0.0f, 4.00000f), lcVector3( 0.000000f, 0.0f, 1.000000f), 4.0f }, { lcVector3( 0.00000f, 0.0f, 4.00000f), lcVector3( 0.000000f, 0.0f, 1.000000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-1.53073f, 0.0f, 3.69552f), lcVector3(-0.382683f, 0.0f, 0.923880f), 4.0f }, { lcVector3(-1.53073f, 0.0f, 3.69552f), lcVector3(-0.382683f, 0.0f, 0.923880f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.82843f, 0.0f, 2.82843f), lcVector3(-0.707107f, 0.0f, 0.707107f), 4.0f }, { lcVector3(-2.82843f, 0.0f, 2.82843f), lcVector3(-0.707107f, 0.0f, 0.707107f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-3.69552f, 0.0f, 1.53073f), lcVector3(-0.923880f, 0.0f, 0.382683f), 4.0f }, { lcVector3(-3.69552f, 0.0f, 1.53073f), lcVector3(-0.923880f, 0.0f, 0.382683f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-4.00000f, 0.0f, 0.00000f), lcVector3(-1.000000f, 0.0f, 0.000000f), 4.0f }, { lcVector3(-4.00000f, 0.0f, 0.00000f), lcVector3(-1.000000f, 0.0f, 0.000000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-3.69552f, 0.0f, -1.53073f), lcVector3(-0.923879f, 0.0f, -0.382684f), 4.0f }, { lcVector3(-3.69552f, 0.0f, -1.53073f), lcVector3(-0.923879f, 0.0f, -0.382684f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.82843f, 0.0f, -2.82843f), lcVector3(-0.707107f, 0.0f, -0.707107f), 4.0f }, { lcVector3(-2.82843f, 0.0f, -2.82843f), lcVector3(-0.707107f, 0.0f, -0.707107f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-1.53073f, 0.0f, -3.69552f), lcVector3(-0.382683f, 0.0f, -0.923880f), 4.0f }, { lcVector3(-1.53073f, 0.0f, -3.69552f), lcVector3(-0.382683f, 0.0f, -0.923880f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.00000f, 0.0f, -4.00000f), lcVector3( 0.000000f, 0.0f, -1.000000f), 4.0f }, { lcVector3( 0.00000f, 0.0f, -4.00000f), lcVector3( 0.000000f, 0.0f, -1.000000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 1.53073f, 0.0f, -3.69552f), lcVector3( 0.382684f, 0.0f, -0.923879f), 4.0f }, { lcVector3( 1.53073f, 0.0f, -3.69552f), lcVector3( 0.382684f, 0.0f, -0.923879f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.82843f, 0.0f, -2.82843f), lcVector3( 0.707107f, 0.0f, -0.707107f), 4.0f }, { lcVector3( 2.82843f, 0.0f, -2.82843f), lcVector3( 0.707107f, 0.0f, -0.707107f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 3.69552f, 0.0f, -1.53073f), lcVector3( 0.923880f, 0.0f, -0.382683f), 4.0f }, { lcVector3( 3.69552f, 0.0f, -1.53073f), lcVector3( 0.923880f, 0.0f, -0.382683f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
}; };
const lcLibraryMeshVertex InsideSectionVertices[16] = const lcLibraryMeshVertex InsideSectionVertices[16] =
{ {
{ lcVector3( 2.00000f, 0.0f, 0.00000f), lcVector3(-1.00000f, 0.0f, 0.00000f), 4.0f }, { lcVector3( 2.00000f, 0.0f, 0.00000f), lcVector3(-1.00000f, 0.0f, 0.00000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 1.84776f, 0.0f, 0.76536f), lcVector3(-0.92388f, 0.0f, -0.38268f), 4.0f }, { lcVector3( 1.84776f, 0.0f, 0.76536f), lcVector3(-0.92388f, 0.0f, -0.38268f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 1.41421f, 0.0f, 1.41421f), lcVector3(-0.70710f, 0.0f, -0.70710f), 4.0f }, { lcVector3( 1.41421f, 0.0f, 1.41421f), lcVector3(-0.70710f, 0.0f, -0.70710f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.76536f, 0.0f, 1.84776f), lcVector3(-0.38268f, 0.0f, -0.92388f), 4.0f }, { lcVector3( 0.76536f, 0.0f, 1.84776f), lcVector3(-0.38268f, 0.0f, -0.92388f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.00000f, 0.0f, 2.00000f), lcVector3( 0.00000f, 0.0f, -1.00000f), 4.0f }, { lcVector3( 0.00000f, 0.0f, 2.00000f), lcVector3( 0.00000f, 0.0f, -1.00000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-0.76536f, 0.0f, 1.84776f), lcVector3( 0.38268f, 0.0f, -0.92388f), 4.0f }, { lcVector3(-0.76536f, 0.0f, 1.84776f), lcVector3( 0.38268f, 0.0f, -0.92388f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-1.41421f, 0.0f, 1.41421f), lcVector3( 0.70710f, 0.0f, -0.70710f), 4.0f }, { lcVector3(-1.41421f, 0.0f, 1.41421f), lcVector3( 0.70710f, 0.0f, -0.70710f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-1.84776f, 0.0f, 0.76536f), lcVector3( 0.92388f, 0.0f, -0.38268f), 4.0f }, { lcVector3(-1.84776f, 0.0f, 0.76536f), lcVector3( 0.92388f, 0.0f, -0.38268f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.00000f, 0.0f, 0.00000f), lcVector3( 1.00000f, 0.0f, 0.00000f), 4.0f }, { lcVector3(-2.00000f, 0.0f, 0.00000f), lcVector3( 1.00000f, 0.0f, 0.00000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-1.84776f, 0.0f, -0.76536f), lcVector3( 0.92387f, 0.0f, 0.38268f), 4.0f }, { lcVector3(-1.84776f, 0.0f, -0.76536f), lcVector3( 0.92387f, 0.0f, 0.38268f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-1.41421f, 0.0f, -1.41421f), lcVector3( 0.70710f, 0.0f, 0.70710f), 4.0f }, { lcVector3(-1.41421f, 0.0f, -1.41421f), lcVector3( 0.70710f, 0.0f, 0.70710f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-0.76536f, 0.0f, -1.84776f), lcVector3( 0.38268f, 0.0f, 0.92388f), 4.0f }, { lcVector3(-0.76536f, 0.0f, -1.84776f), lcVector3( 0.38268f, 0.0f, 0.92388f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.00000f, 0.0f, -2.00000f), lcVector3( 0.00000f, 0.0f, 1.00000f), 4.0f }, { lcVector3( 0.00000f, 0.0f, -2.00000f), lcVector3( 0.00000f, 0.0f, 1.00000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.76536f, 0.0f, -1.84776f), lcVector3(-0.38268f, 0.0f, 0.92387f), 4.0f }, { lcVector3( 0.76536f, 0.0f, -1.84776f), lcVector3(-0.38268f, 0.0f, 0.92387f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 1.41421f, 0.0f, -1.41421f), lcVector3(-0.70710f, 0.0f, 0.70710f), 4.0f }, { lcVector3( 1.41421f, 0.0f, -1.41421f), lcVector3(-0.70710f, 0.0f, 0.70710f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 1.84776f, 0.0f, -0.76536f), lcVector3(-0.92388f, 0.0f, 0.38268f), 4.0f }, { lcVector3( 1.84776f, 0.0f, -0.76536f), lcVector3(-0.92388f, 0.0f, 0.38268f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
}; };
auto AddSectionVertices = [&MeshData, &Sections](const lcLibraryMeshVertex* SectionVertices, int NumSectionVertices) auto AddSectionVertices = [&MeshData, &Sections](const lcLibraryMeshVertex* SectionVertices, int NumSectionVertices)
@ -712,36 +712,36 @@ void lcSynthInfo::AddFlexibleAxleParts(lcMemFile& File, lcLibraryMeshData& MeshD
File.WriteBuffer(Line, strlen(Line)); File.WriteBuffer(Line, strlen(Line));
} }
lcLibraryMeshVertex SectionVertices[28] = const lcLibraryMeshVertex SectionVertices[28] =
{ {
{ lcVector3(-6.000f, 0.0f, 0.000f), lcVector3(-1.000f, 0.0f, 0.000f), 2.0f }, { lcVector3(-6.000f, 0.0f, 0.000f), lcVector3(-1.000f, 0.0f, 0.000f), 2.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-5.602f, 0.0f, 2.000f), lcVector3(-0.942f, 0.0f, 0.336f), 4.0f }, { lcVector3(-5.602f, 0.0f, 2.000f), lcVector3(-0.942f, 0.0f, 0.336f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-5.602f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f }, { lcVector3(-5.602f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f }, { lcVector3(-2.000f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, 2.000f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3(-2.000f, 0.0f, 2.000f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, 5.602f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3(-2.000f, 0.0f, 5.602f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, 5.602f), lcVector3(-0.336f, 0.0f, 0.942f), 4.0f }, { lcVector3(-2.000f, 0.0f, 5.602f), lcVector3(-0.336f, 0.0f, 0.942f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.000f, 0.0f, 6.000f), lcVector3( 0.000f, 0.0f, 1.000f), 2.0f }, { lcVector3( 0.000f, 0.0f, 6.000f), lcVector3( 0.000f, 0.0f, 1.000f), 2.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, 5.602f), lcVector3( 0.336f, 0.0f, 0.942f), 4.0f }, { lcVector3( 2.000f, 0.0f, 5.602f), lcVector3( 0.336f, 0.0f, 0.942f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, 5.602f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3( 2.000f, 0.0f, 5.602f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, 2.000f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3( 2.000f, 0.0f, 2.000f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f }, { lcVector3( 2.000f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 5.602f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f }, { lcVector3( 5.602f, 0.0f, 2.000f), lcVector3( 0.000f, 0.0f, 1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 5.602f, 0.0f, 2.000f), lcVector3( 0.942f, 0.0f, 0.336f), 4.0f }, { lcVector3( 5.602f, 0.0f, 2.000f), lcVector3( 0.942f, 0.0f, 0.336f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 6.000f, 0.0f, 0.000f), lcVector3( 1.000f, 0.0f, 0.000f), 2.0f }, { lcVector3( 6.000f, 0.0f, 0.000f), lcVector3( 1.000f, 0.0f, 0.000f), 2.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 5.602f, 0.0f, -2.000f), lcVector3( 0.942f, 0.0f, -0.336f), 4.0f }, { lcVector3( 5.602f, 0.0f, -2.000f), lcVector3( 0.942f, 0.0f, -0.336f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 5.602f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f }, { lcVector3( 5.602f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f }, { lcVector3( 2.000f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, -2.000f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3( 2.000f, 0.0f, -2.000f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, -5.602f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3( 2.000f, 0.0f, -5.602f), lcVector3( 1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 2.000f, 0.0f, -5.602f), lcVector3( 0.336f, 0.0f, -0.942f), 4.0f }, { lcVector3( 2.000f, 0.0f, -5.602f), lcVector3( 0.336f, 0.0f, -0.942f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3( 0.000f, 0.0f, -6.000f), lcVector3( 0.000f, 0.0f, -1.000f), 2.0f }, { lcVector3( 0.000f, 0.0f, -6.000f), lcVector3( 0.000f, 0.0f, -1.000f), 2.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, -5.602f), lcVector3(-0.336f, 0.0f, -0.942f), 4.0f }, { lcVector3(-2.000f, 0.0f, -5.602f), lcVector3(-0.336f, 0.0f, -0.942f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, -5.602f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3(-2.000f, 0.0f, -5.602f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, -2.000f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f }, { lcVector3(-2.000f, 0.0f, -2.000f), lcVector3(-1.000f, 0.0f, 0.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-2.000f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f }, { lcVector3(-2.000f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-5.602f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f }, { lcVector3(-5.602f, 0.0f, -2.000f), lcVector3( 0.000f, 0.0f, -1.000f), 4.0f, lcVector2(0.0f, 0.0f), 0 },
{ lcVector3(-5.602f, 0.0f, -2.000f), lcVector3(-0.942f, 0.0f, -0.336f), 4.0f } { lcVector3(-5.602f, 0.0f, -2.000f), lcVector3(-0.942f, 0.0f, -0.336f), 4.0f, lcVector2(0.0f, 0.0f), 0 }
}; };
const int NumSectionVertices = sizeof(SectionVertices) / sizeof(SectionVertices[0]); const int NumSectionVertices = sizeof(SectionVertices) / sizeof(SectionVertices[0]);

View file

@ -2443,12 +2443,12 @@ void Project::ExportWavefront(const QString& FileName)
OBJFile.WriteLine("#\n\n"); OBJFile.WriteLine("#\n\n");
} }
for (int PartIdx = 0; PartIdx < ModelParts.size(); PartIdx++) int NumPieces = 0;
for (const lcModelPartsEntry& ModelPart : ModelParts)
{ {
sprintf(Line, "g Piece%.3d\n", PartIdx); sprintf(Line, "g Piece%.3d\n", NumPieces++);
OBJFile.WriteLine(Line); OBJFile.WriteLine(Line);
const lcModelPartsEntry& ModelPart = ModelParts[PartIdx];
lcMesh* Mesh = !ModelPart.Mesh ? ModelPart.Info->GetMesh() : ModelPart.Mesh; lcMesh* Mesh = !ModelPart.Mesh ? ModelPart.Info->GetMesh() : ModelPart.Mesh;
if (Mesh) if (Mesh)