DATAKIT API  V2025.1
util_cgr_dtk.hpp
Go to the documentation of this file.
1 #include "def/define.h"
8 #include "util/util_ent_dtk.hpp"
9 #include "util/util_mesh_dtk.hpp"
10 #include "util/util_ptr_dtk.hpp"
11 #include "util/util_stl_dtk.hpp"
13 #ifndef _UTIL_CGR_DTK_H
14 #define _UTIL_CGR_DTK_H
15 
16 #define DTK_CGR_CRV_WIREFRAME_INDICE 0 /* 120 */
17 #define DTK_CGR_CRV_WIREFRAME_PNTS 1 /* 120 */
18 #define DTK_CGR_CRV_BOUNDARY_INDICE 2
19 #define DTK_CGR_CRV_BOUNDARY_PNTS 3
20 #define DTK_CGR_CRV_NO_BOUNDARY_INDICE 4
21 #define DTK_CGR_CRV_NO_BOUNDARY_PNTS 5
22 #define DTK_CGR_PNT 6
23 
24 
26 {
37  DTK_CGR_STRING = 87
38 };
39 
41 {
82  //AsrTypeConstructedGeometry = 40
83  //AsrTypeConstructedGeometry = 42
84  //AsrTypeConstructedGeometry = 43
85  //AsrTypeConstructedGeometry = 44
86  //AsrTypeConstructedGeometry = 45
87  //AsrTypeConstructedGeometry = 46
90 };
91 
93 
96 {
97  dtk_mesh_all_bodies_bb all_bodies_bb; // <-- ok
98  dtk_mesh_bodies_bb bodies_bbs; // <-- ok
99  dtk_mesh_per_body_face_bb faces_bbs; // <-- ok
100 
101  dtk_mesh_all_crvs_bb all_crvs_bb; // <-- ok
102  dtk_mesh_per_crv_bb crvs_bbs; // <-- ok
103 
104  //dtk_mesh_per_crv_bb crvs149_bbs; // <-----
105  Dtk_bounding_box all_bb; // <-- ok
106 };
107 
111 {
112 public:
114 
115  int type;
116  int id;
117 
120 
135 
136 
139 
142 };
143 
144 
145 class Dtk_mesh_asm_node;
146 
150 {
151 public:
152  int id;
153 
160 
167 
172 };
173 
174 
178 {
179  int id;
181  Dtk_RGB node_color;
182  Dtk_MaterialPtr material;
183  Dtk_RenderInfosPtr render;
185 public:
186 
188  Dtk_bounding_box BB;
189 
194 
207 
210 
212  void set_id(int inId);
214  void set_material(Dtk_MaterialPtr inMaterial);
217 
219  int get_id();
224 
227 
229  void set_color(Dtk_RGB& inColor);
230 
233 };
234 #endif
235 
236 
Dtk_mesh_part::Name
Dtk_string Name
Definition: util_cgr_dtk.hpp:113
AsrTypeRestrictedArea
@ AsrTypeRestrictedArea
Definition: util_cgr_dtk.hpp:88
Dtk_mesh_instance::Matrix
Dtk_matrix * Matrix
Transformation matrix.
Definition: util_cgr_dtk.hpp:155
Dtk_mesh_part::axis_system
Dtk_tab< Dtk_AxisSystemPtr > axis_system
Mesh list (bodies) of the part.
Definition: util_cgr_dtk.hpp:132
AsrTypeTotalRunout
@ AsrTypeTotalRunout
Definition: util_cgr_dtk.hpp:59
dtk_cgr_bbs
Gathers all the bounding boxes (faces, bodies, curves...) related to a part.
Definition: util_cgr_dtk.hpp:96
Dtk_mesh_part::Dtk_mesh_part
Dtk_mesh_part()
AsrTypePositionSurfacicProfile
@ AsrTypePositionSurfacicProfile
Definition: util_cgr_dtk.hpp:53
AsrTypePosition
@ AsrTypePosition
Definition: util_cgr_dtk.hpp:49
Dtk_mesh_asm_node
This class gathers asm node related datas.
Definition: util_cgr_dtk.hpp:178
Dtk_transfo
This is the Transformation dedicated class.
Definition: dtk_transfo.hpp:19
DTK_CGR_NODE
@ DTK_CGR_NODE
Definition: util_cgr_dtk.hpp:28
dtk_matrix.hpp
Dtk_mesh_asm_node::add_wireframe
int add_wireframe(Dtk_tab< Dtk_mesh_curve * > *inWireframe, Dtk_transfo *matrix)
Add an Dtk_mesh_curve in Dtk_mesh_asm_node in the current asm node.
Dtk_mesh_asm_node::set_material
void set_material(Dtk_MaterialPtr inMaterial)
Set an material.
AsrTypeSymmetry
@ AsrTypeSymmetry
Definition: util_cgr_dtk.hpp:51
AsrTypeCoordinateDimension
@ AsrTypeCoordinateDimension
Definition: util_cgr_dtk.hpp:78
Dtk_mesh_instance
This class gathers asm instance related datas. Only Part or Asm has to be filled.
Definition: util_cgr_dtk.hpp:150
dtk_status.hpp
AsrTypeLinearSize
@ AsrTypeLinearSize
Definition: util_cgr_dtk.hpp:54
Dtk_mesh_instance::is_asm
Dtk_bool is_asm()
Return true if asm is filled.
Dtk_mesh_asm_node::set_id
void set_id(int inId)
Set an Id.
Dtk_mesh_asm_node::Dtk_mesh_asm_node
Dtk_mesh_asm_node()
Default constructor.
catiav5w::inTransfo
const Dtk_string const Dtk_transfo & inTransfo
Definition: catiav5w.hpp:619
Dtk_mesh_part::id
int id
Definition: util_cgr_dtk.hpp:116
Dtk_mesh_asm_node::add_axis_system
int add_axis_system(Dtk_AxisSystemPtr inAxisSystem)
Add an Dtk_AxisSystemPtr in Dtk_mesh_asm_node in the current asm node.
Dtk_mesh_part::wireframe
Dtk_tab< Dtk_mesh_curve * > * wireframe
Free 3D curves.
Definition: util_cgr_dtk.hpp:126
Dtk_mesh_part::bbs
dtk_cgr_bbs bbs
Used to store computed bounding boxes.
Definition: util_cgr_dtk.hpp:119
AsrTypeChamferDimension
@ AsrTypeChamferDimension
Definition: util_cgr_dtk.hpp:57
Dtk_mesh_asm_node::add_mesh_instance
int add_mesh_instance(Dtk_mesh_part *inMeshPart, Dtk_transfo *inTransfo)
Add a mesh instance (a part) to the current asm node.
Dtk_string
This is a high level string class.
Definition: dtk_string.hpp:58
AsrTypeGeometricalTolerance
@ AsrTypeGeometricalTolerance
Definition: util_cgr_dtk.hpp:46
DTK_CGR_FREE_VERTEX
@ DTK_CGR_FREE_VERTEX
Definition: util_cgr_dtk.hpp:29
Dtk_Size_t
size_t Dtk_Size_t
Definition: define.h:712
DTK_CGR_AXIS_SYSTEM
@ DTK_CGR_AXIS_SYSTEM
Definition: util_cgr_dtk.hpp:35
DTK_CGR_CURVE
@ DTK_CGR_CURVE
Definition: util_cgr_dtk.hpp:33
Dtk_mesh_part
This class gathers part related datas.
Definition: util_cgr_dtk.hpp:111
AsrTypeRestrictedArea2
@ AsrTypeRestrictedArea2
Definition: util_cgr_dtk.hpp:89
Dtk_status
Definition: dtk_status.hpp:16
DTK_CGR_TEXT
@ DTK_CGR_TEXT
Definition: util_cgr_dtk.hpp:30
Dtk_bool
char Dtk_bool
Definition: define.h:725
AsrTypeParallelism
@ AsrTypeParallelism
Definition: util_cgr_dtk.hpp:61
dtk_cgr_bbs::all_bb
Dtk_bounding_box all_bb
Definition: util_cgr_dtk.hpp:105
AsrTypeCircularity
@ AsrTypeCircularity
Definition: util_cgr_dtk.hpp:66
Dtk_mesh_asm_node::get_id
int get_id()
Get an Id.
Dtk_mesh_asm_node::set_color
void set_color(Dtk_RGB &inColor)
set color on Dtk_mesh_asm_node
Dtk_mesh_instance::~Dtk_mesh_instance
~Dtk_mesh_instance()
Destructor.
AsrTypeAngularity
@ AsrTypeAngularity
Definition: util_cgr_dtk.hpp:63
DTK_CGR_BODY
@ DTK_CGR_BODY
Definition: util_cgr_dtk.hpp:36
AsrTypeDatumSystem
@ AsrTypeDatumSystem
Definition: util_cgr_dtk.hpp:75
AsrTypeOrientedAngularDimension
@ AsrTypeOrientedAngularDimension
Definition: util_cgr_dtk.hpp:79
AsrTypePatternLocation
@ AsrTypePatternLocation
Definition: util_cgr_dtk.hpp:70
AsrTypeSimpleDatum
@ AsrTypeSimpleDatum
Definition: util_cgr_dtk.hpp:47
Dtk_mesh_instance::Mesh
Dtk_mesh_part * Mesh
Part node to be written.
Definition: util_cgr_dtk.hpp:157
Dtk_mesh_asm_node::get_instance
Dtk_mesh_instance * get_instance(int i)
Return the i-th instance.
AsrTypeCircularRunout
@ AsrTypeCircularRunout
Definition: util_cgr_dtk.hpp:60
dtk_cgr_bbs::faces_bbs
dtk_mesh_per_body_face_bb faces_bbs
Definition: util_cgr_dtk.hpp:99
Dtk_mesh_part::mesh
Dtk_tab< Dtk_MeshPtr > mesh
Mesh list (bodies) of the part.
Definition: util_cgr_dtk.hpp:122
util_mesh_dtk.hpp
AsrTypeSecondLinearSize
@ AsrTypeSecondLinearSize
Definition: util_cgr_dtk.hpp:56
AsrTypeStraightness
@ AsrTypeStraightness
Definition: util_cgr_dtk.hpp:64
Dtk_mesh_instance::id
int id
Definition: util_cgr_dtk.hpp:152
dtk_pnt.hpp
util_topology_ptr_dtk.hpp
Dtk_mesh_part::cgrw_ComputeBBs
Dtk_status cgrw_ComputeBBs(Dtk_transfo &)
Once the Dtk_mesh_part is filled.
AsrTypeProfileToleranceOfAnySurface
@ AsrTypeProfileToleranceOfAnySurface
Definition: util_cgr_dtk.hpp:69
AsrTypePositionLinearProfile
@ AsrTypePositionLinearProfile
Definition: util_cgr_dtk.hpp:52
AsrTypeDatumReferenceFrame
@ AsrTypeDatumReferenceFrame
Definition: util_cgr_dtk.hpp:74
AsrTypeConstructedGeometry
@ AsrTypeConstructedGeometry
Definition: util_cgr_dtk.hpp:81
dtk_cgr_bbs::crvs_bbs
dtk_mesh_per_crv_bb crvs_bbs
Definition: util_cgr_dtk.hpp:102
util_ent_dtk.hpp
DTK_CGR_TYPE_BLOCK
DTK_CGR_TYPE_BLOCK
Definition: util_cgr_dtk.hpp:26
DTK_CGR_STRING
@ DTK_CGR_STRING
Definition: util_cgr_dtk.hpp:37
AsrTypeConcentricity
@ AsrTypeConcentricity
Definition: util_cgr_dtk.hpp:50
Dtk_mesh_instance::Dtk_mesh_instance
Dtk_mesh_instance(Dtk_mesh_asm_node *, Dtk_matrix *)
Constructor with Asm node and a matrix.
dtk_cgr_bbs::all_crvs_bb
dtk_mesh_all_crvs_bb all_crvs_bb
Definition: util_cgr_dtk.hpp:101
AsrTypeDimension
@ AsrTypeDimension
Definition: util_cgr_dtk.hpp:76
Dtk_matrix
Definition: dtk_matrix.hpp:8
AsrTypeAngularSize
@ AsrTypeAngularSize
Definition: util_cgr_dtk.hpp:55
Dtk_mesh_asm_node::get_color
Dtk_RGB get_color()
get color on Dtk_mesh_asm_node
AsrTypeText
@ AsrTypeText
Definition: util_cgr_dtk.hpp:43
Dtk_SmartPtr< Dtk_material >
Dtk_mesh_asm_node::get_nb_instances
Dtk_Size_t get_nb_instances()
Return the nb of instances in the current node.
AsrTypeNote
@ AsrTypeNote
Definition: util_cgr_dtk.hpp:44
Dtk_mesh_asm_node::cgrw_ComputeBBs
Dtk_status cgrw_ComputeBBs()
Compute Bounding Boxes.
Dtk_mesh_asm_node::add_mesh
int add_mesh(Dtk_MeshPtr mesh)
Add an Dtk_mesh in Dtk_mesh_asm_node in the current asm node.
Dtk_mesh_part::vertex
Dtk_tab< Dtk_pnt * > vertex
Free 3D vertices.
Definition: util_cgr_dtk.hpp:128
dtk_transfo.hpp
DTK_CGR_ANNOTATION
@ DTK_CGR_ANNOTATION
Definition: util_cgr_dtk.hpp:31
DTK_CGR_MESH
@ DTK_CGR_MESH
Definition: util_cgr_dtk.hpp:34
Dtk_mesh_asm_node::get_render_infos
Dtk_RenderInfosPtr get_render_infos()
Get an material.
DTK_CGR_UNKNOWN_TYPE
@ DTK_CGR_UNKNOWN_TYPE
Definition: util_cgr_dtk.hpp:27
util_stl_dtk.hpp
AsrTypeBasicDimension
@ AsrTypeBasicDimension
Definition: util_cgr_dtk.hpp:58
Dtk_mesh_part::type
int type
Definition: util_cgr_dtk.hpp:115
util_ptr_dtk.hpp
DTK_CGR_FREE_CURVE
@ DTK_CGR_FREE_CURVE
Definition: util_cgr_dtk.hpp:32
define.h
Dtk_tab
This is a high level array class.
Definition: util_stl_dtk.hpp:85
g5r_ASR_Type
g5r_ASR_Type
Definition: util_cgr_dtk.hpp:41
AsrTypeProfileToleranceOfAnyLine
@ AsrTypeProfileToleranceOfAnyLine
Definition: util_cgr_dtk.hpp:68
Dtk_mesh_asm_node::get_material
Dtk_MaterialPtr get_material()
Get an material.
dtk_cgr_bbs::all_bodies_bb
dtk_mesh_all_bodies_bb all_bodies_bb
Definition: util_cgr_dtk.hpp:97
AsrTypeFlatness
@ AsrTypeFlatness
Definition: util_cgr_dtk.hpp:65
Dtk_mesh_part::perBodyCurves
Dtk_tab< Dtk_tab< Dtk_mesh_curve * > * > * perBodyCurves
3D Edges "per body"
Definition: util_cgr_dtk.hpp:124
AsrTypePerpendicularity
@ AsrTypePerpendicularity
Definition: util_cgr_dtk.hpp:62
AsrTypeWeldingSymbol
@ AsrTypeWeldingSymbol
Definition: util_cgr_dtk.hpp:73
Dtk_mesh_part::body
Dtk_tab< Dtk_BodyPtr > body
Mesh list (bodies) of the part.
Definition: util_cgr_dtk.hpp:134
Dtk_mesh_part::~Dtk_mesh_part
~Dtk_mesh_part()
Dtk_mesh_asm_node::~Dtk_mesh_asm_node
~Dtk_mesh_asm_node()
Default destructor.
dtk_string.hpp
Dtk_mesh_part::rgb
Dtk_tab< Dtk_RGB > rgb
Free 3D vertices attributs.
Definition: util_cgr_dtk.hpp:130
AsrTypeDatumFeatures
@ AsrTypeDatumFeatures
Definition: util_cgr_dtk.hpp:77
Dtk_mesh_instance::Asm
Dtk_mesh_asm_node * Asm
Asm node to be written.
Definition: util_cgr_dtk.hpp:159
TypeEnumASRToString
const Dtk_string TypeEnumASRToString(const g5r_ASR_Type &inEnum)
Dtk_mesh_asm_node::set_render_infos
void set_render_infos(Dtk_RenderInfosPtr inRender)
Set an render.
dtk_rgb.hpp
Dtk_RGB
Definition: dtk_rgb.hpp:7
Dtk_mesh_asm_node::BB
Dtk_bounding_box BB
Used to store global computed bounding box.
Definition: util_cgr_dtk.hpp:188
AsrTypeDatumTarget
@ AsrTypeDatumTarget
Definition: util_cgr_dtk.hpp:48
Dtk_mesh_instance::Dtk_mesh_instance
Dtk_mesh_instance(Dtk_mesh_part *, Dtk_matrix *)
constructor with Part node and a matrix
AsrTypeCylindricity
@ AsrTypeCylindricity
Definition: util_cgr_dtk.hpp:67
AsrTypeUnknown
@ AsrTypeUnknown
Definition: util_cgr_dtk.hpp:42
Dtk_mesh_instance::is_mesh
Dtk_bool is_mesh()
Return true if mesh is filled.
AsrTypeOrientedLinearDimension
@ AsrTypeOrientedLinearDimension
Definition: util_cgr_dtk.hpp:80
Dtk_mesh_asm_node::add_asm_instance
int add_asm_instance(Dtk_mesh_asm_node *inMeshAsm, Dtk_transfo *inTransfo)
Add an asm instance to the current asm node.
AsrTypeRoughness
@ AsrTypeRoughness
Definition: util_cgr_dtk.hpp:71
AsrTypeDatum
@ AsrTypeDatum
Definition: util_cgr_dtk.hpp:45
dtk_cgr_bbs::bodies_bbs
dtk_mesh_bodies_bb bodies_bbs
Definition: util_cgr_dtk.hpp:98
AsrTypeNoteNoa
@ AsrTypeNoteNoa
Definition: util_cgr_dtk.hpp:72