Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SSphere.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 SSphere : 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
38 // TESTED
39 Number GetRadius() ;
40
43 // TESTED
44 SetRadius(Number Radius
46 );
47
52 Boolean IsOuter() ;
53
57
61
64 // TESTED
65 Number GetSurface() ;
66
76 // TESTED
78 Number deflection,
80 Number meanPointDistance
82 ) ;
83
88 // TESTED
89 Number Distance(SPoint iPoint
91 ) ;
92
95 String toString() ;
96};
97
98// @brief
99// This class allows to wrap static functions to SSphere easily.
100// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
101class SSphere
102#ifndef FCT_DOC
103 : public SObjectStatic
104#endif // FCT_DOC
105{
106 //======================================================================================================================
107 // INTERNAL FUNCTION
108 //======================================================================================================================
109
110 //======================================================================================================================
111 // DOCUMENTED FUNCTION
112 //======================================================================================================================
113public slots:
116 // TESTED
117 static SSphere New();
118
121 // TESTED
122 static SSphere New(SSphere Other);
123
126 // TESTED
127 static SSphere New(
128 SPoint Center,
130 Number Radius
132 );
133
138 // TESTED
139 static SSphere New(
140 SPoint FirstPt,
142 SPoint SecondPt
144 );
145
155 static SSphere New(
156 SPoint ipFirstPt, SPoint ipSecondPt, SPoint ipThirdPt);
157
167 static Array FromClick() { return SComp::GetFromClick<SSphere>(SV_SPHERE); }
168
172 // TESTED
173 static Array FromName( String Name) { return SComp::GetFromName<SSphere>(Name); }
174
178 // TESTED
179 static Array FromSel() { return SFeature::GetFromSel<SSphere>(); }
180
184 // TESTED
185 static Array All(
186 Number VisCrit
191 )
192 {
193 return SComp::GetAll<SSphere>(VisCrit);
194 }
195
198 static String toString();
199};
200Q_DECLARE_METATYPE(SSphere::_SSphereDummy);
201Q_DECLARE_METATYPE(SSphere);
202
203#ifndef FCT_DOC
204} // namespace rsh::ScriptBinding
205#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
Sphere manipulation class. The SSphere creation can be done by calling the static functions: .
Definition: SSphere.h:24
static SSphere New()
Default constructor to create an empty new SSphere.
static SSphere New(SSphere Other)
Constructs an SSphere by copying Other.
SetRadius(Number Radius)
To set a new radius to the SSphere.
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SSphere.h:167
Number GetRadius()
static SSphere New(SPoint ipFirstPt, SPoint ipSecondPt, SPoint ipThirdPt)
Constructs a new SSphere by 3 points.
Number Distance(SPoint iPoint)
Returns the distance between a point and the feature <0 if below/inside the feature >0 if above/outsi...
String toString()
Get the type of the variable.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SSphere.h:185
Boolean IsOuter()
To know if the SSphere is set to be scanned from the inside or from the outside.
Array Discretize(Number deflection, Number meanPointDistance)
To convert the continuous feature into a discretized SPoly. Only one of the parameters must be specif...
static SSphere New(SPoint FirstPt, SPoint SecondPt)
Constructs a new SSphere by 2 points.
SetInner()
To set the SSphere to a sphere scanned from the inside.
SetOuter()
To set the SSphere to a sphere scanned from the outside.
Number GetSurface()
Returns the surface of the sphere.
static Array FromName(String Name)
Search all the component with the given name.
Definition: SSphere.h:173
static Array FromSel()
To get all the selected SComp.
Definition: SSphere.h:179
static String toString()
Get the type of the variable.
static SSphere New(SPoint Center, Number Radius)
Constructs a new SSphere by defining its data.