DATAKIT API  V2025.1
testlibugwrite.cpp File Reference

Macros

#define NX_RETRIEVE_ASSEMBLYDATA   NULL
 

Functions

Dtk_LayerInfosSetPtr CreateLayerInfosSet (Dtk_tab< Dtk_Int32 > &visible, Dtk_tab< Dtk_Int32 > &selectable)
 
Dtk_AxisSystemPtr MakeAxisSystem ()
 
Dtk_BodyPtr MakeFixedRefPlane ()
 
Dtk_InfoPtr MakeInstanceData (const Dtk_string &instancename, const Dtk_RGB &col, bool visible, int layer)
 
Dtk_MetaDataPtr MakeMetaData (const Dtk_string &propname, const Dtk_string &value, const Dtk_string &category="")
 
Dtk_BodyPtr MakeRefAxis ()
 
Dtk_BodyPtr MakeRefPlane ()
 
Dtk_BodyPtr MakeRefPoint ()
 
Dtk_FdtPtr UGW_Sample_MakePMI ()
 
Dtk_ErrorStatus UgwAnnot (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwAsm (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwColors (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwExternAsm (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwExternJTMesh (const Dtk_string &outputFileName, const Dtk_string &jtfic, int version)
 
Dtk_ErrorStatus UgwExternParasolid (const Dtk_string &outputFileName, const Dtk_string &parasolidfic, int version)
 
Dtk_ErrorStatus UgwGroups (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwLayers (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwMesh (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwMeta (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwReferences (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwRefSets (const Dtk_string &outputFileName, int version)
 
int UgWriteSample (const Dtk_string &inResultDirectory)
 
Dtk_ErrorStatus UgWriteSampleVersion (const Dtk_string &outputDirectory, int version)
 
Dtk_ErrorStatus UgwSimpleBody (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwTwoBodies (const Dtk_string &outputFileName, int version)
 
Dtk_ErrorStatus UgwWire (const Dtk_string &outputFileName, int version)
 

Macro Definition Documentation

◆ NX_RETRIEVE_ASSEMBLYDATA

#define NX_RETRIEVE_ASSEMBLYDATA   NULL

Function Documentation

◆ CreateLayerInfosSet()

Dtk_LayerInfosSetPtr CreateLayerInfosSet ( Dtk_tab< Dtk_Int32 > &  visible,
Dtk_tab< Dtk_Int32 > &  selectable 
)
273 {
274  const int maxlayer = 257; // 256 layers (from 1 to 256 included for NX)
276  visible.resize(maxlayer, 1);
277  selectable.resize(maxlayer, 1);
278  // visibles and selectables
279  int i;
280  for (i = 1; i < maxlayer; i++)
281  {
282  visible[i] = (i % 2); // one on two
283  selectable[i] = ((i % 3) != 0); // one on three
284  }
285  // 2 layer filters :
286  Dtk_LayerFilterInfosPtr filter456 = lay->CreateLayerFilterInfos("FILTER_456", "MyDescription");
287  Dtk_tab<Dtk_Size_t> lay456;
288  lay456.push_back(4); lay456.push_back(5); lay456.push_back(6);
289  filter456->SelectLayers(lay456);
290 
291  Dtk_LayerFilterInfosPtr filter678 = lay->CreateLayerFilterInfos("FILTER_678");
292  Dtk_tab<Dtk_Size_t> lay678;
293  lay678.push_back(6); lay678.push_back(7); lay678.push_back(8);
294  filter678->SelectLayers(lay678);
295  // wrok layer (default)
296  lay->SetDefaultLayer(12);
297 
298  return lay;
299 }

◆ MakeAxisSystem()

Dtk_AxisSystemPtr MakeAxisSystem ( )
103 {
104  Dtk_transfo t;
105  t.addTranslate(Dtk_dir(-100, 50, 200));
107  axis->SetName("MyAxisSystem");
108  axis->info()->AddAttribute("NXNAME", Dtk_Val("ANOTHERAXISSYSTEM"));
109  axis->info()->SetColor(255, 255, 0);
110  axis->SetMatrix(t);
111  return axis;
112 }

◆ MakeFixedRefPlane()

Dtk_BodyPtr MakeFixedRefPlane ( )
131 {
132  Dtk_BodyPtr body = Dtk_Body::Create();
133  body->info() = Dtk_Info::create();
134  body->info()->SetName("MyFixedRefPlane");
135  body->info()->AddAttribute("NXNAME", Dtk_Val("ANOTHERFIXEDPLANENAME"));
136  body->info()->SetColor(0, 0, 255);
137  Dtk_ShellPtr shell = Dtk_Shell::Create(body);
138  body->AddOpenShell(shell);
139  Dtk_FacePtr face = Dtk_Face::Create(body);
140  Dtk_PlaneSurfacePtr plane = Dtk_PlaneSurface::Create(Dtk_pnt(250, 250, 0), Dtk_dir(0, 0, 1), Dtk_dir(1, 0, 0));
141  double trim[] = { -10,10,-10,10 };
142  plane->SetTrimUVBox(trim);
144  shell->AddFace(face, DTK_TRUE);
145  return body;
146 }

◆ MakeInstanceData()

Dtk_InfoPtr MakeInstanceData ( const Dtk_string instancename,
const Dtk_RGB col,
bool  visible,
int  layer 
)
484 {
485  Dtk_InfoPtr infos = Dtk_Info::create();
486  infos->SetName(instancename);
487  infos->SetColor(col);
488  if (!visible)
489  infos->SetBlankedStatus(1);
490  if (layer != -1)
491  infos->SetLayer(layer);
492  return infos;
493 }

◆ MakeMetaData()

Dtk_MetaDataPtr MakeMetaData ( const Dtk_string propname,
const Dtk_string value,
const Dtk_string category = "" 
)
424 {
426  meta->SetCategory(category);
427  return meta;
428 }

◆ MakeRefAxis()

Dtk_BodyPtr MakeRefAxis ( )
149 {
150  Dtk_BodyPtr body = Dtk_Body::Create();
151  body->info() = Dtk_Info::create();
152  body->info()->SetName("MyRefAxis");
153  body->info()->AddAttribute("NXNAME", Dtk_Val("ANOTHERAXISNAME"));
154  body->info()->SetColor(0, 255, 0);
155  Dtk_ShellPtr shell = Dtk_Shell::Create(body);
156  body->AddOpenShell(shell);
158  Dtk_LinePtr line = Dtk_Line::Create(Dtk_pnt(160, 100, 10), Dtk_pnt(260, 200, 30));
160  shell->AddWire(tab);
161  return body;
162 }

◆ MakeRefPlane()

Dtk_BodyPtr MakeRefPlane ( )
115 {
116  Dtk_BodyPtr body = Dtk_Body::Create();
117  body->info() = Dtk_Info::create();
118  body->info()->SetName("MyReferencePlane");
119  body->info()->AddAttribute("NXNAME", Dtk_Val("MYPLANE"));
120  body->info()->SetColor(0, 255, 255);
121  Dtk_ShellPtr shell = Dtk_Shell::Create(body);
122  body->AddOpenShell(shell);
123  Dtk_FacePtr face = Dtk_Face::Create(body);
124  Dtk_PlaneSurfacePtr plane = Dtk_PlaneSurface::Create(Dtk_pnt(150, 150, 0), Dtk_dir(0, 0, 1), Dtk_dir(1, 0, 0));
126  shell->AddFace(face, DTK_TRUE);
127  return body;
128 }

◆ MakeRefPoint()

Dtk_BodyPtr MakeRefPoint ( )
165 {
166  Dtk_BodyPtr body = Dtk_Body::Create();
167  body->info() = Dtk_Info::create();
168  body->info()->SetName("MyRefPoint");
169  body->info()->SetColor(255, 100, 0);
170  Dtk_ShellPtr shell = Dtk_Shell::Create(body);
171  body->AddOpenShell(shell);
173  Dtk_PointPtr point = Dtk_Point::Create(Dtk_pnt(0, 310, 10));
174  tab.push_back(point);
175  shell->AddWire(tab);
176  return body;
177 }

◆ UGW_Sample_MakePMI()

Dtk_FdtPtr UGW_Sample_MakePMI ( )
595 {
597  // text informations
598  Dtk_TextStyle textstyle;
599  Dtk_InfoPtr textinfos = Dtk_Info::create();
600  // All datas below match NX menu Note Settings/ lettering
601  textinfos->AddAttribute("NX_AlignmentPosition", 4); // optional (1=TL,2=TC,3=TR,4=ML(def),5=MC,6=MR,7=BL,8=BC,9=BR)
602  textstyle.Justification() = Dtk_TextStyle::JustificationLeft; // Text Justification
603  textinfos->SetCurveThickNessInMM(0.1); // optional, assume <0.5 = thin, >1.0 = thick else normal
604  textstyle.CharHeight() = 11; // mandatory height
605  textinfos->AddAttribute("NX_FontGapFactor", 0.0); // optional (def 0.0)
606  textstyle.Ratio() = 1.0; // optional Text Aspect Ratio
607  textinfos->AddAttribute("NX_LineGapFactor", 1.0);// optional (def 1.0)
608  textinfos->AddAttribute("NX_LetteringAngle", 0.0);// optional (def 0.0)
609  textinfos->AddAttribute("NX_HeightFactor", 2.0); // optional (def 2.0)
610  textinfos->SetColor(Dtk_RGB(255, 0, 0)); // optional, a red text
611  //textstyle.Font().Name() = "Arial"; // optional, defaut blockfont (strokefont).
612  // NX5 supports only "blockfont", "Arial" and "NX ANSI Symbols"
613  // NX1980, append font name in table
614 
615  Dtk_pnt textorigin2D = Dtk_pnt(100, 20, 0); // all location are defined a 2D Coordinate system where Z = 0.
616  Dtk_Oriented2dBBox textbbox(textorigin2D, -1, -1); // -1 for width if unknown, height is given by textstyle.CharHeight()
617 
618  Dtk_Text text("SampleText\nsub1\nsub2", textbbox, textbbox, DTK_PI / 2.0, 0, dtk_text_type_value, textinfos, textstyle);
619  Dtk_CompositeText compotext;
620  compotext.AddText(text);
621  symb->Texts() = compotext;
622 
623  // arrow, see menu in NX : Note Settings / ArrowHead
624  Dtk_pnt arrowlocation = Dtk_pnt(50, 0, 0); // all location are defined a 2D Coordinate system where Z = 0.
625  double arrowlength = 5.5; // length of arrow througt line
627  Dtk_LeaderPtr leader = Dtk_Leader::Create(arrowlength, 0.0, arrowlocation, arrowtype, Dtk_tab<Dtk_pnt>());
628  // Note Settings / ArrowLine
629  leader->GetInfo()->SetColor(Dtk_RGB(0, 0, 255)); // optional, a blue leader
630  leader->GetInfo()->SetCurveThickNessInMM(0.7); // optional, assume <0.5 = thin, >1.0 = thick else normal
631  leader->GetInfo()->SetCurveLineType(DTK_PHANTOM); // optional, see enum enum Dtk_FontLineType
632  leader->GetInfo()->AddAttribute("NX_TextToLineGap", 10.0);// optional (def = 10.0)
633  leader->GetInfo()->AddAttribute("NX_TextOverStubFactor", 0.1);// optional (def = 0.1)
634 // Note Settings
635  leader->GetInfo()->AddAttribute("NX_StubLength", 20.0); // optional (def = 20.0)
636  leader->GetInfo()->AddAttribute("NX_StubSide", 1); // optional 1 for left (default), 0 for right
637  leader->GetInfo()->AddAttribute("NX_TextAlignment", 1); // optional 1 for top (default), 2 for middle, 3 for bottom
638 // Note Settings / ArrowHead
639  leader->GetArrowHead().GetInfo()->AddAttribute("NX_ArrowAngle", 30.0); // optional length given above (def = 30)
640  leader->GetArrowHead().GetInfo()->AddAttribute("NX_DotDiameter", 1.5); // optional (def = 1.5)
641  leader->GetArrowHead().GetInfo()->SetColor(Dtk_RGB(255, 0, 255)); // optional, a purple arrow
642  leader->GetArrowHead().GetInfo()->SetCurveThickNessInMM(2.0); // optional, assume <0.5 = thin, >1.0 = thick else normal
643  leader->GetArrowHead().GetInfo()->SetCurveLineType(DTK_SOLIDLINE); // optional, see enum enum Dtk_FontLineType
644 
645  symb->AddLeader(leader);
646 
647  // Final Placement :
648  Dtk_dir X(0, 0, 1);
649  Dtk_dir Y(-1, 0, 0);
650  Dtk_pnt O(0, 0, 0);
651 
652  Dtk_transfo trans = Dtk_transfo(X, Y, X^Y, O);
653 
655  pmi->info() = Dtk_Info::create();
656  pmi->info()->SetName("MyAnnot");
657  return pmi;
658 }

◆ UgwAnnot()

Dtk_ErrorStatus UgwAnnot ( const Dtk_string outputFileName,
int  version 
)
661 {
662  // Cube Sample
664  // First we initialize writing with name of output file (see macro CHECK_OK above)
665  CHECK_OK(Ugw::InitFile(outputFileName, version));
666 
667  // Then we write the 2 bodies constructed
668  CHECK_OK(Ugw::WriteBody(cube));
669 
671  CHECK_OK(Ugw::WritePMI(pmi));
672 
673  // Write final file and release the writer.
675  std::cout << "=> " << outputFileName.c_str() << endl;
676 
677  return dtkNoError;
678 }

◆ UgwAsm()

Dtk_ErrorStatus UgwAsm ( const Dtk_string outputFileName,
int  version 
)
496 {
497  Dtk_BodyPtr CubeBody = sampleWriter::CreateCube(); // get a brepcube (common sample)
498  Dtk_MeshPtr CubeMesh = sampleWriter::CreateMeshCylinder(8); // get a meshcube (common sample)
499  Dtk_BodyPtr WireBody = sampleWriter::CreateCurves(); // get wire curve into a body.
500  CubeMesh->Transform(Dtk_transfo(Dtk_dir(30, 0, 0), Dtk_dir(0, 30, 0), Dtk_dir(0, 0, 30), Dtk_pnt())); // rescale mesh too small
501  Dtk_transfo cubetransfo; // identity
502 
503  CHECK_OK(Ugw::InitFile(outputFileName, version)); // create root prt file
504 
505  CHECK_OK(Ugw::OpenInstance("sub1", cubetransfo, MakeInstanceData("SubAssembly", Dtk_RGB(), true, -1))); // sub1 subassembly
506 
507  CHECK_OK(Ugw::WriteBody(CubeBody)); // put a cube on the subassembly
508 
509  cubetransfo.addTranslate(Dtk_dir(350, 0, 0)); // shift matrix.
510  CHECK_OK(Ugw::OpenInstance("leaf1", cubetransfo, MakeInstanceData("RedCube_SpecificLayer12", Dtk_RGB(255, 0, 0), true, 12)));
511  CHECK_OK(Ugw::WriteBody(CubeBody));
513 
514  cubetransfo.addTranslate(Dtk_dir(150, 0, 0)); // shift matrix.
515  CHECK_OK(Ugw::OpenInstance("leaf2", cubetransfo, MakeInstanceData("GreenCube_Transparent", Dtk_RGB(0, 255, 0, 128), true, -1)));
516  CHECK_OK(Ugw::WriteBody(CubeBody));
518 
519  // create a second instance of "leaf2.prt", reusing "leaf2.prt" automatic retrieve instance
520  cubetransfo.addTranslate(Dtk_dir(150, 0, 0)); // shift matrix.
521  CHECK_OK(Ugw::OpenInstance("leaf2", cubetransfo, MakeInstanceData("ReinstanciedBlueCube", Dtk_RGB(0, 0, 255), true, -1)));
522  CHECK_OK(Ugw::CloseLastInstance()); // for reinstance, close immediatly
523 
524  cubetransfo.addTranslate(Dtk_dir(150, 0, 0)); // shift matrix again
525  CHECK_OK(Ugw::OpenInstance("leaf3", cubetransfo, MakeInstanceData("TealCube_Invisible", Dtk_RGB(0, 255, 255), false, -1)));
526  CHECK_OK(Ugw::WriteBody(CubeBody));
527  CHECK_OK(Ugw::CloseLastInstance()); // for reinstance, close immediatly
528 
529  cubetransfo.addTranslate(Dtk_dir(150, 0, 0)); // shift matrix.
530  CHECK_OK(Ugw::OpenInstance("leaf4", cubetransfo, MakeInstanceData("MeshCyl", Dtk_RGB(), true, -1)));
531  CHECK_OK(Ugw::WriteMesh(CubeMesh));
533 
534  cubetransfo.addTranslate(Dtk_dir(150, 0, 0)); // shift matrix.
535  CHECK_OK(Ugw::OpenInstance("leaf5", cubetransfo, MakeInstanceData("Wire", Dtk_RGB(), true, -1)));
536  CHECK_OK(Ugw::WriteBody(WireBody));
538 
540 
541  CHECK_OK(Ugw::EndFile()); // close root prt file
542  std::cout << "=> " << outputFileName.c_str() << endl;
543  return dtkNoError;
544 }

◆ UgwColors()

Dtk_ErrorStatus UgwColors ( const Dtk_string outputFileName,
int  version 
)
459 {
461  CHECK_OK(Ugw::InitFile(outputFileName, version));
462 
463  for (int i = 0; i < 217; i++)
464  {
465  Dtk_string name = "Datakit_";
466  name.add_int(i);
467  Dtk_RGB rgb = Dtk_RGB(i + 30, 0, 0);
468  CHECK_OK(Ugw::SetColorInTable(i, rgb, name));
469  }
470 
471  CHECK_OK(Ugw::WriteBody(CubeBody));
473  std::cout << "=> " << outputFileName.c_str() << endl;
474 
475  return dtkNoError;
476 }

◆ UgwExternAsm()

Dtk_ErrorStatus UgwExternAsm ( const Dtk_string outputFileName,
int  version 
)
561 {
562  // This example create an assembly from extern prt files
563  // First we initialize writing with name of output file (see macro CHECK_OK above)
564  CHECK_OK(Ugw::InitFile(outputFileName, version));
565 
566  // We add extern twobodies (.prt) written by this sample previously
567  // The last parameter is a pointer on a function from datakit NXreader to retrieve subassembly datas : (instance names, colors, layer, visbility).
568  // This is optional, if NULL is given, the current file doesn't know these datas from subassemblies.
570 
571  Dtk_transfo trans;
572  trans.addTranslate(Dtk_dir(0, 0, 200));
573  // We add extern asm (.prt) written by this sample previously
574  // We transmit function nxreader_GetData from NXReader, to retrieve cube colors set in subassembly sub1.prt
575  CHECK_OK(Ugw::AddExternInstance("asm", trans, MakeInstanceData("FirstInstance", Dtk_RGB(), true, 5), NX_RETRIEVE_ASSEMBLYDATA));
576 
577  trans.addTranslate(Dtk_dir(0, 200, 0));
578  // We add a second time extern asm (.prt) written by this sample previously
579  CHECK_OK(Ugw::AddExternInstance("asm", trans, MakeInstanceData("SecondInstance", Dtk_RGB(), true, 15), NX_RETRIEVE_ASSEMBLYDATA));
580 
581  // Write final file and release the writer.
583  std::cout << "=> " << outputFileName.c_str() << endl;
584 
585  return dtkNoError;
586 }

◆ UgwExternJTMesh()

Dtk_ErrorStatus UgwExternJTMesh ( const Dtk_string outputFileName,
const Dtk_string jtfic,
int  version 
)
239 {
240  FILE* F = jtfic.OpenFile(DTK_RB);
241  if (!F)
242  {
243  std::cout << "error : " << jtfic.c_str() << " does not exist";
244  return dtkErrorFileNotExist;
245  }
246  Dtk_tab<char> flux;
247  fseek(F, 0, SEEK_END);
248  flux.resize(ftell(F));
249  fseek(F, 0, SEEK_SET);
250  if (flux.size() > 0)
251  fread(&flux[0], 1, flux.size(), F);
252  fclose(F);
253 
255  inf->SetName("MyFeatureName");
256  inf->AddAttribute("NXNAME", Dtk_string("SolidName"));
257  //inf->SetBlankedStatus(1); // set as invisible
258  //inf->SetColor(Dtk_RGB(255, 0, 0)); // set a body color (appear on non colored faces)
259 
260  CHECK_OK(Ugw::InitFile(outputFileName, version));
261  CHECK_OK(Ugw::WriteExternJtMesh(&flux[0], flux.size(), inf));
263  std::cout << "=> " << outputFileName.c_str() << endl;
264  return dtkNoError;
265 }

◆ UgwExternParasolid()

Dtk_ErrorStatus UgwExternParasolid ( const Dtk_string outputFileName,
const Dtk_string parasolidfic,
int  version 
)
206 {
207  FILE* F = parasolidfic.OpenFile(DTK_RB);
208  if (!F)
209  {
210  std::cout << "error : " << parasolidfic.c_str() << " does not exist";
211  return dtkErrorFileNotExist;
212  }
213  Dtk_tab<char> flux;
214  fseek(F, 0, SEEK_END);
215  flux.resize(ftell(F));
216  fseek(F, 0, SEEK_SET);
217  if (flux.size() > 0)
218  fread(&flux[0], 1, flux.size(), F);
219  fclose(F);
220 
222  inf->SetName("MyFeatureName");
223  inf->AddAttribute("NXNAME", Dtk_string("SolidName"));
224  //inf->SetBlankedStatus(1); // set as invisible
225  //inf->SetColor(Dtk_RGB(255, 0, 0)); // set a body color (appear on non colored faces)
226 
227  CHECK_OK(Ugw::InitFile(outputFileName, version));
228  CHECK_OK(Ugw::WriteExternParasolidBody(&flux[0], flux.size(), inf));
230  std::cout << "=> " << outputFileName.c_str() << endl;
231  return dtkNoError;
232 }

◆ UgwGroups()

Dtk_ErrorStatus UgwGroups ( const Dtk_string outputFileName,
int  version 
)
333 {
335  cube1->info()->SetName("FirstCube");
337  cube2->info()->SetName("SecondCube");
338  Dtk_transfo translate(Dtk_dir(1, 0, 0), Dtk_dir(0, 1, 0), Dtk_dir(0, 0, 1), Dtk_pnt(200, 0, 0));
339  cube2->Transform(translate);
340  Dtk_MeshPtr CylMesh = sampleWriter::CreateMeshCylinder(8); // get a meshcyl (common sample)
341  CylMesh->info()->SetName("OneMesh");
342  Dtk_transfo translatescale(Dtk_dir(10, 0, 0), Dtk_dir(0, 10, 0), Dtk_dir(0, 0, 10), Dtk_pnt(-100, 0, 0));
343  CylMesh->Transform(translatescale);
345  WireBody->Transform(translatescale);
346 
347  CHECK_OK(Ugw::InitFile(outputFileName, version));
348 
349  // put cube1 in group GroupRoot/Sub1
350  cube1->info()->AddAttribute("NXGROUPS", Dtk_Val("GroupRoot\\Sub1\\"));
351 
352  // put cube1 in group GroupRoot/Sub1 and also GroupRoot/Sub2
353  cube2->info()->AddAttribute("NXGROUPS", Dtk_Val("GroupRoot\\Sub1\\\\GroupRoot\\Sub2\\"));
354 
355  // put Mesh in group GroupRoot/Sub2
356  CylMesh->info()->AddAttribute("NXGROUPS", Dtk_Val("GroupRoot\\Sub2\\"));
357 
358  // put Wire in group GroupRoot/Sub2
359  WireBody->info()->AddAttribute("NXGROUPS", Dtk_Val("GroupRoot\\Sub2\\"));
360 
361 
362  // set property to group Sub2
363  Dtk_InfoPtr infsub2 = Dtk_Info::create();
364  infsub2->SetBlankedStatus(1);
365  infsub2->SetLayer(23);
366  CHECK_OK(Ugw::SetGroupDatas("Sub2", infsub2)); // Sub2 become invisible, and on layer 23
367 
368  // make an empty group
369  Dtk_InfoPtr infsub3 = Dtk_Info::create();
370  infsub3->AddAttribute("NXGROUPS", Dtk_Val("GroupRoot\\Sub3\\"));
371  infsub3->SetLayer(19);
372  CHECK_OK(Ugw::SetGroupDatas("Sub3", infsub3)); // Sub3 become an empty group on layer 19
373 
374  // Then we write the 2 bodies constructed
375  CHECK_OK(Ugw::WriteBody(cube1));
376  CHECK_OK(Ugw::WriteBody(cube2));
377  CHECK_OK(Ugw::WriteBody(WireBody));
378  CHECK_OK(Ugw::WriteMesh(CylMesh));
379 
380  // Write final file and release the writer.
382  std::cout << "=> " << outputFileName.c_str() << endl;
383  return dtkNoError;
384 }

◆ UgwLayers()

Dtk_ErrorStatus UgwLayers ( const Dtk_string outputFileName,
int  version 
)
302 {
303  Dtk_BodyPtr CubeBody = sampleWriter::CreateCube(); // get a brepcube (common sample)
304  Dtk_MeshPtr CylMesh = sampleWriter::CreateMeshCylinder(8); // get a meshcyl (common sample)
305  Dtk_transfo translatescale(Dtk_dir(20, 0, 0), Dtk_dir(0, 20, 0), Dtk_dir(0, 0, 20), Dtk_pnt(150, 0, 0));
306  CylMesh->Transform(translatescale);
307 
308  CHECK_OK(Ugw::InitFile(outputFileName, version));
309 
310  Dtk_tab<Dtk_Int32> visible, selectable;
311  Dtk_LayerInfosSetPtr layerinfoset = CreateLayerInfosSet(visible, selectable);
312 
313  CubeBody->info()->SetLayer(5);
314  CylMesh->info()->SetLayer(6);
315 
316  CHECK_OK(Ugw::SetLayerData(layerinfoset, visible, selectable));
317 
318  // Then we write the 2 bodies constructed
319  CHECK_OK(Ugw::WriteBody(CubeBody));
320  CHECK_OK(Ugw::WriteMesh(CylMesh));
321 
322  // Write final file and release the writer.
324  std::cout << "=> " << outputFileName.c_str() << endl;
325  return dtkNoError;
326 }

◆ UgwMesh()

Dtk_ErrorStatus UgwMesh ( const Dtk_string outputFileName,
int  version 
)
72 {
73  Dtk_MeshPtr CubeMesh = sampleWriter::CreateMeshCylinder(8); // get a meshcylinder (common sample)
74  CubeMesh->info()->SetName("MyMesh");
75  CHECK_OK(Ugw::InitFile(outputFileName, version));
76  CHECK_OK(Ugw::WriteMesh(CubeMesh));
78  std::cout << "=> " << outputFileName.c_str() << endl;
79  return dtkNoError;
80 }

◆ UgwMeta()

Dtk_ErrorStatus UgwMeta ( const Dtk_string outputFileName,
int  version 
)
431 {
433  // lastparameter 0 indicate to set INCH. (default value = 1 = millimeters)
434  CHECK_OK(Ugw::InitFile(outputFileName, version, 0));
435 
436  // custom metadata
437  CHECK_OK(Ugw::AddMetaData(MakeMetaData("MyPropTitle", "MyPropValue", "CategoryNX1980")));
438  CHECK_OK(Ugw::AddMetaData(MakeMetaData("MyPropTitle2", "MyPropValue2", "CategoryNX1980")));
439 
440  // modeling preference
441  CHECK_OK(Ugw::AddMetaData(MakeMetaData("Distance Tolerance", "0.015", "Modeling Preferences")));
442  CHECK_OK(Ugw::AddMetaData(MakeMetaData("Angle Tolerance", "0.1", "Modeling Preferences")));
443  CHECK_OK(Ugw::AddMetaData(MakeMetaData("Density", "6500", "Modeling Preferences")));
444  // for Density Units, supported values are "lb/in3", "lb/ft3", "g/m3", "kg/m3"
445  CHECK_OK(Ugw::AddMetaData(MakeMetaData("Density Units", "lb/ft3", "Modeling Preferences")));
446 
447  CHECK_OK(Ugw::WriteBody(CubeBody));
449  std::cout << "=> " << outputFileName.c_str() << endl;
450  return dtkNoError;
451 }

◆ UgwReferences()

Dtk_ErrorStatus UgwReferences ( const Dtk_string outputFileName,
int  version 
)
180 {
182  CHECK_OK(Ugw::InitFile(outputFileName, version));
183 
184  cube->info()->SetName("MyCube");
185  cube->info()->AddAttribute("NXNAME", Dtk_Val("SOLIDBODYNAME"));
186  CHECK_OK(Ugw::WriteBody(cube));
187 
193 
195  std::cout << "=> " << outputFileName.c_str() << endl;
196 
197  return dtkNoError;
198 }

◆ UgwRefSets()

Dtk_ErrorStatus UgwRefSets ( const Dtk_string outputFileName,
int  version 
)
392 {
394  cube1->info()->SetName("FirstCube");
396  cube2->info()->SetName("SecondCube");
397  Dtk_transfo translate(Dtk_dir(1, 0, 0), Dtk_dir(0, 1, 0), Dtk_dir(0, 0, 1), Dtk_pnt(200, 0, 0));
398  cube2->Transform(translate);
399 
400  // reference set
401  // Cube1 into reference set "MyRef1","MyRef2","MyRef3"
402  cube1->info()->AddAttribute("NXREFERENCESET", Dtk_Val("MyRef1\\MyRef2\\MyRef3\\"));
403  // Cube2 into reference set "MyRef1","MyRef3"
404  cube2->info()->AddAttribute("NXREFERENCESET", Dtk_Val("MyRef1\\MyRef3\\"));
405 
406  CHECK_OK(Ugw::InitFile(outputFileName, version));
407 
408  // Then we write the 2 bodies constructed
409  CHECK_OK(Ugw::WriteBody(cube1));
410  CHECK_OK(Ugw::WriteBody(cube2));
411 
412  // Write final file and release the writer.
414  std::cout << "=> " << outputFileName.c_str() << endl;
415  return dtkNoError;
416 }

◆ UgWriteSample()

int UgWriteSample ( const Dtk_string inResultDirectory)
757 {
758  Dtk_string outputDirectory, nxDirectory;
759  Dtk_ErrorStatus errStatus;
760 
761  std::cout << endl << "----------------------------------------------" << endl;
762  std::cout << "Ug Write start" << endl;
763 
764  nxDirectory = inResultDirectory + L"dtk/NX-Unigraphics/";
765  nxDirectory.FixPathSeparator();
766  nxDirectory.mkdir();
767 
768  // Choosing output for version NX5
769  outputDirectory = inResultDirectory + L"dtk/NX-Unigraphics/nx5/";
770  outputDirectory.FixPathSeparator();
771  outputDirectory.mkdir();
772  errStatus = UgWriteSampleVersion(outputDirectory, DTK_UGW_VERSION_NX5);
773 
774  // Choosing output for version NX1980
775  outputDirectory = inResultDirectory + L"dtk/NX-Unigraphics/nx1980/";
776  outputDirectory.FixPathSeparator();
777  outputDirectory.mkdir();
778  errStatus = UgWriteSampleVersion(outputDirectory, DTK_UGW_VERSION_NX1980);
779 
780  // Choosing output for version NX2212
781  outputDirectory = inResultDirectory + L"dtk/NX-Unigraphics/nx2212/";
782  outputDirectory.FixPathSeparator();
783  outputDirectory.mkdir();
784  errStatus = UgWriteSampleVersion(outputDirectory, DTK_UGW_VERSION_NX2212);
785 
786  std::cout << "Ug Write end" << endl;
787 
788  return errStatus;
789 }

◆ UgWriteSampleVersion()

Dtk_ErrorStatus UgWriteSampleVersion ( const Dtk_string outputDirectory,
int  version 
)
685 {
686  Dtk_string outputFileName;
687  Dtk_ErrorStatus errStatus;
688 
689  // sample 1.1 : one body
690  outputFileName = outputDirectory + L"simplebody.prt";
691  errStatus = UgwSimpleBody(outputFileName, version);
692 
693  // sample 1.2 : just write 2 bodies
694  outputFileName = outputDirectory + L"twobodies.prt";
695  errStatus = UgwTwoBodies(outputFileName, version);
696 
697  // sample 1.3 : mesh
698  outputFileName = outputDirectory + L"mesh.prt";
699  errStatus = UgwMesh(outputFileName, version);
700 
701  // sample 1.4 : wire
702  outputFileName = outputDirectory + L"wire.prt";
703  errStatus = UgwWire(outputFileName, version);
704 
705  // sample 1.5 : References
706  outputFileName = outputDirectory + L"refs.prt";
707  errStatus = UgwReferences(outputFileName, version);
708 
709  // sample 1.6 : Extern Parasolid
710  outputFileName = outputDirectory + L"extparasolid.prt";
711  errStatus = UgwExternParasolid(outputFileName, outputDirectory + "../../../Parasolid/extparasolid.x_t", version);
712 
713  // sample 1.7 : Extern JT
714  outputFileName = outputDirectory + L"extjt.prt";
715  errStatus = UgwExternJTMesh(outputFileName, outputDirectory + "../../../JT/externjt.jt", version);
716 
717  // sample 2.1 : Layer filters
718  outputFileName = outputDirectory + L"layers.prt";
719  errStatus = UgwLayers(outputFileName, version);
720 
721  // sample 2.2 : Groups
722  outputFileName = outputDirectory + L"groups.prt";
723  errStatus = UgwGroups(outputFileName, version);
724 
725  // sample 2.3 : Reference Sets
726  outputFileName = outputDirectory + L"refsets.prt";
727  errStatus = UgwRefSets(outputFileName, version);
728 
729  // sample 2.4 : MetaDatas, units, modeling preferences
730  outputFileName = outputDirectory + L"meta.prt";
731  errStatus = UgwMeta(outputFileName, version);
732 
733  // sample 2.5 : Colors
734  outputFileName = outputDirectory + L"colors.prt";
735  errStatus = UgwColors(outputFileName, version);
736 
737  // sample 3.1 : Simple Assembly
738  outputFileName = outputDirectory + L"asm.prt";
739  errStatus = UgwAsm(outputFileName, version);
740 
741  // sample 3.2 : Extern Assembly
742  outputFileName = outputDirectory + L"externasm.prt";
743  errStatus = UgwExternAsm(outputFileName, version);
744 
745  // sample 4.1 : Annotation
746  outputFileName = outputDirectory + L"annot.prt";
747  errStatus = UgwAnnot(outputFileName, version);
748 
749  return errStatus;
750 }

◆ UgwSimpleBody()

Dtk_ErrorStatus UgwSimpleBody ( const Dtk_string outputFileName,
int  version 
)
18 {
19  // Cube Sample
21  //CubeBody->info()->AddAttribute("MATERIALNAME", Dtk_string("Ash Gloss"));
22  // First we initialize writer with name of output file (see macro CHECK_OK above)
23  CHECK_OK(Ugw::InitFile(outputFileName, version));
24 
25  // Then we write the body constructed
26  CHECK_OK(Ugw::WriteBody(CubeBody));
27 
28  // Write final file and release the writer.
30  std::cout << "=> " << outputFileName.c_str() << endl;
31 
32  return dtkNoError;
33 }

◆ UgwTwoBodies()

Dtk_ErrorStatus UgwTwoBodies ( const Dtk_string outputFileName,
int  version 
)
40 {
41  // Cube Sample
43 
44  // We construct 2 cubes, translating the second
46  cube1->info()->SetName("FirstCube");
48  cube2->info()->SetName("SecondCube");
49 
50  Dtk_transfo translate(Dtk_dir(1, 0, 0), Dtk_dir(0, 1, 0), Dtk_dir(0, 0, 1), Dtk_pnt(200, 0, 0));
51  cube2->Transform(translate);
52 
53  // First we initialize writing with name of output file (see macro CHECK_OK above)
54  CHECK_OK(Ugw::InitFile(outputFileName, version));
55 
56  // Then we write the 2 bodies constructed
57  CHECK_OK(Ugw::WriteBody(cube1));
58  CHECK_OK(Ugw::WriteBody(cube2));
59 
60  // Write final file and release the writer.
62  std::cout << "=> " << outputFileName.c_str() << endl;
63 
64  return dtkNoError;
65 }

◆ UgwWire()

Dtk_ErrorStatus UgwWire ( const Dtk_string outputFileName,
int  version 
)
87 {
89  CHECK_OK(Ugw::InitFile(outputFileName, version));
90  CHECK_OK(Ugw::WriteBody(WireBody));
92  std::cout << "=> " << outputFileName.c_str() << endl;
93  return dtkNoError;
94 }
UgwGroups
Dtk_ErrorStatus UgwGroups(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:332
Dtk_TextStyle::Ratio
Dtk_Double64 & Ratio()
Retrieves the text ratio - get/set -.
MakeInstanceData
Dtk_InfoPtr MakeInstanceData(const Dtk_string &instancename, const Dtk_RGB &col, bool visible, int layer)
Definition: testlibugwrite.cpp:483
UgwRefSets
Dtk_ErrorStatus UgwRefSets(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:391
Dtk_InfoPtr
Dtk_SmartPtr< Dtk_Info > Dtk_InfoPtr
Handles a Dtk_Info object.
Definition: util_ptr_dtk.hpp:310
UgwExternParasolid
Dtk_ErrorStatus UgwExternParasolid(const Dtk_string &outputFileName, const Dtk_string &parasolidfic, int version)
Definition: testlibugwrite.cpp:205
UgwExternAsm
Dtk_ErrorStatus UgwExternAsm(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:560
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
Ugw::WriteAxisSystem
Dtk_ErrorStatus WriteAxisSystem(const Dtk_AxisSystemPtr &inAxisSystem)
Add an axis system into the current node.
MakeRefAxis
Dtk_BodyPtr MakeRefAxis()
Definition: testlibugwrite.cpp:148
UgwColors
Dtk_ErrorStatus UgwColors(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:458
Dtk_TextStyle::Justification
TextJustificationEnum & Justification()
Retrieves the text justification - get/set -.
Dtk_TextStyle::JustificationLeft
@ JustificationLeft
Definition: util_draw_dtk.hpp:299
Dtk_PlaneSurface::Create
static Dtk_PlaneSurfacePtr Create(const Dtk_pnt &inOrigin, const Dtk_dir &inNormal, const Dtk_dir &inUDirection, const Dtk_dir &inVDirection=Dtk_dir())
Create an infinite plane surface.
UgwLayers
Dtk_ErrorStatus UgwLayers(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:301
Ugw::SetColorInTable
Dtk_ErrorStatus SetColorInTable(size_t inIth, const Dtk_RGB &inColor, const Dtk_string &inColorname)
Replace color value and color name on the palette.
Dtk_TextStyle
This is the text_style. This class gathers several informations about text style.
Definition: util_draw_dtk.hpp:260
dtkErrorFileNotExist
@ dtkErrorFileNotExist
Definition: error_dtk.hpp:95
MakeRefPlane
Dtk_BodyPtr MakeRefPlane()
Definition: testlibugwrite.cpp:114
UgwMeta
Dtk_ErrorStatus UgwMeta(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:430
Ugw::AddExternInstance
Dtk_ErrorStatus AddExternInstance(const Dtk_string &inProtoFileName, const Dtk_transfo &inTrans, Dtk_InfoPtr inInfos, void(*innxread_getdata)(const Dtk_string &, void *&))
Open an extern file to add as instance in current assembly, inProtoFileName must be in the output dir...
DTK_TRUE
#define DTK_TRUE
Definition: define.h:727
DTK_UGW_VERSION_NX5
#define DTK_UGW_VERSION_NX5
Definition: ugw.hpp:7
dtk_text_type_value
@ dtk_text_type_value
Definition: str_def.h:14
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
Ugw::WriteReferenceGeometry
Dtk_ErrorStatus WriteReferenceGeometry(const Dtk_BodyPtr &inRefgeom)
Add a reference geometry into the current node.
UgwAnnot
Dtk_ErrorStatus UgwAnnot(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:660
Ugw::WriteExternJtMesh
Dtk_ErrorStatus WriteExternJtMesh(const char *inFlux, size_t inSize, const Dtk_InfoPtr &inInf)
Add a JT file as lightweight body inside the file.
Dtk_Text
This is the base text class. It's part of Dtk_CompositeText. It's used into a lot of 2D Entities It c...
Definition: util_draw_dtk.hpp:1126
Dtk_AxisSystem::create
static Dtk_SmartPtr< Dtk_AxisSystem > create()
Dtk_Body::Create
static Dtk_BodyPtr Create()
Create a body.
Ugw::WriteBody
Dtk_ErrorStatus WriteBody(const Dtk_BodyPtr &inBody)
Add a body inside the file.
Dtk_string::OpenFile
FILE * OpenFile(const Dtk_string &inRights) const
File Utility : Open a file with the given rights.
MakeFixedRefPlane
Dtk_BodyPtr MakeFixedRefPlane()
Definition: testlibugwrite.cpp:130
UgwSimpleBody
Dtk_ErrorStatus UgwSimpleBody(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:17
DTK_SOLIDLINE
@ DTK_SOLIDLINE
Definition: util_ent_dtk.hpp:46
Dtk_Symbol::Create
static Dtk_SymbolPtr Create()
Base constructor.
Ugw::SetLayerData
Dtk_ErrorStatus SetLayerData(const Dtk_LayerInfosSetPtr &inLayerDataSet, const Dtk_tab< Dtk_Int32 > &inVisibles=Dtk_tab< Dtk_Int32 >(), const Dtk_tab< Dtk_Int32 > &inSelectables=Dtk_tab< Dtk_Int32 >())
define Data for layers
Dtk_string::add_int
void add_int(const int integer, int force_unsigned_int=0)
concat an int to the Dtk_string (convert the int to Dtk_string)
Dtk_Val
Definition: dtk_val.hpp:67
UgwMesh
Dtk_ErrorStatus UgwMesh(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:71
Dtk_Face::Create
static Dtk_FacePtr Create(const Dtk_BodyPtr &inParentBody)
Create a face in a body.
UGW_Sample_MakePMI
Dtk_FdtPtr UGW_Sample_MakePMI()
Definition: testlibugwrite.cpp:594
MakeAxisSystem
Dtk_AxisSystemPtr MakeAxisSystem()
Definition: testlibugwrite.cpp:102
Ugw::InitFile
Dtk_ErrorStatus InitFile(const Dtk_string &inFilename, int inVersiontowrite=45, int inUnitasmm=1, int inMultithread=0)
Initialize UG Writer.
Dtk_Line::Create
static Dtk_LinePtr Create(const Dtk_Line &inLineToCopy)
constructors returning Smart pointers
Dtk_tab::resize
void resize(Dtk_Size_t n, const T &t)
Resizes the array.
Definition: util_stl_dtk.hpp:603
Ugw::WritePMI
Dtk_ErrorStatus WritePMI(const Dtk_FdtPtr &inPmi)
Add a pmi inside the file.
Ugw::WriteExternParasolidBody
Dtk_ErrorStatus WriteExternParasolidBody(const char *inFlux, size_t inSize, const Dtk_InfoPtr &inInf)
Add a Parasolid file as body inside the file.
Dtk_MetaData::TypeProperty
@ TypeProperty
Definition: dtk_metadata.hpp:28
Ugw::CloseLastInstance
Dtk_ErrorStatus CloseLastInstance()
Close the last instance.
DTK_PHANTOM
@ DTK_PHANTOM
Definition: util_ent_dtk.hpp:50
Ugw::SetGroupDatas
Dtk_ErrorStatus SetGroupDatas(const Dtk_string &inGroupName, Dtk_InfoPtr inInfos)
define Visibility for a specific group
Dtk_SmartPtr::DtkDynamicCast
static Dtk_SmartPtr< T > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_ErrorStatus
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
Dtk_Fdt::Create
static Dtk_FdtPtr Create()
Base constructor.
Dtk_Face::SetGeom
void SetGeom(const Dtk_SurfacePtr &inSurface)
Set Geometry.
CHECK_OK
#define CHECK_OK(X)
Definition: testwriters.h:9
Dtk_SmartPtr
Definition: util_ptr_dtk.hpp:37
Dtk_string::c_str
const char * c_str() const
Retrieve the ASCII conversion string.
sampleWriter::CreateMeshCylinder
Dtk_MeshPtr CreateMeshCylinder(int nbpoints)
Mesh Cylinder sample.
Definition: testcreatemesh.cpp:337
UgwTwoBodies
Dtk_ErrorStatus UgwTwoBodies(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:39
Dtk_string::mkdir
int mkdir() const
File Utility : Create a Directory.
Dtk_pnt
This is a mathematical point class.
Definition: dtk_pnt.hpp:22
UgWriteSampleVersion
Dtk_ErrorStatus UgWriteSampleVersion(const Dtk_string &outputDirectory, int version)
Definition: testlibugwrite.cpp:684
UgwAsm
Dtk_ErrorStatus UgwAsm(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:495
Dtk_string::FixPathSeparator
void FixPathSeparator()
File Utility : Fixes path separator consistency. It lets you replace the '\' or '/' by the OS needed ...
Dtk_CompositeText
This is the composite text class. It's basically a Dtk_Text Container. This class represents a group ...
Definition: util_draw_dtk.hpp:1557
Dtk_Leader::Create
static Dtk_LeaderPtr Create()
Base constructor.
MakeMetaData
Dtk_MetaDataPtr MakeMetaData(const Dtk_string &propname, const Dtk_string &value, const Dtk_string &category="")
Definition: testlibugwrite.cpp:423
Dtk_TextStyle::CharHeight
Dtk_Double64 & CharHeight()
Retrieves the char height - get/set -.
NX_RETRIEVE_ASSEMBLYDATA
#define NX_RETRIEVE_ASSEMBLYDATA
Definition: testlibugwrite.cpp:556
Dtk_tab< Dtk_Size_t >
CreateLayerInfosSet
Dtk_LayerInfosSetPtr CreateLayerInfosSet(Dtk_tab< Dtk_Int32 > &visible, Dtk_tab< Dtk_Int32 > &selectable)
Definition: testlibugwrite.cpp:272
Ugw::WriteMesh
Dtk_ErrorStatus WriteMesh(const Dtk_MeshPtr &inMesh)
Add a mesh inside the file.
Dtk_transfo::addTranslate
void addTranslate(const Dtk_dir &V)
Translate the Dtk_transfo.
sampleWriter::CreateCube
Dtk_BodyPtr CreateCube()
Definition: testcreatecube.cpp:1249
Dtk_tab::size
Dtk_Size_t size() const
Returns the size of the array.
Definition: util_stl_dtk.hpp:502
Ugw::AddMetaData
Dtk_ErrorStatus AddMetaData(const Dtk_MetaDataPtr &inMeta)
Add a MetaData in the current component.
DTK_UGW_VERSION_NX1980
#define DTK_UGW_VERSION_NX1980
Definition: ugw.hpp:8
UgwWire
Dtk_ErrorStatus UgwWire(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:86
UgwReferences
Dtk_ErrorStatus UgwReferences(const Dtk_string &outputFileName, int version)
Definition: testlibugwrite.cpp:179
Ugw::OpenInstance
Dtk_ErrorStatus OpenInstance(const Dtk_string &inInstanceName, const Dtk_string &inProtoFileName, Dtk_bool &outWasAlreadyInstancied, const Dtk_transfo &inTrans, const Dtk_RGB &inRgb)
deprecated
DTK_RB
#define DTK_RB
Definition: dtk_string.hpp:40
UgwExternJTMesh
Dtk_ErrorStatus UgwExternJTMesh(const Dtk_string &outputFileName, const Dtk_string &jtfic, int version)
Definition: testlibugwrite.cpp:238
Dtk_Leader::LeaderTerminatorTypeEnum
LeaderTerminatorTypeEnum
Internal leader terminator type.
Definition: util_draw_dtk.hpp:1999
sampleWriter::CreateCurves
Dtk_BodyPtr CreateCurves()
Definition: testcreatecube.cpp:1292
Dtk_LayerInfosSet::Create
static Dtk_LayerInfosSetPtr Create(const Dtk_Size_t inNumLayers)
Base constructor.
dtkNoError
@ dtkNoError
Definition: error_dtk.hpp:140
Dtk_tab::push_back
void push_back(const T &x)
Inserts an element at the end of the array.
Definition: util_stl_dtk.hpp:415
Dtk_Shell::Create
static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody)
Create a shell in a body.
MakeRefPoint
Dtk_BodyPtr MakeRefPoint()
Definition: testlibugwrite.cpp:164
Dtk_Point::Create
static Dtk_PointPtr Create(const Dtk_Point &inToCopy)
constructors returning Smart pointers
Dtk_CompositeText::AddText
void AddText(Dtk_Text inText)
Adds a Dtk_Text to the Dtk_CompositeText.
Dtk_RGB
Definition: dtk_rgb.hpp:7
Dtk_Info::create
static Dtk_SmartPtr< Dtk_Info > create()
Dtk_Oriented2dBBox
This is the base bounding box class. It's used into a lot of 2D Entities This class represents the ba...
Definition: util_draw_dtk.hpp:479
Dtk_dir
This is a mathematical direction class.
Definition: dtk_dir.hpp:15
DTK_UGW_VERSION_NX2212
#define DTK_UGW_VERSION_NX2212
Definition: ugw.hpp:9
Dtk_Leader::TerminatorTypeFillArrow
@ TerminatorTypeFillArrow
Definition: util_draw_dtk.hpp:2007
Ugw::EndFile
Dtk_ErrorStatus EndFile()
Close the UG file.
Dtk_MetaData::CreateMetaData
static Dtk_MetaDataPtr CreateMetaData(const MetaDataTypeEnum &inEnumType, Dtk_string inTitle, Dtk_string inValue, Dtk_string inValueType=Dtk_string(L"STRING"))
Create a Dtk_MetaDataPtr .
DTK_PI
#define DTK_PI
Definition: str_def.h:8