#ifdef WIN32
#include <windows.h>
#endif
{
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
cube1->info()->SetName("FirstCube");
cube2->info()->SetName("SecondCube");
Dtk_transfo translate(
Dtk_dir(1, 0, 0),
Dtk_dir(0, 1, 0),
Dtk_dir(0, 0, 1),
Dtk_pnt(200, 0, 0));
cube2->Transform(translate);
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
CubeMesh->info()->SetName("MyMesh");
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
axis->SetName("MyAxisSystem");
axis->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"ANOTHERAXISSYSTEM"));
axis->info()->SetColor(255, 255, 0);
axis->SetMatrix(t);
return axis;
}
{
body->info()->SetName("MyReferencePlane");
body->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"MYPLANE"));
body->info()->SetColor(0, 255, 255);
body->AddOpenShell(shell);
return body;
}
{
body->info()->SetName("MyFixedRefPlane");
body->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"ANOTHERFIXEDPLANENAME"));
body->info()->SetColor(0, 0, 255);
body->AddOpenShell(shell);
double trim[] = { -10,10,-10,10 };
plane->SetTrimUVBox(trim);
return body;
}
{
body->info()->SetName("MyRefAxis");
body->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"ANOTHERAXISNAME"));
body->info()->SetColor(0, 255, 0);
body->AddOpenShell(shell);
shell->AddWire(tab);
return body;
}
{
body->info()->SetName("MyRefPoint");
body->info()->SetColor(255, 100, 0);
body->AddOpenShell(shell);
shell->AddWire(tab);
return body;
}
{
cube->info()->SetName("MyCube");
cube->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"SOLIDBODYNAME"));
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
if (!F)
{
std::cout <<
"error : " << parasolidfic.
c_str() <<
" does not exist";
}
fseek(F, 0, SEEK_END);
fseek(F, 0, SEEK_SET);
fread(&flux[0], 1, flux.
size(), F);
fclose(F);
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
if (!F)
{
std::cout <<
"error : " << jtfic.
c_str() <<
" does not exist";
}
fseek(F, 0, SEEK_END);
fseek(F, 0, SEEK_SET);
fread(&flux[0], 1, flux.
size(), F);
fclose(F);
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
const int maxlayer = 257;
selectable.
resize(maxlayer, 1);
int i;
for (i = 1; i < maxlayer; i++)
{
visible[i] = (i % 2);
selectable[i] = ((i % 3) != 0);
}
filter456->SelectLayers(lay456);
filter678->SelectLayers(lay678);
lay->SetDefaultLayer(12);
return lay;
}
{
Dtk_transfo translatescale(
Dtk_dir(20, 0, 0),
Dtk_dir(0, 20, 0),
Dtk_dir(0, 0, 20),
Dtk_pnt(150, 0, 0));
CylMesh->Transform(translatescale);
CubeBody->info()->SetLayer(5);
CylMesh->info()->SetLayer(6);
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
cube1->info()->SetName("FirstCube");
cube2->info()->SetName("SecondCube");
Dtk_transfo translate(
Dtk_dir(1, 0, 0),
Dtk_dir(0, 1, 0),
Dtk_dir(0, 0, 1),
Dtk_pnt(200, 0, 0));
cube2->Transform(translate);
CylMesh->info()->SetName("OneMesh");
Dtk_transfo translatescale(
Dtk_dir(10, 0, 0),
Dtk_dir(0, 10, 0),
Dtk_dir(0, 0, 10),
Dtk_pnt(-100, 0, 0));
CylMesh->Transform(translatescale);
WireBody->Transform(translatescale);
cube1->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub1\\"));
cube2->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub1\\\\GroupRoot\\Sub2\\"));
CylMesh->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub2\\"));
WireBody->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub2\\"));
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
cube1->info()->SetName("FirstCube");
cube2->info()->SetName("SecondCube");
Dtk_transfo translate(
Dtk_dir(1, 0, 0),
Dtk_dir(0, 1, 0),
Dtk_dir(0, 0, 1),
Dtk_pnt(200, 0, 0));
cube2->Transform(translate);
cube1->info()->AddAttribute(
"NXREFERENCESET",
Dtk_Val(
"MyRef1\\MyRef2\\MyRef3\\"));
cube2->info()->AddAttribute(
"NXREFERENCESET",
Dtk_Val(
"MyRef1\\MyRef3\\"));
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
meta->SetCategory(category);
return meta;
}
{
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
for (int i = 0; i < 217; i++)
{
}
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
if (!visible)
if (layer != -1)
return infos;
}
{
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
#ifdef USE_NX_READER
extern void nxreader_GetData(
const Dtk_string&,
void*&);
#define NX_RETRIEVE_ASSEMBLYDATA nxreader_GetData
#else
#define NX_RETRIEVE_ASSEMBLYDATA NULL
#endif
{
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
symb->Texts() = compotext;
double arrowlength = 5.5;
leader->GetInfo()->SetColor(
Dtk_RGB(0, 0, 255));
leader->GetInfo()->SetCurveThickNessInMM(0.7);
leader->GetInfo()->AddAttribute("NX_TextToLineGap", 10.0);
leader->GetInfo()->AddAttribute("NX_TextOverStubFactor", 0.1);
leader->GetInfo()->AddAttribute("NX_StubLength", 20.0);
leader->GetInfo()->AddAttribute("NX_StubSide", 1);
leader->GetInfo()->AddAttribute("NX_TextAlignment", 1);
leader->GetArrowHead().GetInfo()->AddAttribute("NX_ArrowAngle", 30.0);
leader->GetArrowHead().GetInfo()->AddAttribute("NX_DotDiameter", 1.5);
leader->GetArrowHead().GetInfo()->SetColor(
Dtk_RGB(255, 0, 255));
leader->GetArrowHead().GetInfo()->SetCurveThickNessInMM(2.0);
leader->GetArrowHead().GetInfo()->SetCurveLineType(
DTK_SOLIDLINE);
symb->AddLeader(leader);
pmi->info()->SetName("MyAnnot");
return pmi;
}
{
std::cout <<
"=> " << outputFileName.
c_str() << endl;
}
{
outputFileName = outputDirectory + L"simplebody.prt";
outputFileName = outputDirectory + L"twobodies.prt";
outputFileName = outputDirectory + L"mesh.prt";
errStatus =
UgwMesh(outputFileName, version);
outputFileName = outputDirectory + L"wire.prt";
errStatus =
UgwWire(outputFileName, version);
outputFileName = outputDirectory + L"refs.prt";
outputFileName = outputDirectory + L"extparasolid.prt";
errStatus =
UgwExternParasolid(outputFileName, outputDirectory +
"../../../Parasolid/extparasolid.x_t", version);
outputFileName = outputDirectory + L"extjt.prt";
errStatus =
UgwExternJTMesh(outputFileName, outputDirectory +
"../../../JT/externjt.jt", version);
outputFileName = outputDirectory + L"layers.prt";
errStatus =
UgwLayers(outputFileName, version);
outputFileName = outputDirectory + L"groups.prt";
errStatus =
UgwGroups(outputFileName, version);
outputFileName = outputDirectory + L"refsets.prt";
outputFileName = outputDirectory + L"meta.prt";
errStatus =
UgwMeta(outputFileName, version);
outputFileName = outputDirectory + L"colors.prt";
errStatus =
UgwColors(outputFileName, version);
outputFileName = outputDirectory + L"asm.prt";
errStatus =
UgwAsm(outputFileName, version);
outputFileName = outputDirectory + L"externasm.prt";
outputFileName = outputDirectory + L"annot.prt";
errStatus =
UgwAnnot(outputFileName, version);
return errStatus;
}
{
std::cout << endl << "----------------------------------------------" << endl;
std::cout << "Ug Write start" << endl;
nxDirectory = inResultDirectory + L"dtk/NX-Unigraphics/";
outputDirectory = inResultDirectory + L"dtk/NX-Unigraphics/nx5/";
outputDirectory = inResultDirectory + L"dtk/NX-Unigraphics/nx1980/";
outputDirectory = inResultDirectory + L"dtk/NX-Unigraphics/nx2212/";
std::cout << "Ug Write end" << endl;
return errStatus;
}