[MOD] JtReader.cpp clean (#14624)

* [MOD] JtReader.cpp clean

clean

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
mosfet80
2024-06-17 18:20:34 +02:00
committed by GitHub
parent 13c5ddbb6c
commit ef654fc60a

View File

@@ -439,7 +439,6 @@ void insertShapeFaces(JtkShape* partShape)
return;
}
if (vertex && (vertexCount > 0) && normal && (normCount > 0)) {
for (int i = 0; i < vertexCount - 2; i++) {
SimpleMeshFacet temp;
@@ -457,15 +456,6 @@ void insertShapeFaces(JtkShape* partShape)
temp.p3[2] = vertex[i * 3 + 8];
result.push_back(temp);
/*
file << " facet normal "<< normal[i*3+0] << " " << normal[i*3+1] << " "
<< normal[i*3+2] << " " << endl; file << " outer loop" << endl; file << "
vertex " << vertex[i*3+0] << " " << vertex[i*3+1] << " " << vertex[i*3+2] << " "
<< endl; file << " vertex " << vertex[i*3+3] << " " << vertex[i*3+4] << " "
<< vertex[i*3+5] << " " << endl; file << " vertex " << vertex[i*3+6] << " "
<< vertex[i*3+7] << " " << vertex[i*3+8] << " " << endl; file << " endloop" <<
endl; file << " endfacet" << endl;
*/
}
}
#ifdef _DEBUG
@@ -505,34 +495,32 @@ int myPreactionCB_CollectFacets(JtkHierarchy* CurrNode, int level, JtkClientData
case JtkEntity::JtkPART: {
{
JtkTransform* partXform = NULL;
((JtkPart*)CurrNode)->getTransform(partXform);
if (partXform) {
printXform(partXform, level + 1);
JtkTransform* partXform = NULL;
((JtkPart*)CurrNode)->getTransform(partXform);
if (partXform) {
printXform(partXform, level + 1);
}
int partNumShapeLODs = -1;
partNumShapeLODs = ((JtkPart*)CurrNode)->numPolyLODs();
for (int lod = 0; lod < partNumShapeLODs; lod++) {
indent(level + 1);
InfoOut << "LOD#" << lod << ":\n";
if (iLod != lod && iLod != -1) {
continue;
}
int partNumShapeLODs = -1;
partNumShapeLODs = ((JtkPart*)CurrNode)->numPolyLODs();
for (int lod = 0; lod < partNumShapeLODs; lod++) {
indent(level + 1);
InfoOut << "LOD#" << lod << ":\n";
int partNumShapes = -1;
partNumShapes = ((JtkPart*)CurrNode)->numPolyShapes(lod);
for (int shNum = 0; shNum < partNumShapes; shNum++) {
indent(level + 2);
InfoOut << "Shape#" << shNum << ":\n";
if (iLod != lod && iLod != -1) {
continue;
}
int partNumShapes = -1;
partNumShapes = ((JtkPart*)CurrNode)->numPolyShapes(lod);
for (int shNum = 0; shNum < partNumShapes; shNum++) {
indent(level + 2);
InfoOut << "Shape#" << shNum << ":\n";
JtkShape* partShape = NULL;
((JtkPart*)CurrNode)->getPolyShape(partShape, lod, shNum);
if (partShape) {
insertShapeFaces(partShape);
}
JtkShape* partShape = NULL;
((JtkPart*)CurrNode)->getPolyShape(partShape, lod, shNum);
if (partShape) {
insertShapeFaces(partShape);
}
}
}
@@ -543,18 +531,15 @@ int myPreactionCB_CollectFacets(JtkHierarchy* CurrNode, int level, JtkClientData
InfoOut << CurrNode->name() << "(" << ((JtkAssembly*)CurrNode)->numChildren()
<< " children)\n";
{
JtkTransform* partXform = NULL;
((JtkPart*)CurrNode)->getTransform(partXform);
if (partXform) {}
}
JtkTransform* partXform = NULL;
((JtkPart*)CurrNode)->getTransform(partXform);
} break;
case JtkEntity::JtkINSTANCE: {
{
JtkTransform* partXform = NULL;
((JtkPart*)CurrNode)->getTransform(partXform);
if (partXform) {}
}
} break;
}
@@ -635,9 +620,6 @@ void readFile(const char* FileName, int iLods)
else {
throw "Unable to create JtkCADImporter. Check license...\n";
}
// Uninitialize JtTk
// JtkEntityFactory::fini();
}