Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
ZSCADUtil.h
1
2
3
5
6#pragma once
7
8#include "RshPluginCmdShape/RshPluginCmdShapeDefines.h"
9#include "RshPluginDShape/SShape/SShape.h"
10#include "RshPluginScriptInterface/Script/SObjectStatic.h"
11
12#ifndef FCT_DOC
13namespace rsh::ScriptBinding
14{
15#endif // !FCT_DOC
24#ifdef FCT_DOC
25namespace SCADUtil
26#else
27class SCADUtil : public SObjectStatic
28#endif // FCT_DOC
29{
30//======================================================================================================================
31// INTERNAL FUNCTION
32//======================================================================================================================
33
34//======================================================================================================================
35// DOCUMENTED FUNCTION
36//======================================================================================================================
37public slots:
46static Array Convert(SFeature iFeature
48);
49
67static Array Import(String iFilename
69);
70
78static Array Export(
79 String iFilename,
81 Array<SShape> iCompTable,
83 SMatrix iCoordinateSystemMatrix = {}
86);
87
95Array Discretize(SShape iSShape);
96
99 String toString() ;
100};
101#ifdef FCT_DOC
102class SMultiline
103#else
104class _SCADMultiUtil : public SObjectStatic
105#endif
106{
107 Q_OBJECT;
108
109
110public slots:
122 static Array ComputeNeutralAxis(
123 SComp iTubularShape,
125 SComp iHelpLine,
127 Boolean iIsCircle,
129 Number iApproxDiameter,
131 Number iApproxWidth,
133 Number iApproxLength,
135 SVector
136 iDirection,
138 Number iCalculationAccuracy,
140 Boolean iDetectAbsurdPoints,
142 Number iSmoothNeutralAxis,
144 Boolean iReconstructPipe
146 );
147
157 static Array ComputeNeutralAxis(
158 SComp iTubularShape,
160 SComp iHelpLine,
162 Boolean iIsCircle,
164 Number iApproxDiameter,
166 Number iApproxWidth,
168 Number iApproxLength,
170 SVector
171 iDirection,
173 Number iCalculationAccuracy,
175 Number iSmoothNeutralAxis,
177 Boolean iReconstructPipe
179 );
180};
181
182#ifdef FCT_DOC
183class SPoly
184#else
185class _SCADPolyUtil : public SObjectStatic
186#endif
187{
188 Q_OBJECT;
189
190
191public slots:
202 static Array ProfileAlongPath(
203 SComp iProfile,
205 SComp iPath,
207 Boolean iMakePerpendicular,
209 Boolean iTurnWthCurve,
211 Boolean iUsePathToLeanOn,
213 Boolean iStartAtProfilePosition,
215 Boolean iCloseExtremities,
217 SComp iPathToLeanOn
219 );
220};
221
222#ifdef FCT_DOC
223class SShape
224#else
225class _SCADShapeUtil : public SObjectStatic
226#endif
227{
228 Q_OBJECT;
229
230
231public slots:
245 static Array LinearExtrusion(
246 Number iLength,
247 SVector iDirection,
248 Boolean iCloseExtremities,
249 Array<SComp> iShapes);
250
264 static Array PipeTubeAlongPath(
265 Number iRadius,
266 Boolean iCloseExtremities,
267 Array<SComp> iShapes);
268
278 static Array ProfileAlongPath(
279 SComp iProfile,
281 SComp iPath,
283 Boolean iMakePerpendicular,
285 Boolean iStartAtProfilePosition,
287 Boolean iCloseExtremities
289 );
290
299 static Array ExtractWire(
300 Array<SShape> iCompTable
302 );
303
312 static Array ExtractCurve(
313 Array<SShape> iCompTable
315 );
316
326 static Array Sew(
327 Array<SShape> iCompTable,
329 Number iSewingTolerance
331 );
332};
333
334#ifndef FCT_DOC
335} // namespace rsh::ScriptBinding
336#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
Matrix with 3 lines and 4 columns to make any transformation. This class should be used in order to a...
Definition: SMatrix.h:21
Class to store a multiline, that is: an ordered list of points. The SMultiline creation can be done b...
Definition: SMultiLine.h:24
static Array ComputeNeutralAxis(SComp iTubularShape, SComp iHelpLine, Boolean iIsCircle, Number iApproxDiameter, Number iApproxWidth, Number iApproxLength, SVector iDirection, Number iCalculationAccuracy, Number iSmoothNeutralAxis, Boolean iReconstructPipe)
This function is used to compute the neutral axis of a SCloud or SPoly or surfacic SShape.
static Array ComputeNeutralAxis(SComp iTubularShape, SComp iHelpLine, Boolean iIsCircle, Number iApproxDiameter, Number iApproxWidth, Number iApproxLength, SVector iDirection, Number iCalculationAccuracy, Boolean iDetectAbsurdPoints, Number iSmoothNeutralAxis, Boolean iReconstructPipe)
This function is used to compute the neutral axis of a SCloud or SPoly or surfacic SShape.
The SPoly class provides triangular mesh(es) manipulation. The SPoly creation can be done by calling ...
Definition: SPoly.h:39
static Array ProfileAlongPath(SComp iProfile, SComp iPath, Boolean iMakePerpendicular, Boolean iTurnWthCurve, Boolean iUsePathToLeanOn, Boolean iStartAtProfilePosition, Boolean iCloseExtremities, SComp iPathToLeanOn)
Compute mesh corresponding to the extrusion of a given profile along a given path.
Shape manipulation class. The SShape creation can be done by calling the static function New() to cop...
Definition: SShape.h:22
static Array ExtractWire(Array< SShape > iCompTable)
Extract free borders from surfacic SShape as wire.
static Array ExtractCurve(Array< SShape > iCompTable)
Extract free border from surfacic SShape as curves.
static Array ProfileAlongPath(SComp iProfile, SComp iPath, Boolean iMakePerpendicular, Boolean iStartAtProfilePosition, Boolean iCloseExtremities)
Compute CAD face corresponding to the extrusion of a given profile along a given path.
static Array LinearExtrusion(Number iLength, SVector iDirection, Boolean iCloseExtremities, Array< SComp > iShapes)
Compute CAD face(s) corresponding to the extrusion of profile(s) along a direction,...
static Array PipeTubeAlongPath(Number iRadius, Boolean iCloseExtremities, Array< SComp > iShapes)
Compute CAD face(s) corresponding to the extrusion of a circle with a given radius along a given path...
static Array Sew(Array< SShape > iCompTable, Number iSewingTolerance)
Sew surfacic SShape according to a given tolerance.
The mathematical object vector.
Definition: SVector3.h:26
These are CAD objects manipulation and utility functions.
Definition: ZSCADUtil.h:29
static Array Convert(SFeature iFeature)
Convert a feature into a CAD object.
static Array Import(String iFilename)
Import a IGES or STEP file into a CAD object.
static Array Export(String iFilename, Array< SShape > iCompTable, SMatrix iCoordinateSystemMatrix={})
Export a table of CAD objects in a IGES or STEP file.
Array Discretize(SShape iSShape)
To convert the SShape into a discretized SPoly and a discretized SMultiline.