Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SCylinder.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 SCylinder : public SFeature
24{
25 //======================================================================================================================
26 // INTERNAL FUNCTION
27 //======================================================================================================================
28
29 //======================================================================================================================
30 // DOCUMENTED FUNCTION
31 //======================================================================================================================
32public slots: // these functions (slots) will be available in QtScript
33
37 // TESTED
38 Number GetRadius() ;
41 // TESTED
42 SetRadius(Number Radius
44 );
45
49 // TESTED
50 Number GetLength() ;
53 // TESTED
54 SetLength(Number Length
56 );
57
62 Boolean IsOuter() ;
63
67
71
75 // TESTED
76 Number GetSurface() ;
77
87 // TESTED
89 Number deflection,
91 Number meanPointDistance
93 ) ;
94
100 // TESTED
105 // TESTED
107
111 // TESTED
116 // TESTED
118
123 // TESTED
124 Number Distance(SPoint iPoint
126 ) ;
127
130 String toString() ;
131};
132
133// @brief
134// This class allows to wrap static functions to SCylinder easily.
135// This allows to wrap constructors more easily, constructors will be declared with the function New(...)
136class SCylinder
137#ifndef FCT_DOC
138 : public SObjectStatic
139#endif // FCT_DOC
140{
141 //======================================================================================================================
142 // INTERNAL FUNCTION
143 //======================================================================================================================
144
145 //======================================================================================================================
146 // DOCUMENTED FUNCTION
147 //======================================================================================================================
148public slots:
151 // TESTED
152 static SCylinder New();
153
156 // TESTED
157 static SCylinder New(SCylinder Other);
158
162 // TESTED
164 SPoint Center,
166 SVector NormalDir,
168 Number Radius,
170 Number Length
172 );
173
180 // TESTED
182 SPoint FirstPt,
184 SPoint SecondPt,
186 SPoint ThirdPt,
188 SPoint FourthPt
190 );
191
201 static Array FromClick() { return SComp::GetFromClick<SCylinder>(SV_CYLINDER); }
202
206 // TESTED
207 static Array FromName( String Name) { return SComp::GetFromName<SCylinder>(Name); }
208
212 // TESTED
213 static Array FromSel() { return SFeature::GetFromSel<SCylinder>(); }
214
218 // TESTED
219 static Array All(
220 Number VisCrit
225 )
226 {
227 return SComp::GetAll<SCylinder>(VisCrit);
228 }
229
232 static String toString();
233};
234Q_DECLARE_METATYPE(SCylinder::_SCylinderDummy);
235Q_DECLARE_METATYPE(SCylinder);
236
237#ifndef FCT_DOC
238} // namespace rsh::ScriptBinding
239#endif // !FCT_DOC
Circle manipulation class. The SCircle creation can be done by calling the static functions: .
Definition: SCircle.h:24
Cylinder manipulation class. The SCylinder creation can be done by calling the static functions: .
Definition: SCylinder.h:24
SetOuter()
To set the SCylinder to a cylinder scanned from the outside.
static Array FromSel()
To get all the selected SComp.
Definition: SCylinder.h:213
static SCylinder New()
Default constructor to create an empty new SCylinder.
SetLength(Number Length)
Setter for length.
SPoint GetTopCenter()
Boolean IsOuter()
To know if the SCylinder is set to be scanned from the inside or from the outside.
static String toString()
Get the type of the variable.
SetInner()
To set the SCylinder to a cylinder scanned from the inside.
static Array FromName(String Name)
Search all the component with the given name.
Definition: SCylinder.h:207
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SCylinder.h:219
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SCylinder.h:201
static SCylinder New(SPoint FirstPt, SPoint SecondPt, SPoint ThirdPt, SPoint FourthPt)
Constructs a new SCylinder by 4 points.
Number GetRadius()
SCircle GetBaseCircle()
SetRadius(Number Radius)
Setter for the radius.
SCircle GetTopCircle()
Number Distance(SPoint iPoint)
Returns the distance between a point and the feature <0 if below/inside the feature >0 if above/outsi...
static SCylinder New(SPoint Center, SVector NormalDir, Number Radius, Number Length)
Constructs a custom SCylinder from a given center point, normal direction, radius and length.
Array Discretize(Number deflection, Number meanPointDistance)
To convert the continuous feature into a discretized SPoly. Only one parameter must be specified at a...
Number GetSurface()
SPoint GetBaseCenter()
String toString()
Get the type of the variable.
static SCylinder New(SCylinder Other)
Constructs an SCylinder by copying the SCylinder Other.
Number GetLength()
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
The mathematical object vector.
Definition: SVector3.h:26