Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SLabel.h
1
2
3
5
6#pragma once
7
8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshPluginScript/SClass/SComp.h"
10#include <QtCore/QVariant>
11
12#ifndef FCT_DOC
13namespace rsh::ScriptBinding
14{
15#endif // !FCT_DOC
16
25class SLabel : public SComp
26{
27 //======================================================================================================================
28 // INTERNAL FUNCTION
29 //======================================================================================================================
30
31 //======================================================================================================================
32 // DOCUMENTED FUNCTION
33 //======================================================================================================================
34public:
36 {
37
54
56
57 LastColType
59 };
60
62 {
63
113
115
116 Flatness,
119 LastLineType
121 };
122
123
124public slots: // these functions (slots) will be available in QtScript
125
128 AttachToPoint(SPoint iAttachedPoint);
129
133 SetComment( String Comment);
134
137 ShowComment(Boolean iShowComment);
138
144 Array SetCell(
145 Number IdxLin,
147 Number IdxCol,
149 Number Value
151 );
152
159 Array GetCell(
160 Number IdxLin,
162 Number IdxCol
164 ) ;
165
171 Array SetLine(
172 Number IdxLin,
174 Array<Number> ValueTbl
176 );
177
185 Array GetLine(Number IdxLin
187 ) ;
188
194 Array SetCol(
195 Number IdxCol,
197 Array<Number> ValueTbl
199 );
200
208 Array GetCol(Number IdxCol
210 ) ;
211
215 Array GetColByType(SLabelCol ColType
217 ) ;
218
224 Array SetColType(Array<
225#ifndef FCT_DOC
226 QVariant
227#else
229#endif
230 > ColType
232 );
233
237 Array GetLineByType(SLabelLine LineType
239 ) ;
240
246 Array SetLineType(Array<
247#ifndef FCT_DOC
248 QVariant
249#else
251#endif
252 > LineType
254 );
255
259 Number LowTol,
261 Number UpperTol
263 );
264
273 AddSComp( Array<SComp> tblSComp
275 );
276
280 String GetComment() ;
281
288 Number RowIndex,
290 Boolean IsVisible
292 );
293
300 Number ColumnRowIndex,
302 Boolean IsVisible
304 );
305
308 String toString() ;
309
310};
311
312// @brief
313// this class allow to wrap static function to SLabel easily
314// this allow to wrap constructor more easily the constructor will be declared with the function New(...)
315class SLabel
316#ifndef FCT_DOC
317 : public SObjectStatic
318#endif // FCT_DOC
319{
320 //======================================================================================================================
321 // INTERNAL FUNCTION
322 //======================================================================================================================
323
324 //======================================================================================================================
325 // DOCUMENTED FUNCTION
326 //======================================================================================================================
327
328public:
330 {
331
332 LONG,
334 MEDIUM,
337 MINIMUM,
340 LastLabelType
342 };
343
345 {
346
347 NO_BACKGROUND,
349 SCENE_BACKGROUND_COLOR,
351 SPECIAL_COLOR,
353 TOLERANCE_COLOR,
355 LastBackgroundType
357 };
358
359
360public slots:
363 // TESTED
364 static SLabel New(
365 Number NbLin,
367 Number NbCol
369 );
370
373 // TESTED
374 static SLabel New(SLabel iOther);
375
385 static Array FromClick() { return SComp::GetFromClick<SLabel>(SV_LABEL); }
386
390 static Array FromName( String Name) { return SComp::GetFromName<SLabel>(Name); }
391
395 // TESTED
396 static Array FromSel();
397
401 // TESTED
402 static Array All(
403 Number VisCrit
408 )
409 {
410 return SComp::GetAll<SLabel>(VisCrit);
411 }
412
415 static SetSizeType(SLabelType LabelType);
416
422 // SLabel.NO_BACKGROUND, // No label background
425 // SLabel.SPECIAL_COLOR, // Use defined color (take a look to SetBackgroundColor())
428 );
429
433 Number Red,
435 Number Green,
437 Number Blue,
439 Number Transparency
441 );
442
446 Number Red,
448 Number Green,
450 Number Blue
452 );
453
458 static SetDecimalNumber(Number NbDecimal
460 );
461
464 static UseEngineeringNotation(Boolean Use
466 );
467
470 static String toString();
471};
472Q_DECLARE_METATYPE(SLabel::_SLabelDummy);
473Q_DECLARE_METATYPE(SLabel);
474
475#ifndef FCT_DOC
476} // namespace rsh::ScriptBinding
477#endif // !FCT_DOC
The SComp class is an abstract class. Use derived classes SCircle, SCylinder, SCloud,...
Definition: SComp.h:32
The SLabel class provides a labelling feature, to easily track your components on the scene....
Definition: SLabel.h:26
static SLabel New(Number NbLin, Number NbCol)
Default constructor to create an empty new SLabel.
Array GetColByType(SLabelCol ColType)
To get the content of all the column by his type.
Array SetLine(Number IdxLin, Array< Number > ValueTbl)
To set the content of all the line IdxLin.
Array SetVisibleColumn(Number ColumnRowIndex, Boolean IsVisible)
To hide/show one column with a given index.
static Array FromSel()
To get all the selected SComp.
Array GetCell(Number IdxLin, Number IdxCol)
To get the content of a cell.
static SetBackgroundColor(Number Red, Number Green, Number Blue, Number Transparency)
To define backGround color.
static SetBackgroundType(SLabelBackgroundType BackgroundType)
To define background type .
String toString()
Get the type of the variable.
Array SetCell(Number IdxLin, Number IdxCol, Number Value)
To set the content of a cell.
SLabelLine
Definition: SLabel.h:62
@ DistanceY
Definition: SLabel.h:99
@ DistanceXY
Definition: SLabel.h:95
@ Width
Definition: SLabel.h:92
@ VolumeOver
Definition: SLabel.h:103
@ NbTriangles
Definition: SLabel.h:110
@ DistanceYZ
Definition: SLabel.h:96
@ YY
Definition: SLabel.h:65
@ AngleSuppX
Definition: SLabel.h:83
@ Intensity
Definition: SLabel.h:102
@ Volume
Definition: SLabel.h:101
@ AngleSuppY
Definition: SLabel.h:84
@ AngleCompZ
Definition: SLabel.h:82
@ UndefinedLine
Definition: SLabel.h:114
@ Sphericity
Definition: SLabel.h:94
@ Parallelism
Definition: SLabel.h:106
@ AngleZ
Definition: SLabel.h:79
@ Angle
Definition: SLabel.h:72
@ DistanceZ
Definition: SLabel.h:100
@ AngleS
Definition: SLabel.h:87
@ Curv
Definition: SLabel.h:89
@ NormalZ
Definition: SLabel.h:69
@ Planeity
Definition: SLabel.h:75
@ Circularity
Definition: SLabel.h:73
@ Linearity
Definition: SLabel.h:93
@ DistanceXZ
Definition: SLabel.h:97
@ ZZ
Definition: SLabel.h:66
@ Surface
Definition: SLabel.h:108
@ EmptyLine
Definition: SLabel.h:90
@ AngleCompY
Definition: SLabel.h:81
@ Length
Definition: SLabel.h:91
@ VolumeUnder
Definition: SLabel.h:104
@ XX
Definition: SLabel.h:64
@ Diameter
Definition: SLabel.h:71
@ NormalY
Definition: SLabel.h:68
@ AngleC
Definition: SLabel.h:86
@ Distance
Definition: SLabel.h:76
@ AngleCompX
Definition: SLabel.h:80
@ Level
Definition: SLabel.h:107
@ Perpendicularity
Definition: SLabel.h:105
@ AngleX
Definition: SLabel.h:77
@ Dev3D
Definition: SLabel.h:88
@ NbFreeCont
Definition: SLabel.h:112
@ DistanceX
Definition: SLabel.h:98
@ NbPieces
Definition: SLabel.h:111
@ Radius
Definition: SLabel.h:70
@ Cylindricity
Definition: SLabel.h:74
@ NbPoints
Definition: SLabel.h:109
@ AngleY
Definition: SLabel.h:78
@ NormalX
Definition: SLabel.h:67
@ AngleSuppZ
Definition: SLabel.h:85
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SLabel.h:385
String GetComment()
SetTolerance(Number LowTol, Number UpperTol)
To set the default tolerance.
Array SetLineType(Array< SLabelLine > LineType)
To set the type for all lines.
ShowComment(Boolean iShowComment)
To show or hide the comment.
SLabelType
Definition: SLabel.h:330
@ SMALL
Definition: SLabel.h:336
AddSComp(Array< SComp > tblSComp)
To add some SComp to the label. The label and the SComp will be one entity.
static SLabel New(SLabel iOther)
Constructs an SLabel by copying the SLabel _iOther.
AttachToPoint(SPoint iAttachedPoint)
To attach the label to a 3D point in the scene.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SLabel.h:402
SLabelCol
Definition: SLabel.h:36
@ Note
Definition: SLabel.h:43
@ Deviation
Definition: SLabel.h:40
@ LowestPoint
Definition: SLabel.h:51
@ BBoxMin
Definition: SLabel.h:47
@ Centroid
Definition: SLabel.h:50
@ UndefinedCol
Definition: SLabel.h:55
@ TolMax
Definition: SLabel.h:42
@ UppestPoint
Definition: SLabel.h:52
@ TolMin
Definition: SLabel.h:41
@ EmptyCol
Definition: SLabel.h:45
@ Measure
Definition: SLabel.h:39
@ Nominal
Definition: SLabel.h:46
@ BBoxMax
Definition: SLabel.h:48
@ Reference
Definition: SLabel.h:38
@ Count
Definition: SLabel.h:53
@ Size
Definition: SLabel.h:49
@ Flushing
Definition: SLabel.h:44
Array GetLineByType(SLabelLine LineType)
To get the content of all the Line by his type.
static UseEngineeringNotation(Boolean Use)
To define if labels use engineering notation ( Xe+y )
static SetDecimalNumber(Number NbDecimal)
To define number of decimal to display.
Array GetCol(Number IdxCol)
To get the content of all the column IdxCol.
Array SetColType(Array< SLabelCol > ColType)
To set the type for all columns.
SLabelBackgroundType
Definition: SLabel.h:345
Array GetLine(Number IdxLin)
To get the content of all the line IdxLin.
static String toString()
Get the type of the variable.
static SetSizeType(SLabelType LabelType)
To define how the label is visible.
static Array FromName(String Name)
Search all the component with the given name.
Definition: SLabel.h:390
static SetLineColor(Number Red, Number Green, Number Blue)
To define color of line contour and text.
Array SetCol(Number IdxCol, Array< Number > ValueTbl)
To set the content of all the column IdxCol.
SetComment(String Comment)
To set a comment to the label.
Array SetVisibleRow(Number RowIndex, Boolean IsVisible)
To hide/show one row with a given index.
3D point manipulation class. The SPoint creation can be done by calling the static functions:
Definition: SPoint.h:23