Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SCone.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 SCone : 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 GetBaseRadius() ;
43 // TESTED
44 Boolean SetBaseRadius(Number Radius);
47 // TESTED
48 Number GetTopRadius() ;
53 // TESTED
54 Boolean SetTopRadius(Number Radius);
57 // TESTED
58 Number GetLength() ;
63 // TESTED
64 Boolean SetLength(Number Length);
67 Number GetAngle() ;
74 Number SetAngle(
75 Number Angle,
77 Boolean ModifyLength
81 );
84 Number GetAngleDegree() ;
85
90 Boolean IsOuter() ;
91
95
99
102 // TESTED
103 Number GetSurface() ;
107 // TESTED
111 // TESTED
119 // TESTED
120 SCircle GetCircle(Number Height) ;
121
131 // TESTED
133 Number deflection,
135 Number meanPointDistance
137 ) ;
138
143 // TESTED
144 Number Distance(SPoint Point
146 ) ;
147
150 String toString() ;
151};
152
153// @brief
154// This class allows to wrap static functions to SCone easily.
155// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
156class SCone
157#ifndef FCT_DOC
158 : public SObjectStatic
159#endif // FCT_DOC
160{
161 //======================================================================================================================
162 // INTERNAL FUNCTION
163 //======================================================================================================================
164
165 //======================================================================================================================
166 // DOCUMENTED FUNCTION
167 //======================================================================================================================
168public slots:
171 // TESTED
172 static SCone New();
173
176 // TESTED
177 static SCone New(SCone Other);
178
181 // TESTED
182 static SCone New(
183 SPoint Center,
185 SVector NormalDir,
187 Number LRadius,
189 Number SRadius,
191 Number Length
193 );
194
201 // TESTED
202 static SCone New(
203 SPoint FirstPt,
205 SPoint SecondPt,
207 SPoint ThirdPt,
209 SPoint FourthPt
211 );
212
222 static Array FromClick() { return SComp::GetFromClick<SCone>(SV_CONE); }
223
227 // TESTED
228 static Array FromName( String Name) { return SComp::GetFromName<SCone>(Name); }
229
233 // TESTED
234 static Array FromSel() { return SFeature::GetFromSel<SCone>(); }
235
239 // TESTED
240 static Array All(
241 Number VisCrit
246 )
247 {
248 return SComp::GetAll<SCone>(VisCrit);
249 }
250
253 static String toString();
254};
255Q_DECLARE_METATYPE(SCone::_SConeDummy);
256Q_DECLARE_METATYPE(SCone);
257
258#ifndef FCT_DOC
259} // namespace rsh::ScriptBinding
260#endif // !FCT_DOC
Circle manipulation class. The SCircle creation can be done by calling the static functions: .
Definition: SCircle.h:24
Cone manipulation class. The SCone creation can be done by calling the static functions: .
Definition: SCone.h:24
Number Distance(SPoint Point)
Returns the distance between a point and the feature <0 if below/inside the feature >0 if above/outsi...
static SCone New(SPoint FirstPt, SPoint SecondPt, SPoint ThirdPt, SPoint FourthPt)
Constructs a new SCone by 4 points.
SCircle GetCircle(Number Height)
returns a circle for a given height value = 0 -> Base Circle 1 -> Top Circle can be lower or upper th...
Boolean SetTopRadius(Number Radius)
modifies the top radius of the cone
Boolean SetBaseRadius(Number Radius)
modifies the base radius of the cone
SetOuter()
To set the SCone to a cone scanned from the outside.
SPoint GetBaseCenter()
returns the base center of the cone
static SCone New()
Default constructor to create an empty new SCone.
SPoint GetTopCenter()
returns the top center of the cone
static Array FromSel()
To get all the selected SComp.
Definition: SCone.h:234
static String toString()
Get the type of the variable.
String toString()
Get the type of the variable.
Number GetSurface()
Returns the surface of the cone.
Boolean SetLength(Number Length)
modifies the length of the cone
Number GetLength()
returns the length of the cone
Boolean IsOuter()
To know if the SCone 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 parameter must be specified at a...
static SCone New(SPoint Center, SVector NormalDir, Number LRadius, Number SRadius, Number Length)
Constructs a new SCone by defining its data.
Number GetAngle()
returns the angle of the cone in radian
SetInner()
To set the SCone to a cone scanned from the inside.
Number GetAngleDegree()
returns the angle of the cone in degrees
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SCone.h:222
static SCone New(SCone Other)
Constructs an SCone by copying Other.
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SCone.h:240
Number SetAngle(Number Angle, Boolean ModifyLength)
modifies the angle of the cone in radian
Number GetTopRadius()
returns the top radius of the cone
Number GetBaseRadius()
returns the base radius of the cone
static Array FromName(String Name)
Search all the component with the given name.
Definition: SCone.h:228
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