 |
DATAKIT SDK
V2026.4
|
|
|
| Dtk_AxisSystemPtr | MakeAxisSystem () |
| |
| Dtk_BodyPtr | MakeFixedRefPlane () |
| |
| Dtk_InfoPtr | MakeInstanceData (const Dtk_string &inInstanceName, const Dtk_RGB &inColor, bool inVisible, int inLayer) |
| |
| Dtk_MetaDataPtr | MakeMetaData (const Dtk_string &inPropertyName, const Dtk_string &inValue, const Dtk_string &inCategory="") |
| |
| Dtk_BodyPtr | MakeRefAxis () |
| |
| Dtk_BodyPtr | MakeRefPlane () |
| |
| Dtk_BodyPtr | MakeRefPoint () |
| |
| Dtk_FdtPtr | UGW_Sample_MakePMI () |
| |
| Dtk_ErrorStatus | UgwAnnot (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 4.1: writes a cube body and a PMI annotation (symbol with leader) into an NX file. More...
|
| |
| Dtk_ErrorStatus | UgwAsm (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 3.1: writes a multi-level NX assembly with named instances, colors, layers, re-instancing and wireframe. More...
|
| |
| Dtk_ErrorStatus | UgwColors (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 2.5: writes a cube with a custom NX color table (217 entries) and then writes colored bodies. More...
|
| |
| Dtk_ErrorStatus | UgwExternAsm (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 3.2: writes an NX assembly referencing previously written external .prt files. More...
|
| |
| Dtk_ErrorStatus | UgwExternJTMesh (const Dtk_string &inOutputFileName, const Dtk_string &inJtFilePath, int inVersion) |
| | Sample 1.7: embeds an existing JT mesh stream into an NX file as external reference. More...
|
| |
| Dtk_ErrorStatus | UgwExternParasolid (const Dtk_string &inOutputFileName, const Dtk_string &inParasolidFilePath, int inVersion) |
| | Sample 1.6: embeds an existing Parasolid binary stream into an NX file as an external reference. More...
|
| |
| Dtk_ErrorStatus | UgwGroups (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 2.2: writes bodies and a mesh grouped under named entity groups. More...
|
| |
| Dtk_ErrorStatus | UgwLayers (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 2.1: writes a cube and a cylinder mesh each assigned to specific layers, with layer info set. More...
|
| |
| Dtk_ErrorStatus | UgwMesh (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 1.3: writes a cylinder mesh into an NX file. More...
|
| |
| Dtk_ErrorStatus | UgwMeta (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 2.4: writes a cube with metadata (properties in categories) and custom unit/tolerance defaults. More...
|
| |
| Dtk_ErrorStatus | UgwReferences (const Dtk_string &inOutputFileName, int inVersion) |
| |
| Dtk_ErrorStatus | UgwRefSets (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 2.3: writes bodies assigned to NX reference sets via the NXREFERENCESET attribute. More...
|
| |
| DtkErrorStatus | UgWriteSample (const Dtk_string &inResultDirectory) |
| |
| Dtk_ErrorStatus | UgWriteSampleVersion (const Dtk_string &inOutputDirectory, int inVersion) |
| | Entry point: runs all UGW sample functions for the given NX format version and output directory. More...
|
| |
| Dtk_ErrorStatus | UgwSimpleBody (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 1.1: writes a single BRep cube body into an NX file. More...
|
| |
| Dtk_ErrorStatus | UgwTwoBodies (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 1.2: writes two named cubes (translated apart) into an NX file. More...
|
| |
| Dtk_ErrorStatus | UgwWire (const Dtk_string &inOutputFileName, int inVersion) |
| | Sample 1.4: writes a wireframe body (curves) into an NX file. More...
|
| |
◆ NX_RETRIEVE_ASSEMBLYDATA
| #define NX_RETRIEVE_ASSEMBLYDATA NULL |
◆ MakeAxisSystem()
114 axis->SetName(
"MyAxisSystem");
115 axis->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"ANOTHERAXISSYSTEM"));
116 axis->info()->SetColor(255, 255, 0);
117 axis->SetMatrix(axisTransform);
◆ MakeFixedRefPlane()
141 body->info()->SetName(
"MyFixedRefPlane");
142 body->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"ANOTHERFIXEDPLANENAME"));
143 body->info()->SetColor(0, 0, 255);
145 body->AddOpenShell(shell);
148 double trim[] = { -10,10,-10,10 };
149 plane->SetTrimUVBox(trim);
◆ MakeInstanceData()
477 infos->
SetName(inInstanceName);
◆ MakeMetaData()
409 meta->SetCategory(inCategory);
◆ MakeRefAxis()
159 body->info()->SetName(
"MyRefAxis");
160 body->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"ANOTHERAXISNAME"));
161 body->info()->SetColor(0, 255, 0);
163 body->AddOpenShell(shell);
◆ MakeRefPlane()
125 body->info()->SetName(
"MyReferencePlane");
126 body->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"MYPLANE"));
127 body->info()->SetColor(0, 255, 255);
129 body->AddOpenShell(shell);
◆ MakeRefPoint()
175 body->info()->SetName(
"MyRefPoint");
176 body->info()->SetColor(255, 100, 0);
178 body->AddOpenShell(shell);
◆ UGW_Sample_MakePMI()
599 textstyle.
Ratio() = 1.0;
614 symb->Texts() = compotext;
618 double arrowlength = 5.5;
622 leader->GetInfo()->SetColor(
Dtk_RGB(0, 0, 255));
623 leader->GetInfo()->SetCurveThickNessInMM(0.7);
625 leader->GetInfo()->AddAttribute(
"NX_TextToLineGap", 10.0);
626 leader->GetInfo()->AddAttribute(
"NX_TextOverStubFactor", 0.1);
628 leader->GetInfo()->AddAttribute(
"NX_StubLength", 20.0);
629 leader->GetInfo()->AddAttribute(
"NX_StubSide", 1);
630 leader->GetInfo()->AddAttribute(
"NX_TextAlignment", 1);
632 leader->GetArrowHead().GetInfo()->AddAttribute(
"NX_ArrowAngle", 30.0);
633 leader->GetArrowHead().GetInfo()->AddAttribute(
"NX_DotDiameter", 1.5);
634 leader->GetArrowHead().GetInfo()->SetColor(
Dtk_RGB(255, 0, 255));
635 leader->GetArrowHead().GetInfo()->SetCurveThickNessInMM(2.0);
636 leader->GetArrowHead().GetInfo()->SetCurveLineType(
DTK_SOLIDLINE);
638 symb->AddLeader(leader);
649 pmi->info()->SetName(
"MyAnnot");
◆ UgwAnnot()
Sample 4.1: writes a cube body and a PMI annotation (symbol with leader) into an NX file.
669 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwAsm()
Sample 3.1: writes a multi-level NX assembly with named instances, colors, layers, re-instancing and wireframe.
534 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwColors()
Sample 2.5: writes a cube with a custom NX color table (217 entries) and then writes colored bodies.
454 for (
int colorIdx = 0; colorIdx < 217; colorIdx++)
464 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwExternAsm()
Sample 3.2: writes an NX assembly referencing previously written external .prt files.
576 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwExternJTMesh()
Sample 1.7: embeds an existing JT mesh stream into an NX file as external reference.
253 std::cout <<
"error : " << inJtFilePath.
c_str() <<
" does not exist" << std::endl;
257 fseek(jtFile, 0, SEEK_END);
258 flux.
resize(ftell(jtFile));
259 fseek(jtFile, 0, SEEK_SET);
261 fread(&flux[0], 1, flux.
size(), jtFile);
273 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwExternParasolid()
Sample 1.6: embeds an existing Parasolid binary stream into an NX file as an external reference.
218 std::cout <<
"error : " << inParasolidFilePath.
c_str() <<
" does not exist" << std::endl;
222 fseek(parasolidFile, 0, SEEK_END);
223 flux.
resize(ftell(parasolidFile));
224 fseek(parasolidFile, 0, SEEK_SET);
226 fread(&flux[0], 1, flux.
size(), parasolidFile);
227 fclose(parasolidFile);
239 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwGroups()
Sample 2.2: writes bodies and a mesh grouped under named entity groups.
317 cube1->info()->SetName(
"FirstCube");
319 cube2->info()->SetName(
"SecondCube");
320 Dtk_transfo translate(
Dtk_dir(1, 0, 0),
Dtk_dir(0, 1, 0),
Dtk_dir(0, 0, 1),
Dtk_pnt(200, 0, 0));
321 cube2->Transform(translate);
323 CylMesh->info()->SetName(
"OneMesh");
324 Dtk_transfo translatescale(
Dtk_dir(10, 0, 0),
Dtk_dir(0, 10, 0),
Dtk_dir(0, 0, 10),
Dtk_pnt(-100, 0, 0));
325 CylMesh->Transform(translatescale);
327 WireBody->Transform(translatescale);
332 cube1->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub1\\"));
335 cube2->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub1\\\\GroupRoot\\Sub2\\"));
338 CylMesh->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub2\\"));
341 WireBody->info()->AddAttribute(
"NXGROUPS",
Dtk_Val(
"GroupRoot\\Sub2\\"));
364 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwLayers()
Sample 2.1: writes a cube and a cylinder mesh each assigned to specific layers, with layer info set.
287 Dtk_transfo translatescale(
Dtk_dir(20, 0, 0),
Dtk_dir(0, 20, 0),
Dtk_dir(0, 0, 20),
Dtk_pnt(150, 0, 0));
288 CylMesh->Transform(translatescale);
294 CubeBody->info()->SetLayer(5);
295 CylMesh->info()->SetLayer(6);
305 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwMesh()
Sample 1.3: writes a cylinder mesh into an NX file.
80 CubeMesh->info()->SetName(
"MyMesh");
84 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwMeta()
Sample 2.4: writes a cube with metadata (properties in categories) and custom unit/tolerance defaults.
419 def.
unit = Ugw::DefaultParameters::Unit::inch;
439 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwReferences()
191 cube->info()->SetName(
"MyCube");
192 cube->info()->AddAttribute(
"NXNAME",
Dtk_Val(
"SOLIDBODYNAME"));
202 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwRefSets()
Sample 2.3: writes bodies assigned to NX reference sets via the NXREFERENCESET attribute.
377 cube1->info()->SetName(
"FirstCube");
379 cube2->info()->SetName(
"SecondCube");
380 Dtk_transfo translate(
Dtk_dir(1, 0, 0),
Dtk_dir(0, 1, 0),
Dtk_dir(0, 0, 1),
Dtk_pnt(200, 0, 0));
381 cube2->Transform(translate);
385 cube1->info()->AddAttribute(
"NXREFERENCESET",
Dtk_Val(
"MyRef1\\MyRef2\\MyRef3\\"));
387 cube2->info()->AddAttribute(
"NXREFERENCESET",
Dtk_Val(
"MyRef1\\MyRef3\\"));
397 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgWriteSample()
756 std::cout << std::endl <<
"----------------------------------------------" << std::endl;
757 std::cout <<
"Ug Write start" << std::endl;
759 nxDirectory = inResultDirectory + L
"NX-Unigraphics/";
764 inOutputDirectory = inResultDirectory + L
"NX-Unigraphics/nx5/";
766 inOutputDirectory.
mkdir();
770 inOutputDirectory = inResultDirectory + L
"NX-Unigraphics/nx1980/";
772 inOutputDirectory.
mkdir();
776 inOutputDirectory = inResultDirectory + L
"NX-Unigraphics/nx2212/";
778 inOutputDirectory.
mkdir();
781 std::cout <<
"Ug Write end" << std::endl;
◆ UgWriteSampleVersion()
Entry point: runs all UGW sample functions for the given NX format version and output directory.
685 currentOutputFile = inOutputDirectory + L
"simplebody.prt";
689 currentOutputFile = inOutputDirectory + L
"twobodies.prt";
690 errorStatus =
UgwTwoBodies(currentOutputFile, inVersion);
693 currentOutputFile = inOutputDirectory + L
"mesh.prt";
694 errorStatus =
UgwMesh(currentOutputFile, inVersion);
697 currentOutputFile = inOutputDirectory + L
"wire.prt";
698 errorStatus =
UgwWire(currentOutputFile, inVersion);
701 currentOutputFile = inOutputDirectory + L
"refs.prt";
705 currentOutputFile = inOutputDirectory + L
"extparasolid.prt";
706 errorStatus =
UgwExternParasolid(currentOutputFile,
"../InputFiles/Models/Parasolid/extparasolid.x_b", inVersion);
709 currentOutputFile = inOutputDirectory + L
"extjt.prt";
710 errorStatus =
UgwExternJTMesh(currentOutputFile,
"../InputFiles/Models/JT/externjt.jt", inVersion);
713 currentOutputFile = inOutputDirectory + L
"layers.prt";
714 errorStatus =
UgwLayers(currentOutputFile, inVersion);
717 currentOutputFile = inOutputDirectory + L
"groups.prt";
718 errorStatus =
UgwGroups(currentOutputFile, inVersion);
721 currentOutputFile = inOutputDirectory + L
"refsets.prt";
722 errorStatus =
UgwRefSets(currentOutputFile, inVersion);
725 currentOutputFile = inOutputDirectory + L
"meta.prt";
726 errorStatus =
UgwMeta(currentOutputFile, inVersion);
729 currentOutputFile = inOutputDirectory + L
"colors.prt";
730 errorStatus =
UgwColors(currentOutputFile, inVersion);
733 currentOutputFile = inOutputDirectory + L
"asm.prt";
734 errorStatus =
UgwAsm(currentOutputFile, inVersion);
737 currentOutputFile = inOutputDirectory + L
"externasm.prt";
738 errorStatus =
UgwExternAsm(currentOutputFile, inVersion);
741 currentOutputFile = inOutputDirectory + L
"annot.prt";
742 errorStatus =
UgwAnnot(currentOutputFile, inVersion);
◆ UgwSimpleBody()
Sample 1.1: writes a single BRep cube body into an NX file.
34 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwTwoBodies()
Sample 1.2: writes two named cubes (translated apart) into an NX file.
51 cube1->info()->SetName(
"FirstCube");
53 cube2->info()->SetName(
"SecondCube");
55 Dtk_transfo translate(
Dtk_dir(1, 0, 0),
Dtk_dir(0, 1, 0),
Dtk_dir(0, 0, 1),
Dtk_pnt(200, 0, 0));
56 cube2->Transform(translate);
67 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
◆ UgwWire()
Sample 1.4: writes a wireframe body (curves) into an NX file.
99 std::cout <<
"=> " << inOutputFileName.
c_str() << std::endl;
static Dtk_SmartPtr< Dtk_Info > Create()
Calls default constructor to allocate a new object.
Dtk_Double64 & Ratio()
Retrieves the text ratio - get/set -.
Dtk_SmartPtr< Dtk_Info > Dtk_InfoPtr
Handles a Dtk_Info object.
Definition: util_ptr_dtk.hpp:312
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
General solid_body
Definition: ugw.hpp:45
Dtk_ErrorStatus WriteAxisSystem(const Dtk_AxisSystemPtr &inAxisSystem)
Add an axis system into the current node.
Dtk_BodyPtr MakeRefAxis()
Definition: testlibugwrite.cpp:155
TextJustificationEnum & Justification()
Retrieves the text justification - get/set -.
Dtk_ErrorStatus AddAttribute(Dtk_string name, Dtk_Val val)
@ JustificationLeft
Definition: util_draw_dtk.hpp:281
ObjectPreferences objectpreferences
Definition: ugw.hpp:52
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.
Dtk_ErrorStatus SetName(Dtk_string inName)
Dtk_ErrorStatus SetColorInTable(size_t inIth, const Dtk_RGB &inColor, const Dtk_string &inColorname)
Replace color value and color name on the palette.
This is the text_style. This class gathers information about text style.
Definition: util_draw_dtk.hpp:242
@ dtkErrorFileNotExist
Definition: error_dtk.hpp:103
Dtk_BodyPtr MakeRefPlane()
Definition: testlibugwrite.cpp:121
Dtk_ErrorStatus SetLayerData(const Dtk_LayerInfosSetPtr &inLayerDataSet, const Dtk_tab< Dtk_Int32 > &unused1=Dtk_tab< Dtk_Int32 >(), const Dtk_tab< Dtk_Int32 > &unused2=Dtk_tab< Dtk_Int32 >())
define Data for layers
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_ErrorStatus UgwSimpleBody(const Dtk_string &inOutputFileName, int inVersion)
Sample 1.1: writes a single BRep cube body into an NX file.
Definition: testlibugwrite.cpp:18
Dtk_ErrorStatus UgwReferences(const Dtk_string &inOutputFileName, int inVersion)
Definition: testlibugwrite.cpp:186
#define DTK_TRUE
Definition: define.h:726
Dtk_ErrorStatus UgwRefSets(const Dtk_string &inOutputFileName, int inVersion)
Sample 2.3: writes bodies assigned to NX reference sets via the NXREFERENCESET attribute.
Definition: testlibugwrite.cpp:374
#define DTK_UGW_VERSION_NX5
Definition: ugw.hpp:7
@ dtk_text_type_value
Definition: str_def.h:14
This is a high level string class.
Definition: dtk_string.hpp:53
Dtk_ErrorStatus UgwTwoBodies(const Dtk_string &inOutputFileName, int inVersion)
Sample 1.2: writes two named cubes (translated apart) into an NX file.
Definition: testlibugwrite.cpp:44
Dtk_ErrorStatus WriteReferenceGeometry(const Dtk_BodyPtr &inRefgeom)
Add a reference geometry into the current node.
Dtk_ErrorStatus UgWriteSampleVersion(const Dtk_string &inOutputDirectory, int inVersion)
Entry point: runs all UGW sample functions for the given NX format version and output directory.
Definition: testlibugwrite.cpp:679
Dtk_ErrorStatus UgwExternJTMesh(const Dtk_string &inOutputFileName, const Dtk_string &inJtFilePath, int inVersion)
Sample 1.7: embeds an existing JT mesh stream into an NX file as external reference.
Definition: testlibugwrite.cpp:248
Dtk_ErrorStatus WriteExternJtMesh(const char *inFlux, size_t inSize, const Dtk_InfoPtr &inInf)
Add a JT file as lightweight body inside the file.
This is the base text class. It's part of Dtk_CompositeText. This class represents the texts and valu...
Definition: util_draw_dtk.hpp:1041
Dtk_ErrorStatus UgwMesh(const Dtk_string &inOutputFileName, int inVersion)
Sample 1.3: writes a cylinder mesh into an NX file.
Definition: testlibugwrite.cpp:77
static Dtk_BodyPtr Create()
Create a body.
Dtk_ErrorStatus WriteBody(const Dtk_BodyPtr &inBody)
Add a body inside the file.
Dtk_ErrorStatus UgwWire(const Dtk_string &inOutputFileName, int inVersion)
Sample 1.4: writes a wireframe body (curves) into an NX file.
Definition: testlibugwrite.cpp:93
FILE * OpenFile(const Dtk_string &inRights) const
File Utility : Open a file with the given rights.
Dtk_BodyPtr MakeFixedRefPlane()
Definition: testlibugwrite.cpp:137
@ DTK_SOLIDLINE
Definition: util_ent_dtk.hpp:49
static Dtk_SymbolPtr Create()
Calls default constructor to allocate a new object.
Dtk_ErrorStatus SetBlankedStatus(const Dtk_Int32 &inBlankedStatus)
Dtk_ErrorStatus UgwGroups(const Dtk_string &inOutputFileName, int inVersion)
Sample 2.2: writes bodies and a mesh grouped under named entity groups.
Definition: testlibugwrite.cpp:314
void add_int(const int integer, int force_unsigned_int=0)
concat an int to the Dtk_string (convert the int to Dtk_string)
Definition: dtk_val.hpp:67
static Dtk_FacePtr Create(const Dtk_BodyPtr &inParentBody)
Create a face in a body.
Dtk_FdtPtr UGW_Sample_MakePMI()
Definition: testlibugwrite.cpp:587
Dtk_AxisSystemPtr MakeAxisSystem()
Definition: testlibugwrite.cpp:109
Dtk_InfoPtr MakeInstanceData(const Dtk_string &inInstanceName, const Dtk_RGB &inColor, bool inVisible, int inLayer)
Definition: testlibugwrite.cpp:474
double distance_tolerance
Definition: ugw.hpp:23
static Dtk_SmartPtr< Dtk_AxisSystem > Create()
Calls default constructor to allocate a new object.
void resize(Dtk_Size_t n, const T &t)
Resizes the array.
Definition: util_stl_dtk.hpp:604
Dtk_ErrorStatus UgwLayers(const Dtk_string &inOutputFileName, int inVersion)
Sample 2.1: writes a cube and a cylinder mesh each assigned to specific layers, with layer info set.
Definition: testlibugwrite.cpp:283
Dtk_ErrorStatus WritePMI(const Dtk_FdtPtr &inPmi)
Add a pmi inside the file.
Dtk_ErrorStatus WriteExternParasolidBody(const char *inFlux, size_t inSize, const Dtk_InfoPtr &inInf)
Add a Parasolid file as body inside the file.
Dtk_ErrorStatus UgwExternAsm(const Dtk_string &inOutputFileName, int inVersion)
Sample 3.2: writes an NX assembly referencing previously written external .prt files.
Definition: testlibugwrite.cpp:553
Dtk_ErrorStatus UgwAsm(const Dtk_string &inOutputFileName, int inVersion)
Sample 3.1: writes a multi-level NX assembly with named instances, colors, layers,...
Definition: testlibugwrite.cpp:487
Dtk_ErrorStatus CloseLastInstance()
Close the last instance.
Dtk_RGB background_color_top
Definition: ugw.hpp:36
@ DTK_PHANTOM
Definition: util_ent_dtk.hpp:53
Dtk_ErrorStatus SetGroupDatas(const Dtk_string &inGroupName, Dtk_InfoPtr inInfos)
define Visibility for a specific group
static Dtk_SmartPtr< T > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
Dtk_ErrorStatus SetCurveThickNessInMM(const Dtk_Double64 inCurveThickNessInMM)
Dtk_ErrorStatus
Definition: error_dtk.hpp:6
General def
Definition: ugw.hpp:45
static Dtk_FdtPtr Create()
Calls default constructor to allocate a new object.
void SetGeom(const Dtk_SurfacePtr &inSurface)
Set Geometry.
Dtk_ErrorStatus UgwMeta(const Dtk_string &inOutputFileName, int inVersion)
Sample 2.4: writes a cube with metadata (properties in categories) and custom unit/tolerance defaults...
Definition: testlibugwrite.cpp:414
Dtk_LayerInfosSetPtr CreateSetWithFlagsAndFilters()
Creates a layer info set with 257 layers (indices 0-256), alternating visible/selectable flags,...
Definition: testcreatelayerinfoset.cpp:81
#define CHECK_OK(X)
Definition: testwriters.h:8
Definition: util_ptr_dtk.hpp:37
Dtk_MetaDataPtr MakeMetaData(const Dtk_string &inPropertyName, const Dtk_string &inValue, const Dtk_string &inCategory="")
Definition: testlibugwrite.cpp:406
const char * c_str() const
Retrieve the ASCII conversion string.
static Dtk_PointPtr Create(const Dtk_Point &in)
Calls copy constructor to allocate a new object.
Dtk_MeshPtr CreateMeshCylinder(int nbpoints)
Mesh Cylinder sample.
Definition: testcreatemesh.cpp:338
Dtk_RGB background_color_bottom
Definition: ugw.hpp:36
ModelingPreferences modelingpreferences
Definition: ugw.hpp:35
int mkdir() const
File Utility : Create a Directory.
Dtk_ErrorStatus SetLayer(const Dtk_Int32 &inLayer)
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
Unit unit
Definition: ugw.hpp:19
void FixPathSeparator()
File Utility : Fixes path separator consistency. It lets you replace the '\' or '/' by the OS needed ...
This is the composite text class. It's basically a Dtk_Text Container. This class represents a group ...
Definition: util_draw_dtk.hpp:1445
double density
Definition: ugw.hpp:25
DensityUnit density_unit
Definition: ugw.hpp:30
Dtk_ErrorStatus UgwColors(const Dtk_string &inOutputFileName, int inVersion)
Sample 2.5: writes a cube with a custom NX color table (217 entries) and then writes colored bodies.
Definition: testlibugwrite.cpp:449
@ lb_ft3
Definition: ugw.hpp:28
static Dtk_LeaderPtr Create()
Calls default constructor to allocate a new object.
static Dtk_LinePtr Create(const Dtk_Line &in)
Calls copy constructor to allocate a new object.
Dtk_Double64 & CharHeight()
Retrieves the char height - get/set -.
#define NX_RETRIEVE_ASSEMBLYDATA
Definition: testlibugwrite.cpp:548
This is a high level array class.
Definition: util_stl_dtk.hpp:84
Dtk_ErrorStatus WriteMesh(const Dtk_MeshPtr &inMesh)
Add a mesh inside the file.
void addTranslate(const Dtk_dir &V)
Translate the Dtk_transfo.
Dtk_BodyPtr CreateCube()
Creates a 100x100x100 mm closed BRep cube body. Builds the full BRep hierarchy (Vertex,...
Definition: testcreatecube.cpp:1325
Dtk_Size_t size() const
Returns the size of the array.
Definition: util_stl_dtk.hpp:503
Dtk_ErrorStatus AddMetaData(const Dtk_MetaDataPtr &inMeta)
Add a MetaData in the current component.
#define DTK_UGW_VERSION_NX1980
Definition: ugw.hpp:8
Dtk_ErrorStatus InitFile(const Dtk_string &inFilename, int inVersiontowrite=45, const DefaultParameters &inDef=DefaultParameters())
Initialize UG Writer.
Dtk_ErrorStatus OpenInstance(const Dtk_string &inInstanceName, const Dtk_string &inProtoFileName, Dtk_bool &outWasAlreadyInstancied, const Dtk_transfo &inTrans, const Dtk_RGB &inRgb)
deprecated
#define DTK_RB
Definition: dtk_string.hpp:35
double angle_tolerance
Definition: ugw.hpp:24
LeaderTerminatorTypeEnum
Internal leader terminator type.
Definition: util_draw_dtk.hpp:1852
Dtk_Double64 width
Definition: ugw.hpp:42
Dtk_BodyPtr CreateCurves()
Creates a wireframe body containing a circle, ellipse, line, and NURBS curve, each with a distinct co...
Definition: testcreatecube.cpp:1368
Dtk_ErrorStatus UgwExternParasolid(const Dtk_string &inOutputFileName, const Dtk_string &inParasolidFilePath, int inVersion)
Sample 1.6: embeds an existing Parasolid binary stream into an NX file as an external reference.
Definition: testlibugwrite.cpp:213
@ dtkNoError
Definition: error_dtk.hpp:151
void push_back(const T &x)
Inserts an element at the end of the array.
Definition: util_stl_dtk.hpp:416
static Dtk_ShellPtr Create(const Dtk_BodyPtr &inParentBody)
Create a shell in a body.
Dtk_BodyPtr MakeRefPoint()
Definition: testlibugwrite.cpp:171
void AddText(Dtk_Text inText)
Adds a Dtk_Text to the Dtk_CompositeText.
Definition: dtk_rgb.hpp:8
Dtk_ErrorStatus SetColor(const int &R, const int &G, const int &B)
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:450
This is a mathematical direction class.
Definition: dtk_dir.hpp:14
#define DTK_UGW_VERSION_NX2212
Definition: ugw.hpp:9
@ TerminatorTypeFillArrow
Definition: util_draw_dtk.hpp:1860
Dtk_ErrorStatus EndFile()
Close the UG file.
Dtk_ErrorStatus UgwAnnot(const Dtk_string &inOutputFileName, int inVersion)
Sample 4.1: writes a cube body and a PMI annotation (symbol with leader) into an NX file.
Definition: testlibugwrite.cpp:654
#define DTK_PI
Definition: str_def.h:8