Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SSquareSlot.h
1
2
3
5
6#pragma once
7
8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshPluginScript/SClass/SFeature.h"
10
11#ifndef FCT_DOC
12namespace rsh::ScriptBinding
13{
14#endif // !FCT_DOC
15
23class SSquareSlot : public SFeature
24{
25 //======================================================================================================================
26 // INTERNAL FUNCTION
27 //======================================================================================================================
28
29 //======================================================================================================================
30 // DOCUMENTED FUNCTION
31 //======================================================================================================================
32
33public slots: // these functions (slots) will be available in QtScript
34
37 // TESTED
38 Number GetLength() ;
41 // TESTED
42 SetLength(Number iLength);
45 // TESTED
46 Number GetWidth() ;
49 // TESTED
50 SetWidth(Number iWidth);
65 Number SetXDir( SVector iNewXDir);
72
75 // TESTED
76 Number GetPerimeter() ;
77
87 // TESTED
89 Number deflection,
91 Number meanPointDistance
93 ) ;
94
99 // TESTED
100 Number Distance(
101 SPoint iPoint,
103 Boolean CalcIn3D
105 ) ;
106
109 String toString() ;
110};
111
112// @brief
113// This class allows to wrap static functions to SSquareSlot easily.
114// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
115class SSquareSlot
116#ifndef FCT_DOC
117 : public SObjectStatic
118#endif // FCT_DOC
119{
120 //======================================================================================================================
121 // INTERNAL FUNCTION
122 //======================================================================================================================
123
124 //======================================================================================================================
125 // DOCUMENTED FUNCTION
126 //======================================================================================================================
127public slots:
130 // TESTED
131 static SSquareSlot New();
132
135 // TESTED
137
140 // TESTED
142 SPoint Center,
144 SVector Normal,
146 SVector XDir,
148 Number Length,
150 Number Width
152 );
153
160 // TESTED
162 SPoint FirstPt,
164 SPoint SecondPt,
166 SPoint ThirdPt
168 );
169
179 static Array FromClick() { return SComp::GetFromClick<SSquareSlot>(SV_SQUARE_SLOT); }
180
184 // TESTED
185 static Array FromName( String Name) { return SComp::GetFromName<SSquareSlot>(Name); }
186
190 // TESTED
191 static Array FromSel() { return SFeature::GetFromSel<SSquareSlot>(); }
192
196 // TESTED
197 static Array All(
198 Number VisCrit
203 )
204 {
205 return SComp::GetAll<SSquareSlot>(VisCrit);
206 }
207
210 static String toString();
211};
212Q_DECLARE_METATYPE(SSquareSlot::_SSquareSlotDummy);
213Q_DECLARE_METATYPE(SSquareSlot);
214
215#ifndef FCT_DOC
216} // namespace rsh::ScriptBinding
217#endif // !FCT_DOC
The SFeature class is an abstract class.
Definition: SFeature.h:19
3D point manipulation class. The SPoint creation can be done by calling the static functions:
Definition: SPoint.h:23
SquareSlot manipulation class. The SSquareSlot creation can be done by calling the static functions: ...
Definition: SSquareSlot.h:24
SetWidth(Number iWidth)
Setter for the width.
SVector GetYDir()
Number GetLength()
Returns the length.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SSquareSlot.h:197
Number SetXDir(SVector iNewXDir)
Setter for the SSquareSlot X direction.
static Array FromSel()
To get all the selected SComp.
Definition: SSquareSlot.h:191
String toString()
Get the type of the variable.
static Array FromName(String Name)
Search all the component with the given name.
Definition: SSquareSlot.h:185
static SSquareSlot New(SPoint Center, SVector Normal, SVector XDir, Number Length, Number Width)
Constructs a new SSquareSlot by defining its data.
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SSquareSlot.h:179
SVector GetXDir()
SetLength(Number iLength)
Setter for the length.
static String toString()
Get the type of the variable.
Array Discretize(Number deflection, Number meanPointDistance)
To convert the continuous feature into a discretized SMultiline. Only one of the parameters must be s...
static SSquareSlot New(SSquareSlot Other)
Constructs an SSquareSlot by copying Other.
Number GetPerimeter()
Returns the perimeter of the feature.
static SSquareSlot New(SPoint FirstPt, SPoint SecondPt, SPoint ThirdPt)
Constructs a new SSquareSlot by 3 points.
static SSquareSlot New()
Default constructor to create an empty new SSquareSlot.
Number Distance(SPoint iPoint, Boolean CalcIn3D)
Returns the distance between a point and the feature <0 if below/inside the feature >0 if above/outsi...
Number GetWidth()
Returns the width.
The mathematical object vector.
Definition: SVector3.h:26