Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SShape.h
1
2// This file is part of the 3DReshaper technology software and is a proprietary information of TECHNODIGIT.
3// Do NOT reproduce or disclose this file without TECHNODIGIT written consent.
5
6#pragma once
7
8#include "RshPluginCmdShape/RshPluginCmdShapeDefines.h"
9#include "RshPluginDShape/SShape/SShape.h"
10#include "RshPluginDShapeInterface/SShape/DShapeMetaType.h"
11#include "RshPluginScript/SClass/SComp.h"
12
13#ifndef FCT_DOC
14namespace rsh::ScriptBinding
15{
16#endif // !FCT_DOC
17
21class RshPluginCmdShapeAPI SShape : public SComp
22{
23 //======================================================================================================================
24 // INTERNAL FUNCTION
25 //======================================================================================================================
26
27 //======================================================================================================================
28 // DOCUMENTED FUNCTION
29 //======================================================================================================================
30
31public slots: // these functions (slots) will be available in QtScriptconst;
40 // TESTED
41 Array Explode() ;
42
45 String toString() ;
46};
47
48// @brief
49// This class allows to wrap static functions to SShape easily.
50// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
51class RshPluginCmdShapeAPI SShape
52#ifndef FCT_DOC
53 : public SObjectStatic
54#endif // FCT_DOC
55{
56 //======================================================================================================================
57 // INTERNAL FUNCTION
58 //======================================================================================================================
59
60 //======================================================================================================================
61 // DOCUMENTED FUNCTION
62 //======================================================================================================================
63
64public:
68 {
69 INTERPOLATE,
71 APPROXIMATE
73 };
74
78 {
79 FLATTEST,
82 MOST_CURVED
84 };
85
86public slots:
87
97 static Array FromClick() { return SComp::GetFromClick<SShape>(SV_SHAPE); }
98
102 // TESTED
103 static Array FromName( String Name) { return SComp::GetFromName<SShape>(Name); }
104
108 // TESTED
109 static Array FromSel();
110
114 // TESTED
115 static Array All(
116 Number VisCrit
121 )
122 {
123 return SComp::GetAll<SShape>(VisCrit);
124 }
125
128 static SShape New(SShape Other);
129
132 static SShape New(
133 SMultiline iMultiline,
135 SmoothingMethod iMethod
137 );
138
144
149 static SShape CreateCompound(Array<SShape> iOthers);
150
163 static Array Fill(
164 SShape iWire,
166 FillingType iFillingType
168 );
169
178 static Array CreateWire(
179 Array<SShape> iEdgeTable
181 );
182
193 static Array AddRestriction(
194 SShape iSurface,
196 SShape iWireRestriction
198 );
199
210 static Array AddHoles(
211 SShape iSurface,
213 Array<SShape> iLinearTable
215 );
216
226 static Array FitOnMesh(
227 SShape iSurface,
229 SPoly iMesh,
231 Boolean iImmobileUMin,
233 Boolean iImmobileUMax,
235 Boolean iImmobileVMin,
237 Boolean iImmobileVMax,
239 Boolean iProjBadPtsOnCloud
241 );
242
245 static String toString();
246};
247RSH_SCOMP_STATIC_Q_DECLARE_METATYPE(SShape, _SShapeDummy);
248
249#ifndef FCT_DOC
250} // namespace rsh::ScriptBinding
251#endif // !FCT_DOC
The SComp class is an abstract class. Use derived classes SCircle, SCylinder, SCloud,...
Definition: SComp.h:32
Class to store a multiline, that is: an ordered list of points. The SMultiline creation can be done b...
Definition: SMultiLine.h:24
The SPoly class provides triangular mesh(es) manipulation. The SPoly creation can be done by calling ...
Definition: SPoly.h:39
Shape manipulation class. The SShape creation can be done by calling the static function New() to cop...
Definition: SShape.h:22
static Array AddRestriction(SShape iSurface, SShape iWireRestriction)
Create restriction to a CAD Surface from a closed CAD wire.
static SShape CreateTriangulatedSurface(SPoly iPoly)
Constructs a SShape triangulated surface by converting a SPoly.
static Array FromName(String Name)
Search all the SShape with the given name.
Definition: SShape.h:103
static Array AddHoles(SShape iSurface, Array< SShape > iLinearTable)
Create holes to a CAD Surface from closed CAD edge and CAD wire.
static Array CreateWire(Array< SShape > iEdgeTable)
Construct a new CAD wire by connecting all CAD edges.
static SShape CreateCompound(Array< SShape > iOthers)
Constructs a SShape compound from the given shape list.
static SShape New(SShape Other)
Constructs a SShape by copying Other.
static String toString()
Get the type of the variable.
static Array Fill(SShape iWire, FillingType iFillingType)
Create a filling surface from CAD wire. You have to enter the command with a closed wire composed of ...
static Array All(Number VisCrit)
To get all the SShape in the document.
Definition: SShape.h:115
static SShape New(SMultiline iMultiline, SmoothingMethod iMethod)
Constructs a new BSpline curve by smoothing (interpolation or approximation) a SMultiline.
String toString()
Get the type of the variable.
SmoothingMethod
Smoothing method used for BSpline curve creation.
Definition: SShape.h:68
static Array FitOnMesh(SShape iSurface, SPoly iMesh, Boolean iImmobileUMin, Boolean iImmobileUMax, Boolean iImmobileVMin, Boolean iImmobileVMax, Boolean iProjBadPtsOnCloud)
Fit a CAD Surface on a mesh.
static Array FromSel()
To get all the selected SShape.
FillingType
The type of filling to use.
Definition: SShape.h:78
@ MEDIUM
Definition: SShape.h:81
static Array FromClick()
Launches a click interaction to select a SShape in the scene.
Definition: SShape.h:97
Array Explode()
Explode the CAD object.