Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SBim.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 "RshPluginBIM/RshPluginBIMDefines.h"
9#include "RshDisplay/Utility/RshMetaTypes.h"
10#include "RshPluginBIM/BIM/SBIM.h"
11#include "RshPluginScript/SClass/SComp.h"
12
13#ifndef FCT_DOC
14namespace rsh::ScriptBinding
15{
16#endif // !FCT_DOC
17
21class RshPluginBIMAPI SBIM : public SComp
22{
23 //======================================================================================================================
24 // INTERNAL FUNCTION
25 //======================================================================================================================
26
27 //======================================================================================================================
28 // DOCUMENTED FUNCTION
29 //======================================================================================================================
30public:
35 {
36 // representations which are always available
37 BIM_FLAT, // segments and vertices are displayed
38 BIM_COLOR, // a color per instance
39 };
40
41public slots: // these functions (slots) will be available in QtScriptconst;
42
47 );
48
62 String iFilter = "",
64 QStringList iStoreyNames = {}
66 );
67
74 Array ConvertPolys();
75
78 String toString() ;
79};
80
81// @brief
82// This class allows to wrap static functions to SBIM easily.
83// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
84class SBIM
85#ifndef FCT_DOC
86 : public SObjectStatic
87#endif // FCT_DOC
88{
89 //======================================================================================================================
90 // INTERNAL FUNCTION
91 //======================================================================================================================
92
93 //======================================================================================================================
94 // DOCUMENTED FUNCTION
95 //======================================================================================================================
96public slots:
97
100 // TESTED
101 static SBIM New(SBIM Other);
102
112 static Array FromClick() { return SComp::GetFromClick<SBIM>(SV_BIM); }
113
117 static Array FromName( String Name) { return SComp::GetFromName<SBIM>(Name); }
118
122 static Array FromSel();
123
127 static Array All(
128 Number VisCrit
133 )
134 {
135 return SComp::GetAll<SBIM>(VisCrit);
136 }
137
154 static Array FromFile(
155 String iFilename,
157 String iFilter = "",
159 QStringList iStoreyNames = {}
161 );
162
186 static Array GetMetadata(SPoly iMesh
188 );
189
192 static String toString();
193};
194Q_DECLARE_METATYPE(SBIM::_SBIMDummy);
195Q_DECLARE_METATYPE(SBIM);
196
197#ifndef FCT_DOC
198} // namespace rsh::ScriptBinding
199#endif // !FCT_DOC
BIM manipulation class. The SBIM creation can be done by calling the static function New() to copy an...
Definition: SBim.h:22
static String toString()
Get the type of the variable.
static Array FromClick()
Launches a click interaction to select a SBIM in the scene.
Definition: SBim.h:112
Array ConvertPolys()
Convert all filtered geometries into a table of mesh.
static Array FromSel()
To get all the selected SBIM.
static Array FromName(String Name)
Search all the SBIM with the given name.
Definition: SBim.h:117
static SBIM New(SBIM Other)
Constructs an SBIM by copying the SBIM Other.
BIMRepresentationTypeEnum
The different representation types for BIM object. Use SBIM.BIM_COLOR.
Definition: SBim.h:35
@ BIM_COLOR
Definition: SBim.h:38
@ BIM_FLAT
Definition: SBim.h:37
SetBIMRepresentation(BIMRepresentationTypeEnum iRepresentation)
The representation of the component is modified.
Array ApplyFilter(String iFilter="", QStringList iStoreyNames={})
Edit content of the BIM with given filters.
static Array All(Number VisCrit)
To get all the SBIM in the document.
Definition: SBim.h:127
static Array GetMetadata(SPoly iMesh)
Get all metadata associated to the given mesh as list of key and value for each metadata.
String toString()
Get the type of the variable.
static Array FromFile(String iFilename, String iFilter="", QStringList iStoreyNames={})
Import a BIM file (.rvt, .ifc) and apply filters.
The SComp class is an abstract class. Use derived classes SCircle, SCylinder, SCloud,...
Definition: SComp.h:32
The SPoly class provides triangular mesh(es) manipulation. The SPoly creation can be done by calling ...
Definition: SPoly.h:39