Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SPlane.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 SPlane : 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
35
38 // TESTED
39 Number GetSurface() ;
40
43 // TESTED
44 Number GetLength() ;
47 // TESTED
48 SetLength(Number iLength);
51 // TESTED
52 Number GetWidth() ;
55 // TESTED
56 SetWidth(Number iWidth);
69
79 // TESTED
81 Number deflection,
83 Number meanPointDistance
85 ) ;
86
91 // TESTED
92 Number Distance(SPoint iPoint
94 ) ;
95
104 Array Proj3D(SPoint iPointToProject
106 ) ;
107
116 Array Proj3D(SMultiline iMultilineToProject
118 ) ;
119
128 Array ProjDir(
129 SPoint iPointToProject,
131 SVector iProjectionVector
133 ) ;
134
144 Array ProjDir(
145 SMultiline iMultilineToProject,
147 SVector Direction
149 ) ;
150
160 SPoint iLowerPoint,
162 SPoint iUpperPoint,
164 Boolean iMoveCenter,
166 Number iScale
168 );
169
181 SComp iSelComp,
183 Number iOption
192 );
193
202 );
203
206 String toString() ;
207};
208
209#pragma region SPlane
210// @brief
211// this class allow to wrap static function to SPlane easily
212// this allow to wrap constructor more easily the constructor will be declared with the function New(...)
213class SPlane
214#ifndef FCT_DOC
215 : public SObjectStatic
216#endif // FCT_DOC
217{
218 //======================================================================================================================
219 // INTERNAL FUNCTION
220 //======================================================================================================================
221
222 //======================================================================================================================
223 // DOCUMENTED FUNCTION
224 //======================================================================================================================
225
226public slots:
229 // TESTED
230 static SPlane New();
231
234 // TESTED
235 static SPlane New(SPlane Other);
236
239 // TESTED
240 static SPlane New(
241 SPoint Center,
243 SVector Normal,
245 SVector XDir,
247 Number Length,
249 Number Width
251 );
252
255 // TESTED
256 static SPlane New(
257 SPoint Center,
259 SVector Normal
261 );
262
268 // TESTED
269 static SPlane New(
270 SPoint FirstPt,
272 SPoint SecondPt,
274 SPoint ThirdPt
276 );
277
287 static Array FromClick() { return SComp::GetFromClick<SPlane>(SV_PLANE); }
288
292 // TESTED
293 static Array FromName( String Name) { return SComp::GetFromName<SPlane>(Name); }
294
298 // TESTED
299 static Array FromSel() { return SFeature::GetFromSel<SPlane>(); }
300
304 // TESTED
305 static Array All(
306 Number VisCrit
311 )
312 {
313 return SComp::GetAll<SPlane>(VisCrit);
314 }
315
318 static String toString();
319};
320Q_DECLARE_METATYPE(SPlane::_SPlaneDummy);
321Q_DECLARE_METATYPE(SPlane);
322
323#pragma endregion
324
325#ifndef FCT_DOC
326} // namespace rsh::ScriptBinding
327#endif // !FCT_DOC
The SComp class is an abstract class. Use derived classes SCircle, SCylinder, SCloud,...
Definition: SComp.h:32
The SFeature class is an abstract class.
Definition: SFeature.h:19
Class to store a multiline, that is: an ordered list of points. The SMultiline creation can be done b...
Definition: SMultiLine.h:24
Plane manipulation class. The SPlane creation can be done by calling the static functions: .
Definition: SPlane.h:24
Array Proj3D(SPoint iPointToProject)
Projects a point onto the plane (shortest point)
static Array All(Number VisCrit)
To get all the SComp in the document.
Definition: SPlane.h:305
static Array FromName(String Name)
Search all the component with the given name.
Definition: SPlane.h:293
SetLength(Number iLength)
Setter for the length.
SVector GetXDir()
static SPlane New(SPlane Other)
Constructs an SPlane by copying the SPlane Other.
SVector GetYDir()
static SPlane New()
Default constructor to create an empty new SPlane.
Number GetSurface()
Returns the surface of the feature.
Array Discretize(Number deflection, Number meanPointDistance)
To discretize the current feature. Only one parameter must be specified at a time: To use the deflect...
Array Proj3D(SMultiline iMultilineToProject)
Calculates the 3D projection of a SMultiline on an SPoly.
static SPlane New(SPoint FirstPt, SPoint SecondPt, SPoint ThirdPt)
Constructs a new SPlane by 3 points.
Number GetWidth()
Returns the width.
String toString()
Get the type of the variable.
Array ProjDir(SPoint iPointToProject, SVector iProjectionVector)
Projects a point onto the plane according to a given direction.
static Array FromClick()
Launches a click interaction to select a SComp in the scene.
Definition: SPlane.h:287
Number Distance(SPoint iPoint)
Returns the distance between a point and the feature <0 if below/inside the feature >0 if above/outsi...
Number GetLength()
Returns the length.
Array ProjDir(SMultiline iMultilineToProject, SVector Direction)
Calculate the projection of a polyline onto the current plane along a direction.
static SPlane New(SPoint Center, SVector Normal, SVector XDir, Number Length, Number Width)
Constructs a new SPlane by defining its data.
Array IntersectionBetween2Planes(SPlane iSecondPlane)
Calculate intersection with another plane.
Array BestSymmetryPlane(SComp iSelComp, Number iOption)
Compute the best symmetry plane of a cloud or mesh.
static String toString()
Get the type of the variable.
SetWidth(Number iWidth)
Setter for the width.
Array FitPlaneToBoundingBox3D(SPoint iLowerPoint, SPoint iUpperPoint, Boolean iMoveCenter, Number iScale)
Modify the plane's size. Compute the intersection between a box and plane.
static SPlane New(SPoint Center, SVector Normal)
Constructs a new SPlane by defining its data.
static Array FromSel()
To get all the selected SComp.
Definition: SPlane.h:299
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