Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SRoundSlot.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 SRoundSlot : 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 Length);
45 // TESTED
46 Number GetWidth() ;
49 // TESTED
50 SetWidth(Number Width);
75
78 // TESTED
79 Number GetPerimeter() ;
80
90 // TESTED
92 Number deflection,
94 Number meanPointDistance
96 ) ;
97
102 // TESTED
103 Number Distance(
104 SPoint Point,
106 Boolean CalcIn3D
108 ) ;
109
112 String toString() ;
113};
114
115// @brief
116// This class allows to wrap static functions to SRoundSlot easily.
117// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
118class SRoundSlot
119#ifndef FCT_DOC
120 : public SObjectStatic
121#endif // FCT_DOC
122{
123 //======================================================================================================================
124 // INTERNAL FUNCTION
125 //======================================================================================================================
126
127 //======================================================================================================================
128 // DOCUMENTED FUNCTION
129 //======================================================================================================================
130public slots:
133 // TESTED
134 static SRoundSlot New();
135
138 // TESTED
139 static SRoundSlot New(SRoundSlot Other);
140
143 // TESTED
145 SPoint Center,
147 SVector Normal,
149 SVector XDir,
151 Number Length,
153 Number Width
155 );
156
163 // TESTED
165 SPoint FirstPt,
167 SPoint SecondPt,
169 SPoint ThirdPt
171 );
172
182 static Array FromClick() { return SComp::GetFromClick<SRoundSlot>(SV_ROUND_SLOT); }
183
187 // TESTED
188 static Array FromName( String Name) { return SComp::GetFromName<SRoundSlot>(Name); }
189
193 // TESTED
194 static Array FromSel() { return SFeature::GetFromSel<SRoundSlot>(); }
195
199 // TESTED
200 static Array All(
201 Number VisCrit
206 )
207 {
208 return SComp::GetAll<SRoundSlot>(VisCrit);
209 }
210
213 static String toString();
214};
215Q_DECLARE_METATYPE(SRoundSlot::_SRoundSlotDummy);
216Q_DECLARE_METATYPE(SRoundSlot);
217
218#ifndef FCT_DOC
219} // namespace rsh::ScriptBinding
220#endif // !FCT_DOC
Circle manipulation class. The SCircle creation can be done by calling the static functions: .
Definition: SCircle.h:24
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
RoundSlot manipulation class. The SRoundSlot creation can be done by calling the static functions: .
Definition: SRoundSlot.h:24
SVector GetXDir()
SVector GetYDir()
static SRoundSlot New(SPoint FirstPt, SPoint SecondPt, SPoint ThirdPt)
Constructs a new SRoundSlot by 3 points.
Number GetLength()
Returns the length.
static SRoundSlot New(SRoundSlot Other)
Constructs an SRoundSlot by copying Other.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SRoundSlot.h:200
Array Discretize(Number deflection, Number meanPointDistance)
To convert the continuous feature into a discretized SMultiline. Only one parameter must be specified...
SPoint GetCenterB()
Returns the center on the +X side.
String toString()
Get the type of the variable.
Number Distance(SPoint Point, 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.
Number GetPerimeter()
Returns the perimeter of the feature.
SCircle GetCircleA()
Returns the circle centered on the -X side.
SCircle GetCircleB()
Returns the circle centered on the +X side.
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SRoundSlot.h:182
SPoint GetCenterA()
Returns the center on the -X side.
SetWidth(Number Width)
Setter for the width.
SetLength(Number Length)
Setter for the length.
static SRoundSlot New()
Default constructor to create an empty new SRoundSlot.
static Array FromSel()
To get all the selected SComp.
Definition: SRoundSlot.h:194
static Array FromName(String Name)
Search all the component with the given name.
Definition: SRoundSlot.h:188
static SRoundSlot New(SPoint Center, SVector Normal, SVector XDir, Number Length, Number Width)
Constructs a new SRoundSlot by defining its data.
static String toString()
Get the type of the variable.
The mathematical object vector.
Definition: SVector3.h:26