 |
DATAKIT SDK
V2026.1
|
|
|
| enum | {
Lump = 1,
Volume = 2,
Shell = 3,
Vertex_A = 9,
Vertex_B = 11,
Vertex_C = 17,
Vertex_D = 23,
Vertex_E = 37,
Vertex_F = 45,
Vertex_G = 63,
Vertex_H = 81,
Edge_AB = 14,
Edge_CA = 20,
Edge_DC = 26,
Edge_BD = 30,
Edge_EA = 40,
Edge_FB = 48,
Edge_FE = 52,
Edge_GD = 66,
Edge_GF = 70,
Edge_HC = 84,
Edge_HG = 88,
Edge_EH = 96,
Coedge0_AB = 8,
Coedge1_AB = 42,
Coedge0_CA = 16,
Coedge5_CA = 112,
Coedge0_DC = 22,
Coedge3_DC = 78,
Coedge0_BD = 28,
Coedge2_BD = 60,
Coedge1_EA = 36,
Coedge5_EA = 114,
Coedge1_FB = 44,
Coedge2_FB = 58,
Coedge1_FE = 50,
Coedge2_GD = 62,
Coedge3_GD = 76,
Coedge4_FE = 98,
Coedge2_GF = 68,
Coedge4_GF = 100,
Coedge3_HC = 80,
Coedge5_HC = 110,
Coedge3_HG = 86,
Coedge4_HG = 102,
Coedge4_EH = 94,
Coedge5_EH = 108,
Loop0_ABCD = 7,
Loop1_ABFE = 35,
Loop2_FBDG = 57,
Loop3_GDCH = 75,
Loop4_EFGH = 93,
Loop5_EHCA = 107,
FaceABCD = 5,
FaceABFE = 33,
FaceFBDG = 55,
FaceGDCH = 73,
FaceEFGH = 91,
FaceEHCA = 105
} |
| |
◆ anonymous enum
| Enumerator |
|---|
| Lump | |
| Volume | |
| Shell | |
| Vertex_A | |
| Vertex_B | |
| Vertex_C | |
| Vertex_D | |
| Vertex_E | |
| Vertex_F | |
| Vertex_G | |
| Vertex_H | |
| Edge_AB | |
| Edge_CA | |
| Edge_DC | |
| Edge_BD | |
| Edge_EA | |
| Edge_FB | |
| Edge_FE | |
| Edge_GD | |
| Edge_GF | |
| Edge_HC | |
| Edge_HG | |
| Edge_EH | |
| Coedge0_AB | |
| Coedge1_AB | |
| Coedge0_CA | |
| Coedge5_CA | |
| Coedge0_DC | |
| Coedge3_DC | |
| Coedge0_BD | |
| Coedge2_BD | |
| Coedge1_EA | |
| Coedge5_EA | |
| Coedge1_FB | |
| Coedge2_FB | |
| Coedge1_FE | |
| Coedge2_GD | |
| Coedge3_GD | |
| Coedge4_FE | |
| Coedge2_GF | |
| Coedge4_GF | |
| Coedge3_HC | |
| Coedge5_HC | |
| Coedge3_HG | |
| Coedge4_HG | |
| Coedge4_EH | |
| Coedge5_EH | |
| Loop0_ABCD | |
| Loop1_ABFE | |
| Loop2_FBDG | |
| Loop3_GDCH | |
| Loop4_EFGH | |
| Loop5_EHCA | |
| FaceABCD | |
| FaceABFE | |
| FaceFBDG | |
| FaceGDCH | |
| FaceEFGH | |
| FaceEHCA | |
◆ CreateAxis()
1558 mybody->get_info()->SetInfiniteGeometryFlag(
DTK_TRUE );
1559 mybody->get_info()->SetRefEntityFlag(
DTK_TRUE );
1564 lineptr->info()->SetColor(
Dtk_RGB( 0, 255, 25, 255 ) );
1565 lineptr->info()->SetName( L
"myaxe" );
1570 ArrayMetadataEntity.
push_back( metadata );
1571 lineptr->info()->SetMetaData( ArrayMetadataEntity );
1575 shell->AddWire( CurveArray );
1576 mybody->AddWireShell( shell );
◆ CreateAxisSystem()
1529 dtk_transfo.
setXdir( 0.0, 0.0, 1.0 );
1530 dtk_transfo.
setYdir( -1.0, 0.0, 0.0 );
1531 dtk_transfo.
setZdir( 0.0, -1.0, 0.0 );
1533 mycsystem->SetMatrix( dtk_transfo );
1535 mycsystem->info()->SetName( L
"mycsystem" );
1536 mycsystem->info()->SetColor(
Dtk_RGB( 255, 0, 0, 255 ) );
1537 mycsystem->info()->SetLayer( 123 );
1542 ArrayMetadataEntity.
push_back( metadata );
1543 mycsystem->info()->SetMetaData( ArrayMetadataEntity );
◆ CreateConstructionPlane()
1163 body->AddOpenShell( shell );
1165 body->info()->SetName(
"Plane Y=50" );
◆ CreateCube()
1318 std::map<Dtk_ID, Dtk_EntityPtr> array_topo;
1322 body->info()->SetName( L
"Body" );
1326 ArrayMetadataEntity.
push_back( metadata );
1327 body->info()->SetMetaData( ArrayMetadataEntity );
1329 CreateTopoVertex( array_topo, body );
1330 CreateTopoEdge( array_topo, body );
1331 CreateTopoCoEdge( array_topo, body );
1332 CreateTopoLoop( array_topo, body );
1333 CreateTopoFace( array_topo, body );
1334 CreateTopoShell( array_topo, body );
1335 CreateTopoVolume( array_topo, body );
1336 CreateTopoLump( array_topo, body );
◆ CreateCube_2()
1066 std::map<Dtk_ID, Dtk_EntityPtr> array_topo;
1070 CreateTopoVertex_2( array_topo, body );
1071 CreateTopoEdge_2( array_topo, body );
1072 CreateTopoCoEdge_2( array_topo, body );
1073 CreateTopoLoop_2( array_topo, body );
1074 CreateTopoFace_2( array_topo, body );
1075 CreateTopoShell_2( array_topo, body );
1076 CreateTopoVolume_2( array_topo, body );
1077 CreateTopoLump_2( array_topo, body );
1084 Dtk_Val valprop_area(
"1234 mm2" );
1085 body_info->
AddAttribute(
"geometric validation property : : surface area measure", valprop_area );
1086 Dtk_Val valprop_volume(
"5678 mm3" );
1087 body_info->
AddAttribute(
"geometric validation property : : volume measure", valprop_volume );
1089 body_info->
AddAttribute(
"geometric validation property : : centre point", valprop_CG );
◆ CreateCubeRenderInfos()
506 ambiant.
SetRGBA( 255, 255, 255 );
507 diffuse.
SetRGBA( 255, 255, 255 );
508 specular.
SetRGBA( 255, 255, 255 );
514 fileName =
"..\\InputImages\\sample.bmp";
515 texture->SetImagePath( fileName );
517 texture->SetScale( 2, 2 );
◆ CreateCurves()
1372 mycurve->info()->SetColor(
Dtk_RGB( 255, 0, 255 ) );
1373 mycurve->info()->SetName(
"mycircle" );
1378 myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.0, 0.0, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 10.0, 5.0 );
1381 mycurve->info()->SetColor(
Dtk_RGB( 255, 255, 0 ) );
1382 mycurve->info()->SetName(
"myellipse" );
1391 mycurve->info()->SetColor(
Dtk_RGB( 0, 0, 255 ) );
1392 mycurve->info()->SetName(
"myline" );
1402 ControlPoints.
resize( 4 );
1403 ControlPoints[ 0 ] =
Dtk_pnt( -5.0, 0.0, 0.0 );
1404 ControlPoints[ 1 ] =
Dtk_pnt( -2.0, 5.0, 0. );
1405 ControlPoints[ 2 ] =
Dtk_pnt( 2.0, -5.0, 0. );
1406 ControlPoints[ 3 ] =
Dtk_pnt( 5.0, 0.0, 0. );
1408 Knots[ 0 ] = Knots[ 1 ] = Knots[ 2 ] = Knots[ 3 ] = 0.0;
1409 Knots[ 4 ] = Knots[ 5 ] = Knots[ 6 ] = Knots[ 7 ] = 1.0;
1414 mycurve->info()->SetColor(
Dtk_RGB( 0, 255, 0 ) );
1415 mycurve->info()->SetName(
"mynurbs" );
1420 myshell->AddWire( mycurves );
1421 mybody->AddWireShell( myshell );
1426 ArrayMetadataEntity.
push_back( metadata );
1429 mybody->info()->SetMetaData( ArrayMetadataEntity );
◆ CreateCurves_2()
1124 mycurve->info()->SetColor(
Dtk_RGB( 255, 0, 255 ) );
1125 mycurve->info()->SetName(
"mycircle" );
1134 mycurve->info()->SetColor(
Dtk_RGB( 0, 0, 255 ) );
1135 mycurve->info()->SetName(
"myline" );
1139 myshell->AddWire( mycurves );
1140 mysbody->AddWireShell( myshell );
1145 Dtk_Val valprop_curve_length(
"1234 mm" );
1146 body_info->
AddAttribute(
"geometric validation property : : curve length measure", valprop_curve_length );
◆ CreateCurvesStyle()
1444 ellipsethick->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
1445 ellipsethick->info()->SetCurveThickNessInMM( 4 );
1451 ellipsedash->info()->SetColor(
Dtk_RGB( 0, 0, 255 ) );
1452 ellipsedash->info()->SetCurveLineType(
DTK_DASHED );
1457 ellipsedotted->info()->SetColor(
Dtk_RGB( 255, 0, 255 ) );
1458 ellipsedotted->info()->SetCurveLineType(
DTK_DOTTED );
1459 ellipsedotted->info()->SetCurveThickNessInMM( 2 );
1462 myshell->AddWire( mycurves );
1463 mybody->AddWireShell( myshell );
◆ CreateCyl()
| Dtk_BodyPtr sampleWriter::CreateCyl |
( |
double |
radius, |
|
|
double |
height |
|
) |
| |
1756 body->AddLump( lump );
1757 lump->AddVolume( volume );
1758 volume->AddOuterShell( shell );
1761 P[ 0 ] =
Dtk_pnt( radius, 0, 0 );
1762 P[ 1 ] =
Dtk_pnt( radius, 0, height );
1763 P[ 2 ] =
Dtk_pnt( -radius, 0, height );
1764 P[ 3 ] =
Dtk_pnt( -radius, 0, 0 );
1767 for( i = 0; i < 4; i++ )
1768 v[ i ] = MakeVertex( body, P[ i ] );
1770 e[ 0 ] = MakeEdge( body, v[ 0 ], v[ 1 ], MakeSegment( P[ 0 ], P[ 1 ] ), 1 );
1771 e[ 1 ] = MakeEdge( body, v[ 2 ], v[ 3 ], MakeSegment( P[ 2 ], P[ 3 ] ), 2 );
1772 e[ 2 ] = MakeEdge( body, v[ 3 ], v[ 0 ], MakeArc2D(
Dtk_pnt(), radius, -
DTK_PI, 0 ), 3 );
1773 e[ 3 ] = MakeEdge( body, v[ 0 ], v[ 3 ], MakeArc2D(
Dtk_pnt(), radius, 0,
DTK_PI ), 4 );
1774 e[ 4 ] = MakeEdge( body, v[ 2 ], v[ 1 ], MakeArc2D(
Dtk_pnt( 0, 0, height ), radius, -
DTK_PI, 0 ), 5 );
1775 e[ 5 ] = MakeEdge( body, v[ 1 ], v[ 2 ], MakeArc2D(
Dtk_pnt( 0, 0, height ), radius, 0,
DTK_PI ), 6 );
1778 MakeCoedge( body, e[ 0 ],
DTK_TRUE, MakeSegment2D( 0, 0, 0, height ) ),
1779 MakeCoedge( body, e[ 4 ],
DTK_FALSE, MakeSegment2D( 0, height, -
DTK_PI, height ) ),
1781 MakeCoedge( body, e[ 2 ],
DTK_TRUE, MakeSegment2D( -
DTK_PI, 0, 0, 0 ) )
1787 MakeCoedge( body, e[ 3 ],
DTK_TRUE, MakeSegment2D( 0, 0,
DTK_PI, 0 ) ),
1789 MakeCoedge( body, e[ 5 ],
DTK_FALSE, MakeSegment2D(
DTK_PI, height, 0, height ) ),
1790 MakeCoedge( body, e[ 0 ],
DTK_FALSE, MakeSegment2D( 0, height, 0, 0 ) )
1800 shell->AddFace( plandown,
DTK_TRUE );
1808 shell->AddFace( planup,
DTK_TRUE );
1809 FillInfos( planup->
info(), 4,
Dtk_RGB( 0, 255, 0 ) );
◆ CreateCylinder()
1187 Dtk_pnt cent1( 0., 0., 100. );
1196 trim[ 0 ] = -100.; trim[ 1 ] = 100.; trim[ 2 ] = -100.; trim[ 3 ] = 100.;
1197 plan1->SetTrimUVBox( trim );
1199 plan2->SetTrimUVBox( trim );
1201 trim[ 0 ] = 0.; trim[ 1 ] = 2. *
DTK_PI;
1202 cylsurf->SetTrimUVBox( trim );
1213 E0->SetStartVertex( V1 );
1214 E0->SetEndVertex( V2 );
1217 E1->SetStartVertex( V1 );
1218 E1->SetEndVertex( V1 );
1221 E2->SetStartVertex( V2 );
1222 E2->SetEndVertex( V2 );
1227 SetTopoFaceID( F0, 10 );
1230 SetTopoFaceID( F1, 20 );
1235 SetTopoFaceID( F2, 30 );
1270 VOL->AddOuterShell( SH );
1272 Lump->AddVolume( VOL );
1273 mysbody->AddLump(
Lump );
1275 mysbody->info()->SetColor(
Dtk_RGB( 0, 255, 0 ) );
◆ CreateDimension()
123 Dtk_bool horiz_vert = 0, mirror = 0, font_index = 0;
131 text_style.
Slant() = slant;
137 double x_len = 15., y_len = 5.;
138 Dtk_dir x_dir( 1., 0., 0. ), y_dir( 0., 0., 1. );
155 Dtk_Text dtk_text( str, inbox, inbox, dtk_align, text_type, horiz_vert, text_info, text_style, slant, font_index, mirror );
169 double arrow_width = 5., arrow_length = 5.;
186 dimension->AddLeader( leader1 );
202 dimension->AddLeader( leader2 );
207 fdt_transf.
setXdir( 0., 1., 0. );
208 fdt_transf.
setYdir( -1., 0., 0. );
209 fdt->Transform( fdt_transf );
213 fdt_info->
SetName(
"Dimension:1" );
214 fdt->info() = fdt_info;
218 ArrayMetadataEntity.
push_back( metadata );
219 fdt->info()->SetMetaData( ArrayMetadataEntity );
◆ CreateEsquisse2D()
1695 myarccircle =
Dtk_Ellipse::Create(
Dtk_pnt( 1.0, 0.5, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.5, 0.5 );
1696 myarccircle->SetTrimmingParameters( -1.0 *
DTK_PI / 2.0,
DTK_PI / 2.0 );
1699 myarccircle =
Dtk_Ellipse::Create(
Dtk_pnt( 0.0, 0.5, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.5, 0.5 );
1700 myarccircle->SetTrimmingParameters(
DTK_PI / 2.0, 3.0 *
DTK_PI / 2.0 );
1709 myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.5, 0.25, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.25, 0.1 );
1713 myarcellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.5, 0.75, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.25, 0.1 );
1714 myarcellipse->SetTrimmingParameters( -1.0 *
DTK_PI / 2.0,
DTK_PI / 2.0 );
1717 myarcellipse =
Dtk_Ellipse::Create(
Dtk_pnt( 0.5, 0.75, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 0.25, 0.1 );
1718 myarcellipse->SetTrimmingParameters(
DTK_PI / 2.0, 3.0 *
DTK_PI / 2.0 );
1728 myshell->AddWire( ArrayPoint );
1729 myshell->AddWire( ArrayCurve );
1731 mybody->AddWireShell( myshell );
1734 mybody->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
1735 mybody->info()->SetName( L
"CreateEsquisse2D" );
1740 mybody->Transform( transfo );
1744 ArrayMetadataEntity.
push_back( metadata );
1745 mybody->info()->SetMetaData( ArrayMetadataEntity );
◆ CreateEsquisse3D()
1601 mypoint->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
1603 name.add_int( (
int )i );
1604 mypoint->info()->SetName( name );
1620 myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( -10.0 + 10 * i, 15, 0.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 4.0, 2.5 );
1633 for(
Dtk_Size_t i = 0; i < NbArcCircle; i++ )
1638 myellipse->SetTrimmingParameters( 0.0,
DTK_PI );
1645 myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( -10.0 + 10 * i, 35, 3.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 3.0, 1.0 );
1649 for(
Dtk_Size_t i = 0; i < NbArcEllipse; i++ )
1652 myellipse =
Dtk_Ellipse::Create(
Dtk_pnt( -10.0 + 10 * i, 40, 2.0 ),
Dtk_dir( 0.0, 0.0, 1.0 ),
Dtk_dir( 1.0, 0.0, 0.0 ), 3.0, 1.0 );
1653 myellipse->SetTrimmingParameters( 0.0,
DTK_PI );
1663 myshell->AddWire( ArrayPoint );
1664 myshell->AddWire( ArrayCurve );
1666 mybody->AddWireShell( myshell );
1669 mybody->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
1670 mybody->info()->SetName( L
"CreateEsquisse3D" );
1674 ArrayMetadataEntity.
push_back( metadata );
1675 mybody->info()->SetMetaData( ArrayMetadataEntity );
◆ CreateFdtDatum()
Creates simple Datum.
20 Dtk_pnt arrow_location( 0., 0. );
33 Dtk_bool horiz_vert = 0, mirror = 0, font_index = 0;
41 text_style.
Slant() = slant;
47 double XLen = 5., YLen = 5.;
48 Dtk_dir XDir( 1., 0., 0. ), YDir( 0., 0., 1. );
65 Dtk_Text dtk_text( str, inbox, inbox, dtk_align, text_type, horiz_vert, text_info, text_style, slant, font_index, mirror );
75 framePolyline->AddPoint(
Dtk_pnt( 5., 28. ) );
76 framePolyline->AddPoint(
Dtk_pnt( -5., 28. ) );
77 framePolyline->AddPoint(
Dtk_pnt( -5., 18. ) );
84 leader_info->
SetColor( 255, 255, 255 );
85 leader->GetInfo() = leader_info;
87 symbol->AddLeader( leader );
96 fdt->Transform( fdt_transf );
100 fdt_info->
SetColor( 255, 255, 255 );
101 fdt_info->
SetName(
"Datum:1" );
102 fdt->info() = fdt_info;
106 ArrayMetadataEntity.
push_back( metadata );
107 fdt->info()->SetMetaData( ArrayMetadataEntity );
◆ CreateGeometricalTolerance()
| Dtk_FdtPtr sampleWriter::CreateGeometricalTolerance |
( |
| ) |
|
232 Dtk_bool horiz_vert = 0, mirror = 0, font_index = 0;
235 Dtk_dir x_dir( 1, 0, 0 ), normal_dir( 0, 0, 1 );
241 text_style.
Slant() = slant;
248 Dtk_pnt location_c( 0.0, 0.0 );
251 container_boxin.
Extend( -2., -2. );
262 MyGeometricalTolerance->AddToleranceSpecificationContainer( MyContainer );
270 Dtk_pnt location_v( 15.0, 0.0 );
273 container_boxvin.
Extend( -2., -2. );
276 val =
Dtk_Text( L
"0.02", container_boxvin, container_boxv, dtk_align,
DTK_Text_type::dtk_text_type_value, horiz_vert, text_info, text_style, slant, font_index, mirror );
280 Dtk_pnt locationm( 35.0, 0.0 );
283 container_boxmin.
Extend( -2., -2. );
285 Dtk_Text modifier =
Dtk_Text( L
"\u24C2", container_boxmin, container_boxm, dtk_align,
DTK_Text_type::dtk_text_type_modifier, horiz_vert, text_info, text_style, slant, font_index, mirror );
292 Dtk_pnt locationA( 50.0, 0.0 );
295 container_boxAin.
Extend( -2., -2. );
299 A_Block->AddReference( L
"A" );
300 RefFrame->AddReferenceBlock( A_Block );
304 MyToleranceSpecification->SetMainValue( fulltext );
307 MyContainer->AddToleranceSpecification( MyToleranceSpecification );
313 fdt_info->
SetColor( 255, 255, 255 );
314 fdt_info->
SetName(
"GeometricalTolerance" );
315 fdt->info() = fdt_info;
◆ CreateInfinitePlane()
1500 mybody->info()->SetInfiniteGeometryFlag(
DTK_TRUE );
1501 mybody->get_info()->SetRefEntityFlag(
DTK_TRUE );
1503 mybody->info()->SetColor(
Dtk_RGB( 255, 0, 0, 255 ) );
1504 mybody->info()->SetName( L
"myplan" );
1508 ArrayMetadataEntity.
push_back( metadata );
1509 mybody->info()->SetMetaData( ArrayMetadataEntity );
1518 plane->SetTrimUVBox( dom );
◆ CreateMeshCube()
Mesh Cube sample.
217 CreateMeshCubeGeometry( vertices, normals, uCoords, vCoords );
224 outCubeMesh->
add_vertex( &( vertices.
at( i ) ), &( normals.
at( i ) ), NULL, uCoords[ i ], vCoords[ i ] );
230 CreateMeshCubeFaces( outCubeMesh );
◆ CreateMeshCubeVertexColor()
| Dtk_MeshPtr sampleWriter::CreateMeshCubeVertexColor |
( |
| ) |
|
312 CreateMeshCubeGeometry( vertices, normals, uCoords, vCoords );
319 outCubeMesh->
add_vertex( &( vertices.
at( i ) ), &( normals.
at( i ) ), &red );
320 outCubeMesh->
add_vertex( &( vertices.
at( i + 1 ) ), &( normals.
at( i + 1 ) ), &green );
321 outCubeMesh->
add_vertex( &( vertices.
at( i + 2 ) ), &( normals.
at( i + 2 ) ), &blue );
322 outCubeMesh->
add_vertex( &( vertices.
at( i + 3 ) ), &( normals.
at( i + 3 ) ), &all );
328 CreateMeshCubeFaces( outCubeMesh );
◆ CreateMeshCuboid()
468 inPoints.
first = inFirstPoint;
469 inPoints.
second = inSecondPoint;
472 CreateMeshCubeidGeometry( vertices, normals, uCoords, vCoords, inPoints );
478 outCuboidMesh->
add_vertex( &( vertices.
at( i ) ), &( normals.
at( i ) ), NULL, uCoords[ i ], vCoords[ i ] );
484 CreateMeshCubeFaces( outCuboidMesh );
491 return outCuboidMesh;
◆ CreateMeshCylinder()
| Dtk_MeshPtr sampleWriter::CreateMeshCylinder |
( |
int |
nbpoints | ) |
|
Mesh Cylinder sample.
355 double angle = i * 2 *
DTK_PI / nbpoints;
370 Dtk_RGB rgb( 255, 255, 0, 128 );
378 ArrayMetadataEntity.
push_back( metadata );
381 return outCylinderMesh;
◆ CreateMeshPoints()
Points mesh sample.
442 double coords[ 8 ][ 3 ] = { {-1,-1,-1},{-1,-1,1},{-1,1,-1},{-1,1,1},
443 {1,-1,-1},{1,-1,1},{1,1,-1},{1,1,1} };
445 for( i = 0; i < 8; i++ )
447 Dtk_pnt P( coords[ i ][ 0 ], coords[ i ][ 1 ], coords[ i ][ 2 ] );
◆ CreateMeshWire()
Wire mesh sample.
406 numVertices = vertices.
size();
407 for( i = 0; i < numVertices; i++ )
◆ CreateMixedBody()
1822 cyl->SetTrimUVBox( domain );
1824 cyl->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
1830 cyl->SetTrimUVBox( domain2 );
1832 cyl->info()->SetColor(
Dtk_RGB( 0, 255, 0 ) );
◆ CreateModelDisplayActivated()
329 resMD->info()->SetName(
"MyView1" );
◆ CreateModelDisplayDesactivated()
342 resMD->info()->SetName(
"MyView2" );
◆ CreateModelDisplayWithSection()
353 resMD->info()->SetName(
"MySectionView" );
◆ CreateOpenShell()
1348 cyl->SetTrimUVBox( domain );
◆ CreateOpenShell_2()
1099 cyl->SetTrimUVBox( domain );
◆ CreatePoint()
1481 mypoint->info()->SetColor(
Dtk_RGB( 255, 0, 0 ) );
1482 mypoint->info()->SetName(
"mypoint" );
1486 ArrayMetadataEntity.
push_back( metadata );
1487 mypoint->info()->SetMetaData( ArrayMetadataEntity );
1491 myshell->AddWire( mypoints );
1492 mybody->AddWireShell( myshell );
◆ CreateTexturedMeshCube()
Textured Mesh Cube sample.
277 meshTexture->SetImagePath( inImageDirectory +
"sample.bmp" );
278 meshTexture->SetScale( 2., 2. );
280 outCubeMesh->info()->AddRenderInfos( meshRender );
281 outCubeMesh->info()->SetName(
"TexturedMesh" );
286 faceTexture->SetImagePath( inImageDirectory +
"logodtk.bmp" );
287 faceTexture->SetScale( 2., 2. );
289 if( outCubeMesh->get_mesh_face( 2 )->info().
IsNULL() )
291 outCubeMesh->get_mesh_face( 2 )->info()->AddRenderInfos( faceRender );
◆ FillFacesColors()
| void sampleWriter::FillFacesColors |
( |
Dtk_MeshPtr & |
inoutCubeMesh | ) |
|
Filling mesh faces with colors.
245 inoutCubeMesh->get_mesh_face( 0 )->info() = infoFace0;
249 inoutCubeMesh->get_mesh_face( 1 )->info() = infoFace1;
253 inoutCubeMesh->get_mesh_face( 2 )->info() = infoFace2;
257 inoutCubeMesh->get_mesh_face( 3 )->info() = infoFace3;
261 inoutCubeMesh->get_mesh_face( 4 )->info() = infoFace4;
265 inoutCubeMesh->get_mesh_face( 5 )->info() = infoFace5;
@ Coedge0_DC
Definition: testcreatecube.cpp:39
@ Coedge3_HC
Definition: testcreatecube.cpp:53
static Dtk_ModelDisplayPtr Create(const Dtk_CameraPtr &inCamera, const Dtk_EntityPtr &inClippingEntity, const Dtk_bool inIsActivated)
Calls full featured constructor to allocate a new object.
static Dtk_ToleranceSpecificationPtr Create()
Calls default constructor to allocate a new object.
@ Loop5_EHCA
Definition: testcreatecube.cpp:64
Definition: util_stl_dtk.hpp:921
#define DTK_MESH_NORMAL
Definition: util_mesh_dtk.hpp:31
@ Edge_GD
Definition: testcreatecube.cpp:30
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
This is a high level face class.
Definition: util_mesh_dtk.hpp:865
void SetRGBA(const int &inRed, const int &inGreen, const int &inBlue, const int &inAlpha=-1)
Definition: dtk_rgb.hpp:49
static Dtk_TextureInfosPtr Create(const TextureMappingTypeEnum &inType)
Create a Dtk_TextureInfosPtr.
@ Coedge3_GD
Definition: testcreatecube.cpp:49
Dtk_ErrorStatus AddAttribute(Dtk_string name, Dtk_Val val)
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.
@ Vertex_A
Definition: testcreatecube.cpp:15
Dtk_ErrorStatus SetName(Dtk_string inName)
@ Edge_FB
Definition: testcreatecube.cpp:28
Dtk_MeshPtr CreateMeshCube()
Mesh Cube sample.
Definition: testcreatemesh.cpp:204
This is the text_style. This class gathers information about text style.
Definition: util_draw_dtk.hpp:250
@ Coedge5_CA
Definition: testcreatecube.cpp:38
void setOrigin(const Dtk_pnt &O)
Set a new O center point.
void setZdir(const Dtk_dir &Z)
Set a new Z vector.
@ Shell
Definition: testcreatecube.cpp:14
@ Edge_FE
Definition: testcreatecube.cpp:29
static Dtk_LoopPtr Create(const Dtk_BodyPtr &inParentBody)
Create a loop in a body.
@ Coedge4_HG
Definition: testcreatecube.cpp:56
@ Coedge5_EH
Definition: testcreatecube.cpp:58
#define DTK_TRUE
Definition: define.h:730
static Dtk_ToleranceSpecificationContainerPtr Create(const Dtk_ToleranceSpecificationContainer &in)
Calls copy constructor to allocate a new object.
@ dtk_text_type_value
Definition: str_def.h:14
uint32_t Dtk_UInt32
Definition: define.h:691
This is a high level string class.
Definition: dtk_string.hpp:53
@ DTK_ANCHOR_BOTTOM_LEFT
Definition: util_draw_dtk.hpp:97
size_t Dtk_Size_t
Definition: define.h:715
@ Volume
Definition: testcreatecube.cpp:13
@ Coedge4_GF
Definition: testcreatecube.cpp:52
int add_triangle_strip(const Dtk_tab< Dtk_UInt32 > *inIndices)
Add one triangle strip.
@ Edge_BD
Definition: testcreatecube.cpp:26
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:1110
@ Edge_HC
Definition: testcreatecube.cpp:32
static Dtk_RenderInfosPtr Create(const Dtk_string &inName)
Create a Dtk_RenderInfosPtr.
static Dtk_SmartPtr< Dtk_AxisSystem > create()
Calls default constructor to allocate a new object.
Dtk_ErrorStatus SetMetaData(Dtk_tab< Dtk_MetaDataPtr > &inArray)
@ Coedge5_EA
Definition: testcreatecube.cpp:44
@ Coedge3_HG
Definition: testcreatecube.cpp:55
static Dtk_BodyPtr Create()
Create a body.
#define DTK_MESH_XYZ
Definition: util_mesh_dtk.hpp:30
static Dtk_LightMapPtr Create(Dtk_RGB inAmbiant, Dtk_RGB inDiffuse, Dtk_RGB inSpecular)
Create a Dtk_LightMapPtr.
#define DTK_FALSE
Definition: define.h:731
Dtk_ErrorStatus AddOuterLoop(const Dtk_LoopPtr &inLoop)
Add outer loop on a face.
@ Edge_CA
Definition: testcreatecube.cpp:24
@ Coedge0_BD
Definition: testcreatecube.cpp:41
char Dtk_bool
Definition: define.h:728
Dtk_Double64 & Slant()
Retrieves the text slant - get/set -.
int add_vertex(const Dtk_pnt *inVertex, const Dtk_dir *inNormal=NULL, const Dtk_RGB *inColor=NULL, Dtk_Float32 inU=0., Dtk_Float32 inV=0., Dtk_Float32 inUBrep=0., Dtk_Float32 inVBrep=0.)
Add a vertex to the mesh vertices list.
void SetTexture(const Dtk_TextureInfosPtr &inTexture)
Set Dtk_Texture.
static Dtk_SymbolPtr Create()
Calls default constructor to allocate a new object.
#define DTK_MESH_UV_TEXTURES
Definition: util_mesh_dtk.hpp:33
@ DTK_ANCHOR_MIDDLE_CENTER
Definition: util_draw_dtk.hpp:95
@ Coedge2_GF
Definition: testcreatecube.cpp:51
@ Edge_EH
Definition: testcreatecube.cpp:34
double Dtk_Double64
Definition: define.h:702
@ Vertex_H
Definition: testcreatecube.cpp:22
void setXdir(const Dtk_dir &X)
Set a new X vector.
@ Coedge2_FB
Definition: testcreatecube.cpp:46
This is a high level mesh class.
Definition: util_mesh_dtk.hpp:485
@ DistanceDimension
Definition: util_draw_dtk.hpp:4739
T1 first
Definition: util_stl_dtk.hpp:923
Dtk_Double64 & CharWidth()
Retrieves the char width - get/set -.
@ FaceABCD
Definition: testcreatecube.cpp:65
Definition: dtk_val.hpp:67
int add_subinfo(Dtk_InfoPtr &ininf)
static Dtk_FacePtr Create(const Dtk_BodyPtr &inParentBody)
Create a face in a body.
@ Vertex_G
Definition: testcreatecube.cpp:21
@ Coedge4_FE
Definition: testcreatecube.cpp:50
#define DTK_MESH_RGB
Definition: util_mesh_dtk.hpp:32
@ DTK_DASHED
Definition: util_ent_dtk.hpp:49
@ Loop0_ABCD
Definition: testcreatecube.cpp:59
@ FaceABFE
Definition: testcreatecube.cpp:66
static Dtk_ReferenceBlockPtr Create(const Dtk_Oriented2dBBox &inInnerBBox, const Dtk_Oriented2dBBox &inOuterBBox)
Calls full featured constructor to allocate a new object.
@ FaceGDCH
Definition: testcreatecube.cpp:68
@ Coedge3_DC
Definition: testcreatecube.cpp:40
@ Vertex_B
Definition: testcreatecube.cpp:16
@ FaceEFGH
Definition: testcreatecube.cpp:69
static Dtk_ReferenceFramePtr Create()
Calls default constructor to allocate a new object.
@ Edge_EA
Definition: testcreatecube.cpp:27
@ Edge_AB
Definition: testcreatecube.cpp:23
Dtk_anchor_type
Definition: util_draw_dtk.hpp:90
@ Edge_GF
Definition: testcreatecube.cpp:31
DTK_Text_type
Definition: str_def.h:11
int32_t Dtk_Int32
Definition: define.h:690
void resize(Dtk_Size_t n, const T &t)
Resizes the array.
Definition: util_stl_dtk.hpp:604
@ DTK_DOTTED
Definition: util_ent_dtk.hpp:55
@ TypeDatum
Definition: util_draw_dtk.hpp:6362
@ Coedge2_GD
Definition: testcreatecube.cpp:48
@ Loop1_ABFE
Definition: testcreatecube.cpp:60
static Dtk_DimensionPtr Create()
Calls default constructor to allocate a new object.
DimensionTypeEnum
Definition: util_draw_dtk.hpp:4719
static Dtk_LumpPtr Create(const Dtk_BodyPtr &inParentBody)
Create a lump in a body.
@ Vertex_D
Definition: testcreatecube.cpp:18
int add_point(Dtk_UInt32 inpnt)
T2 second
Definition: util_stl_dtk.hpp:924
static Dtk_SmartPtr< T > DtkDynamicCast(const Dtk_SmartPtr< T2 > &p)
Definition: util_ptr_dtk.hpp:101
void set_mesh_color(const Dtk_RGB &inColor)
set color in Dtk_mesh
@ Coedge1_FB
Definition: testcreatecube.cpp:45
@ Vertex_C
Definition: testcreatecube.cpp:17
Dtk_bool IsNULL() const
Definition: util_ptr_dtk.hpp:118
static Dtk_FdtPtr Create()
Calls default constructor to allocate a new object.
void SetGeom(const Dtk_SurfacePtr &inSurface)
Set Geometry.
static Dtk_NurbsCurvePtr Create(const Dtk_NurbsCurve &in)
Calls copy constructor to allocate a new object.
void setScale(Dtk_Double64 scale)
Set a new scale.
Definition: util_ptr_dtk.hpp:37
static Dtk_EdgePtr Create(const Dtk_BodyPtr &inParentBody)
Create an edge in a body.
@ FaceFBDG
Definition: testcreatecube.cpp:67
@ Lump
Definition: testcreatecube.cpp:12
static Dtk_PointPtr Create(const Dtk_Point &in)
Calls copy constructor to allocate a new object.
@ Coedge1_EA
Definition: testcreatecube.cpp:43
void setYdir(const Dtk_dir &Y)
Set a new Y vector.
@ dtk_text_type_modifier
Definition: str_def.h:21
This is a mathematical point class.
Definition: dtk_pnt.hpp:20
@ Coedge4_EH
Definition: testcreatecube.cpp:57
This is the composite text class. It's basically a Dtk_Text Container. This class represents a group ...
Definition: util_draw_dtk.hpp:1525
@ Coedge2_BD
Definition: testcreatecube.cpp:42
static Dtk_LeaderPtr Create()
Calls default constructor to allocate a new object.
static Dtk_CameraPtr Create()
Calls default constructor to allocate a new object.
Dtk_ModelDisplayPtr CreateModelDisplayActivated()
Definition: testcreatefdt.cpp:320
@ TerminatorTypeClosedArrow
Definition: util_draw_dtk.hpp:1961
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 -.
This is a high level array class.
Definition: util_stl_dtk.hpp:84
static Dtk_VertexPtr Create(const Dtk_BodyPtr &inParentBody)
Create a vertex in a body.
static Dtk_CoedgePtr Create(const Dtk_BodyPtr &inParentBody)
Create a coedge in a body.
Dtk_BodyPtr CreateCube()
Definition: testcreatecube.cpp:1316
Dtk_Size_t size() const
Returns the size of the array.
Definition: util_stl_dtk.hpp:503
@ FaceEHCA
Definition: testcreatecube.cpp:70
@ Vertex_F
Definition: testcreatecube.cpp:20
@ Coedge5_HC
Definition: testcreatecube.cpp:54
@ Coedge1_AB
Definition: testcreatecube.cpp:36
@ Coedge0_AB
Definition: testcreatecube.cpp:35
LeaderTerminatorTypeEnum
Internal leader terminator type.
Definition: util_draw_dtk.hpp:1955
T & at(Dtk_Size_t k)
Definition: util_stl_dtk.hpp:397
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_FRAME_TYPE_RECTANGLE
Definition: util_draw_dtk.hpp:127
@ Coedge0_CA
Definition: testcreatecube.cpp:37
static Dtk_GeometricalTolerancePtr Create()
Calls default constructor to allocate a new object.
void clear(int no_delete=0)
Resets the Dtk_tab content.
Definition: util_stl_dtk.hpp:352
void AddText(Dtk_Text inText)
Adds a Dtk_Text to the Dtk_CompositeText.
@ Edge_DC
Definition: testcreatecube.cpp:25
@ CubicalMapping
Definition: dtk_render.hpp:42
static Dtk_EllipsePtr Create(const Dtk_Ellipse &in)
Calls copy constructor to allocate a new object.
Definition: dtk_rgb.hpp:7
Dtk_ErrorStatus SetColor(const int &R, const int &G, const int &B)
static Dtk_SmartPtr< Dtk_Info > create()
Calls default constructor to allocate a new object.
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:468
@ Coedge1_FE
Definition: testcreatecube.cpp:47
static Dtk_PolylinePtr Create(const Dtk_Polyline &in)
Calls copy constructor to allocate a new object.
int add_mesh_face(Dtk_mesh_face *inMesh_face)
Add a face (Dtk_mesh_face) to the mesh.
This is a mathematical direction class.
Definition: dtk_dir.hpp:14
void Extend(const Dtk_Double64 &inXExtend, const Dtk_Double64 &inYExtend)
Extend the bounding box.
int add_polyline(const Dtk_tab< Dtk_UInt32 > *inIndices)
Add one polyline.
int add_points(const Dtk_tab< Dtk_UInt32 > *pnts)
@ Vertex_E
Definition: testcreatecube.cpp:19
static Dtk_VolumePtr Create(const Dtk_BodyPtr &inParentBody)
Create a volume in a body.
@ TypePosition
Definition: util_draw_dtk.hpp:6076
#define DTK_PI
Definition: str_def.h:8
@ Loop3_GDCH
Definition: testcreatecube.cpp:62
@ Loop4_EFGH
Definition: testcreatecube.cpp:63
@ Loop2_FBDG
Definition: testcreatecube.cpp:61
@ Edge_HG
Definition: testcreatecube.cpp:33
static Dtk_CylindricalSurfacePtr Create(const Dtk_pnt &inOrigin, const Dtk_dir &inNormal, const Dtk_dir &inUDirection, const Dtk_Double64 &inRadius, const Dtk_dir &inYDirection=Dtk_dir())
Create an infinite cylinder.