markuno_lib 1.1.26 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/markcad.js +4 -1
- package/bin/marked.js +2 -2
- package/bin/markuno.js +5 -5
- package/package.json +37 -13
- package/types/bus_utils.d.ts +49 -0
- package/types/markcad.d.ts +413 -0
- package/types/markcad3d.d.ts +162 -0
- package/types/marked.d.ts +70 -0
- package/types/markuno.d.ts +555 -0
- package/types/proto.d.ts +0 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classe che rappresenta una linea 2D definita da due punti
|
|
3
|
+
*/ export class Linea2 {
|
|
4
|
+
/**
|
|
5
|
+
* Crea una nuova linea 2D
|
|
6
|
+
* @param {number|Object} p1 - Coordinata x del primo punto o oggetto {x,y}
|
|
7
|
+
* @param {number|Object} p2 - Coordinata y del primo punto o oggetto {x,y}
|
|
8
|
+
* @param {number} [x2=null] - Coordinata x del secondo punto (opzionale)
|
|
9
|
+
* @param {number} [y2=null] - Coordinata y del secondo punto (opzionale)
|
|
10
|
+
*/
|
|
11
|
+
constructor(p1: number | any, p2: number | any, x2?: number, y2?: number);
|
|
12
|
+
p1: Punto2;
|
|
13
|
+
p2: Punto2;
|
|
14
|
+
/**
|
|
15
|
+
* Restituisce una rappresentazione testuale della linea
|
|
16
|
+
* @returns {string} Stringa nel formato "p1-p2"
|
|
17
|
+
*/ get dump(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Calcola la differenza delle coordinate x dei punti
|
|
20
|
+
* @returns {number} Differenza x
|
|
21
|
+
*/ get dx(): number;
|
|
22
|
+
/**
|
|
23
|
+
* Calcola la differenza delle coordinate y dei punti
|
|
24
|
+
* @returns {number} Differenza y
|
|
25
|
+
*/ get dy(): number;
|
|
26
|
+
/**
|
|
27
|
+
* Calcola il quadrato della lunghezza della linea
|
|
28
|
+
* @returns {number} Lunghezza al quadrato
|
|
29
|
+
*/ get len2(): number;
|
|
30
|
+
/**
|
|
31
|
+
* Calcola la lunghezza della linea
|
|
32
|
+
* @returns {number} Lunghezza
|
|
33
|
+
*/ get len(): number;
|
|
34
|
+
/**
|
|
35
|
+
* Estende la linea di una certa lunghezza o fino all'intersezione con un'altra linea
|
|
36
|
+
* @param {number|Linea2} l - Lunghezza di estensione o linea da intersecare
|
|
37
|
+
* @returns {Linea2} Nuova linea estesa
|
|
38
|
+
*/ estendi(l: number | Linea2): Linea2;
|
|
39
|
+
/**
|
|
40
|
+
* Calcola il vettore direzione normalizzato della linea
|
|
41
|
+
* @returns {Punto2} Vettore direzione
|
|
42
|
+
*/ get direzione(): Punto2;
|
|
43
|
+
/**
|
|
44
|
+
* Calcola il vettore normale normalizzato della linea
|
|
45
|
+
* @returns {Punto2} Vettore normale
|
|
46
|
+
*/ get normale(): Punto2;
|
|
47
|
+
/**
|
|
48
|
+
* Crea una nuova linea ruotata di un certo angolo
|
|
49
|
+
* @param {number} [angle=Math.PI/2] - Angolo di rotazione in radianti
|
|
50
|
+
* @param {number} [length=0] - Lunghezza della nuova linea
|
|
51
|
+
* @param {boolean} [fine=false] - Se true ruota attorno al primo punto, altrimenti al secondo
|
|
52
|
+
* @returns {Linea2} Nuova linea ruotata
|
|
53
|
+
*/ ruotata(angle?: number, length?: number, fine?: boolean): Linea2;
|
|
54
|
+
/**
|
|
55
|
+
* Calcola un punto sulla direzione della linea a una certa distanza
|
|
56
|
+
* @param {Punto2} p1 - Punto di partenza
|
|
57
|
+
* @param {number} lunghezza - Distanza dal punto di partenza
|
|
58
|
+
* @returns {Punto2} Nuovo punto
|
|
59
|
+
*/ puntosudirezione(p1: Punto2, lunghezza: number): Punto2;
|
|
60
|
+
/**
|
|
61
|
+
* Crea una nuova linea parallela a questa passante per un punto
|
|
62
|
+
* @param {Punto2} p1 - Punto di passaggio
|
|
63
|
+
* @param {number} lunghezza - Lunghezza della nuova linea
|
|
64
|
+
* @returns {Linea2} Nuova linea parallela
|
|
65
|
+
*/ parallela(p1: Punto2, lunghezza: number): Linea2;
|
|
66
|
+
/**
|
|
67
|
+
* Calcola il punto di intersezione con un'altra linea
|
|
68
|
+
* @param {Linea2} line2 - Seconda linea
|
|
69
|
+
* @returns {Punto2|null} Punto di intersezione o null se parallele
|
|
70
|
+
*/ intersezione(line2: Linea2): Punto2 | null;
|
|
71
|
+
onsegment(p: any, eps?: number): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Verifica se la linea è parallela a un'altra
|
|
74
|
+
* @param {Linea2} line2 - Seconda linea
|
|
75
|
+
* @returns {boolean} True se parallele
|
|
76
|
+
*/ isparallela(line2: Linea2): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Restituisce alcune info sul “quadrilatero” formato da questa linea e da line2,
|
|
79
|
+
* assumendo che siano parallele e abbiano verso invertito.
|
|
80
|
+
* @param {Linea2} line2
|
|
81
|
+
* @returns {Object|undefined}
|
|
82
|
+
* { angle, aini, afin, l, distanza } oppure undefined se non parallele o degenere
|
|
83
|
+
*/ infoquad(line2: Linea2): any | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Verifica se la linea è perpendicolare a un'altra
|
|
86
|
+
* @param {Linea2} line2 - Seconda linea
|
|
87
|
+
* @returns {boolean} True se perpendicolari
|
|
88
|
+
*/ isperpendicolare(line2: Linea2): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Crea una nuova linea parallela a questa a una certa distanza
|
|
91
|
+
* @param {number} delta - Distanza di offset (positiva a sinistra, negativa a destra)
|
|
92
|
+
* @returns {Linea2} Nuova linea parallela
|
|
93
|
+
*/ offset(delta: number): Linea2;
|
|
94
|
+
/**
|
|
95
|
+
* Calcola l'angolo tra questa linea e un'altra
|
|
96
|
+
* @param {Linea2} line2 - Seconda linea
|
|
97
|
+
* @returns {number} Angolo in radianti
|
|
98
|
+
*/ angolo(line2: Linea2): number;
|
|
99
|
+
ortopt(l: any): {
|
|
100
|
+
x: any;
|
|
101
|
+
y: any;
|
|
102
|
+
};
|
|
103
|
+
offsetline(l: any): Linea2;
|
|
104
|
+
/**
|
|
105
|
+
* Calcola la distanza tra due segmenti paralleli
|
|
106
|
+
* @param {Linea2} line2 - Seconda linea
|
|
107
|
+
* @returns {number} Distanza tra i segmenti o 1e9 se non paralleli
|
|
108
|
+
*/ distanzaSegmentiParalleli(line2: Linea2): number;
|
|
109
|
+
/**
|
|
110
|
+
* Verifica se due linee sono collineari
|
|
111
|
+
* @param {Linea2} line2 - Seconda linea
|
|
112
|
+
* @param {boolean} [checkpunticomune=false] - Se true verifica anche la sovrapposizione
|
|
113
|
+
* @returns {boolean} True se collineari
|
|
114
|
+
*/ isCollineare(line2: Linea2, checkpunticomune?: boolean): boolean;
|
|
115
|
+
}
|
|
116
|
+
export class Matrix3D {
|
|
117
|
+
m: Float32Array;
|
|
118
|
+
st: any[];
|
|
119
|
+
init(): this;
|
|
120
|
+
atranslate(x: any, y: any, z: any): this;
|
|
121
|
+
translate(x: any, y: any, z: any): this;
|
|
122
|
+
rotateX(angolo: any): this;
|
|
123
|
+
rotateY(angolo: any): this;
|
|
124
|
+
rotateZ(angolo: any): this;
|
|
125
|
+
getdati(): number[];
|
|
126
|
+
setdati(d: any): this;
|
|
127
|
+
push(): this;
|
|
128
|
+
pop(): this;
|
|
129
|
+
transform(x: any, y: any, z?: number): {
|
|
130
|
+
x: number;
|
|
131
|
+
y: number;
|
|
132
|
+
z: number;
|
|
133
|
+
};
|
|
134
|
+
invert(): Matrix3D;
|
|
135
|
+
determinant(): number;
|
|
136
|
+
multiply(matrix: any): this;
|
|
137
|
+
}
|
|
138
|
+
export const PIF: number;
|
|
139
|
+
/** Tolleranza utilizzata per i confronti numerici */
|
|
140
|
+
/**
|
|
141
|
+
* Classe che rappresenta un punto 2D con coordinate x,y
|
|
142
|
+
* @class
|
|
143
|
+
*/
|
|
144
|
+
export class Punto2 {
|
|
145
|
+
/**
|
|
146
|
+
* Crea un nuovo punto 2D
|
|
147
|
+
* @param {number|Array|Object} x - Coordinata x, array [x,y] o oggetto {x,y}
|
|
148
|
+
* @param {number} [y] - Coordinata y se x è un numero
|
|
149
|
+
*/
|
|
150
|
+
constructor(x: number | any[] | any, y?: number);
|
|
151
|
+
x: any;
|
|
152
|
+
y: any;
|
|
153
|
+
/**
|
|
154
|
+
* Restituisce una rappresentazione testuale del punto
|
|
155
|
+
* @returns {string} Stringa nel formato {x,y}
|
|
156
|
+
*/ get dump(): string;
|
|
157
|
+
/**
|
|
158
|
+
* Calcola il quadrato della lunghezza del vettore dal punto all'origine
|
|
159
|
+
* @returns {number} Lunghezza al quadrato
|
|
160
|
+
*/ get len2(): number;
|
|
161
|
+
/**
|
|
162
|
+
* Calcola la lunghezza del vettore dal punto all'origine
|
|
163
|
+
* @returns {number} Lunghezza del vettore
|
|
164
|
+
*/ get len(): number;
|
|
165
|
+
/**
|
|
166
|
+
* Calcola l'angolo del vettore rispetto all'asse x
|
|
167
|
+
* @returns {number} Angolo in radianti
|
|
168
|
+
*/ get angle(): number;
|
|
169
|
+
/**
|
|
170
|
+
* Restituisce il vettore normalizzato (lunghezza unitaria)
|
|
171
|
+
* @returns {Punto2} Nuovo punto con le coordinate normalizzate
|
|
172
|
+
*/ dir(): Punto2;
|
|
173
|
+
}
|
|
174
|
+
declare var splitter: Readonly<{
|
|
175
|
+
__proto__: any;
|
|
176
|
+
addhoriz: (ff: any, tipodim: any, dim: any, sps: any, des: any, align: any, cuts: any) => void;
|
|
177
|
+
addvert: (ff: any, tipodim: any, dim: any, sps: any, des: any, align: any, cuts: any) => void;
|
|
178
|
+
bordi: typeof bordi;
|
|
179
|
+
calcoladivisioni: (ff: any, shape: any, shape2: any) => any;
|
|
180
|
+
creabordi: typeof creabordi;
|
|
181
|
+
create: (x: any, y: any, bordo: any, options: any) => {
|
|
182
|
+
x: any;
|
|
183
|
+
y: any;
|
|
184
|
+
bordo: any;
|
|
185
|
+
minvano: any;
|
|
186
|
+
priority: any;
|
|
187
|
+
taglio: any;
|
|
188
|
+
tipo: any;
|
|
189
|
+
h1: any;
|
|
190
|
+
h2: any;
|
|
191
|
+
l1: any;
|
|
192
|
+
l2: any;
|
|
193
|
+
vert: any[];
|
|
194
|
+
horiz: any[];
|
|
195
|
+
dati: any[];
|
|
196
|
+
countid: number;
|
|
197
|
+
};
|
|
198
|
+
findid: (ff: any, id: any) => {
|
|
199
|
+
f: any;
|
|
200
|
+
};
|
|
201
|
+
generatesegments: typeof generatesegments;
|
|
202
|
+
internalshape: typeof internalshape;
|
|
203
|
+
makeshape: (ff: any) => {
|
|
204
|
+
shape: any;
|
|
205
|
+
internalshape: any;
|
|
206
|
+
};
|
|
207
|
+
priorita: {
|
|
208
|
+
v: string;
|
|
209
|
+
h: string;
|
|
210
|
+
};
|
|
211
|
+
pushlineare: typeof pushlineare;
|
|
212
|
+
pushshape: typeof pushshape;
|
|
213
|
+
tagli: {
|
|
214
|
+
d: string;
|
|
215
|
+
v: string;
|
|
216
|
+
h: string;
|
|
217
|
+
};
|
|
218
|
+
tipi: {
|
|
219
|
+
i: string;
|
|
220
|
+
a: string;
|
|
221
|
+
d: string;
|
|
222
|
+
s: string;
|
|
223
|
+
x: string;
|
|
224
|
+
};
|
|
225
|
+
tipoalign: {
|
|
226
|
+
l: string;
|
|
227
|
+
c: string;
|
|
228
|
+
r: string;
|
|
229
|
+
};
|
|
230
|
+
tipocut: {
|
|
231
|
+
d: string;
|
|
232
|
+
"d-": string;
|
|
233
|
+
p: string;
|
|
234
|
+
"p-": string;
|
|
235
|
+
};
|
|
236
|
+
}>;
|
|
237
|
+
export class Vis2d {
|
|
238
|
+
constructor(name: any, p1: any, p2: any);
|
|
239
|
+
name: any;
|
|
240
|
+
clear(p1: any, p2: any): this;
|
|
241
|
+
vec: any[];
|
|
242
|
+
xp1: any;
|
|
243
|
+
xp2: any;
|
|
244
|
+
randomcolor(transp?: string): string;
|
|
245
|
+
addpoint(p: any, id?: number, color?: any, spessore?: number): this;
|
|
246
|
+
addline(l: any, id?: number, color?: any, spessore?: number): this;
|
|
247
|
+
addrect(l: any, id?: number, color?: any, spessore?: number): this;
|
|
248
|
+
addrecta(l: any, id?: number, color?: any): this;
|
|
249
|
+
addshape(s: any, color?: any, spessore?: number): this;
|
|
250
|
+
addshapelin(s: any, color?: any, spessore?: number): this;
|
|
251
|
+
addarea(s: any, color?: any): this;
|
|
252
|
+
addoffset(x: any, y: any): this;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Calcola l'angolo tra due vettori in gradi.
|
|
256
|
+
* @param {Object} v1 - Primo vettore {x,y}
|
|
257
|
+
* @param {Object} v2 - Secondo vettore {x,y}
|
|
258
|
+
* @returns {number} Angolo in gradi
|
|
259
|
+
*/ export function angle2vec(v1: any, v2: any): number;
|
|
260
|
+
/**
|
|
261
|
+
* Calcola l'angolo tra tre punti in radianti.
|
|
262
|
+
* @param {Object} p1 - Primo punto {x,y}
|
|
263
|
+
* @param {Object} p2 - Punto centrale {x,y}
|
|
264
|
+
* @param {Object} p3 - Terzo punto {x,y}
|
|
265
|
+
* @returns {number} Angolo in radianti
|
|
266
|
+
*/ export function angle3point(p1: any, p2: any, p3: any): number;
|
|
267
|
+
/**
|
|
268
|
+
* Classe per la gestione degli errori con funzionalità di accumulo e formattazione
|
|
269
|
+
*/ export function clamp(n: any, min?: number, max?: number): any;
|
|
270
|
+
export function clean(k: any, locase?: boolean): any;
|
|
271
|
+
export function getdumpmacro(nodo: any): string;
|
|
272
|
+
export function getnodebyid(id: any, nodocorrente: any): any;
|
|
273
|
+
export function getprojectkeys(project: any): any;
|
|
274
|
+
/**
|
|
275
|
+
* Calcola i punti di offset tra due percorsi
|
|
276
|
+
* Trova i punti del secondo percorso che corrispondono all'offset del primo
|
|
277
|
+
* @param {Array<{x:number,y:number}>} pt - Array di punti del primo percorso
|
|
278
|
+
* @param {Array<{x:number,y:number}>} pt2 - Array di punti del secondo percorso
|
|
279
|
+
* @param {number} delta - Distanza di offset
|
|
280
|
+
* @returns {Array<{x:number,y:number}>} Array di punti del percorso offset
|
|
281
|
+
*/ export function getptsoffset(pt: Array<{
|
|
282
|
+
x: number;
|
|
283
|
+
y: number;
|
|
284
|
+
}>, pt2: Array<{
|
|
285
|
+
x: number;
|
|
286
|
+
y: number;
|
|
287
|
+
}>, delta: number): Array<{
|
|
288
|
+
x: number;
|
|
289
|
+
y: number;
|
|
290
|
+
}>;
|
|
291
|
+
/**
|
|
292
|
+
* Calcola le normali e i valori UV per un percorso chiuso.
|
|
293
|
+
* @param {Array<Object>} path - Array di punti {x,y}
|
|
294
|
+
* @param {number} [c=0] - Coefficiente c per il calcolo di z
|
|
295
|
+
* @param {number} [a=0] - Coefficiente a per il calcolo di z
|
|
296
|
+
* @param {number} [b=0] - Coefficiente b per il calcolo di z
|
|
297
|
+
* @param {number} [anglemin=30] - Angolo minimo in gradi per la suddivisione dei punti
|
|
298
|
+
* @returns {Array<Object>} Array di punti con normali e coordinate UV
|
|
299
|
+
*/
|
|
300
|
+
/**
|
|
301
|
+
* Crea un oggetto shape per manipolare forme 2D
|
|
302
|
+
* @returns {Object} Oggetto con metodi per manipolare la forma
|
|
303
|
+
* @property {string} key - Hash univoco della forma
|
|
304
|
+
* @property {Array<{x:number,y:number}>} pt - Array dei punti della forma
|
|
305
|
+
* @property {Array<number>} vec - Array dei punti come vettore [x1,y1,x2,y2,...]
|
|
306
|
+
* @property {number} orient - Orientamento della forma (1 orario, -1 antiorario, 0 degenere)
|
|
307
|
+
* @method clone() - Crea una copia della forma
|
|
308
|
+
* @method rotate(deg) - Ruota la forma di deg gradi
|
|
309
|
+
* @method move(x,y) - Sposta la forma di x,y
|
|
310
|
+
* @method fromclip(vv) - Inizializza da punti in formato clipper
|
|
311
|
+
* @method fromvec(aa) - Inizializza da array di coordinate [x1,y1,x2,y2,...]
|
|
312
|
+
* @method frompt(pts) - Inizializza da array di punti [{x,y},...]
|
|
313
|
+
* @method fromstr(str) - Inizializza da stringa con sintassi speciale
|
|
314
|
+
* @method addpt(pts) - Aggiunge punti alla forma
|
|
315
|
+
* @method addracc(v1,v2,suddivisioni,addv1v2) - Aggiunge raccordo tra punti
|
|
316
|
+
* @method setorient(mode) - Imposta l'orientamento della forma
|
|
317
|
+
* @method reverse() - Inverte l'ordine dei punti
|
|
318
|
+
* @method pointinshape(p) - Verifica se un punto è interno alla forma
|
|
319
|
+
* @method azzera() - Rimuove tutti i punti
|
|
320
|
+
* @method removeduplicate(delta) - Rimuove punti duplicati
|
|
321
|
+
* @method to3d(u0,c,a,b) - Converte in forma 3D con normali
|
|
322
|
+
*/
|
|
323
|
+
export function getshape(): any;
|
|
324
|
+
export function getsubrules(nodocorrente: any): ({
|
|
325
|
+
id: string;
|
|
326
|
+
level: number;
|
|
327
|
+
name: string;
|
|
328
|
+
des?: undefined;
|
|
329
|
+
spec?: undefined;
|
|
330
|
+
} | {
|
|
331
|
+
id: any;
|
|
332
|
+
name: any;
|
|
333
|
+
des: any;
|
|
334
|
+
spec: number;
|
|
335
|
+
level: number;
|
|
336
|
+
})[];
|
|
337
|
+
/**
|
|
338
|
+
* Esegue una semplice somma sincrona di due numeri
|
|
339
|
+
* @param {number} a - Primo numero da sommare
|
|
340
|
+
* @param {number} b - Secondo numero da sommare
|
|
341
|
+
* @returns {number} La somma dei due numeri
|
|
342
|
+
*/ export function hash(obj: any): number;
|
|
343
|
+
export function isfn(row: any): boolean;
|
|
344
|
+
export function ismacro(row: any): any;
|
|
345
|
+
/**
|
|
346
|
+
* Calcola il vettore normale unitario di un segmento di linea.
|
|
347
|
+
* @param {Object} p1 - Punto iniziale {x,y}
|
|
348
|
+
* @param {Object} p2 - Punto finale {x,y}
|
|
349
|
+
* @returns {Object} Vettore normale unitario {nx,ny}
|
|
350
|
+
*/ export function normal2(p1: any, p2: any): any;
|
|
351
|
+
/**
|
|
352
|
+
* Crea una curva di Bézier quadratica tra due segmenti di linea.
|
|
353
|
+
* @param {Object} a1 - Punto iniziale del primo segmento {x,y}
|
|
354
|
+
* @param {Object} a2 - Punto finale del primo segmento {x,y}
|
|
355
|
+
* @param {Object} b1 - Punto iniziale del secondo segmento {x,y}
|
|
356
|
+
* @param {Object} b2 - Punto finale del secondo segmento {x,y}
|
|
357
|
+
* @param {number} [subdivisions=10] - Numero di suddivisioni della curva
|
|
358
|
+
* @returns {Array<Object>} Array di punti {x,y} che formano la curva
|
|
359
|
+
*/
|
|
360
|
+
export function raccordabezier(a1: any, a2: any, b1: any, b2: any, subdivisions?: number): Array<any>;
|
|
361
|
+
/**
|
|
362
|
+
* Crea un oggetto per operazioni booleane e manipolazione di forme 2D usando la libreria Clipper
|
|
363
|
+
* @returns {Object} Oggetto con metodi per operazioni su forme
|
|
364
|
+
* @property {Function} offset - Crea un offset della forma
|
|
365
|
+
* @property {Function} inflate - Espande o contrae una forma
|
|
366
|
+
* @property {Function} unisci - Unisce più forme con gestione di fori e tagli
|
|
367
|
+
*/
|
|
368
|
+
export function shapeclip(): any;
|
|
369
|
+
export function valutagrafica(amb: any, startmacro: any, rulespec: any, progetto: any, fnreload: any): Promise<{
|
|
370
|
+
oo: any;
|
|
371
|
+
vari: any;
|
|
372
|
+
fnlist: any[];
|
|
373
|
+
}>;
|
|
374
|
+
declare function bordi(ff: any): {
|
|
375
|
+
bt: any;
|
|
376
|
+
bb: any;
|
|
377
|
+
bl: any;
|
|
378
|
+
br: any;
|
|
379
|
+
};
|
|
380
|
+
declare function creabordi(ff: any, shape: any, shape2: any): {
|
|
381
|
+
pt: any;
|
|
382
|
+
type: string;
|
|
383
|
+
}[];
|
|
384
|
+
/**
|
|
385
|
+
* Genera segmenti basati su intervalli e punti di interruzione
|
|
386
|
+
* @param {Array<{a: number, b: number}>} t1 - Array di oggetti che rappresentano intervalli con coordinate a e b
|
|
387
|
+
* @param {Array<number>} [t2] - Array opzionale di punti di interruzione
|
|
388
|
+
* @param {boolean} [interna=false] - Se true, usa i bordi interni degli intervalli
|
|
389
|
+
* @param {boolean} [allbreak=false] - Se true, considera ogni punto degli intervalli come una rottura
|
|
390
|
+
* @returns {Array<{a: number, b: number}>} Array di segmenti generati
|
|
391
|
+
*/ declare function generatesegments(t1: Array<{
|
|
392
|
+
a: number;
|
|
393
|
+
b: number;
|
|
394
|
+
}>, t2?: Array<number>, interna?: boolean, allbreak?: boolean): Array<{
|
|
395
|
+
a: number;
|
|
396
|
+
b: number;
|
|
397
|
+
}>;
|
|
398
|
+
declare function internalshape(ff: any, shape: any): any;
|
|
399
|
+
declare function pushlineare(ff: any, type: any, des: any, l0: any, l1: any, id: number, shapecontorno: any, areas: any): {
|
|
400
|
+
id: number;
|
|
401
|
+
type: any;
|
|
402
|
+
des: any;
|
|
403
|
+
shape: any;
|
|
404
|
+
info: any;
|
|
405
|
+
};
|
|
406
|
+
declare function pushshape(ff: any, type: any, des: any, shape: any, info: any, id?: number): {
|
|
407
|
+
id: number;
|
|
408
|
+
type: any;
|
|
409
|
+
des: any;
|
|
410
|
+
shape: any;
|
|
411
|
+
info: any;
|
|
412
|
+
};
|
|
413
|
+
export { splitter as SP };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
export const SIDE: any;
|
|
2
|
+
/**
|
|
3
|
+
* Aggiunge un pivot a un oggetto 3D esistente, mantenendone posizione e orientamento globale.
|
|
4
|
+
* @param {THREE.Object3D} grp - Oggetto esistente già posizionato nella scena.
|
|
5
|
+
* @param {THREE.Vector3} pivotLocal - Punto (locale) attorno a cui ruotare (es: -x/2, -y/2, 0).
|
|
6
|
+
* @param {Object} movimento - Istanza della classe MovimentoBase o derivata.
|
|
7
|
+
* @returns {THREE.Group} - Nuovo gruppo contenitore con pivot.
|
|
8
|
+
*/
|
|
9
|
+
export function addmovpivot(gcad: any, grp: THREE.Object3D, movimento: any, op?: {}, x?: number, y?: number, z?: number): THREE.Group;
|
|
10
|
+
export function creategroup(name: any): any;
|
|
11
|
+
export function deletegroup(grpbase: any, name: any): void;
|
|
12
|
+
export function edgesfromgeometry(g1: any, layer?: number): any;
|
|
13
|
+
/**
|
|
14
|
+
* Crea una geometria estrusa con opzioni avanzate
|
|
15
|
+
* @param {string} orient - Orientamento dell'estrusione
|
|
16
|
+
* @param {number} hshape - Altezza dell'estrusione
|
|
17
|
+
* @param {Object} shape - Forma base
|
|
18
|
+
* @param {Array} holes - Array di fori
|
|
19
|
+
* @param {Array} mats - Array di materiali
|
|
20
|
+
* @param {Object} options - Opzioni di configurazione
|
|
21
|
+
* @returns {THREE.Group} Gruppo contenente la geometria estrusa
|
|
22
|
+
*/ export function estruso(gcad: any, orient: string, hshape: number, shape: any, holes: any[], mats: any[], options: any): THREE.Group;
|
|
23
|
+
/**
|
|
24
|
+
* Crea una geometria estrusa con opzioni avanzate
|
|
25
|
+
* @param {string} orient - Orientamento dell'estrusione
|
|
26
|
+
* @param {number} hshape - Altezza dell'estrusione
|
|
27
|
+
* @param {Object} shape - Forma base
|
|
28
|
+
* @param {Array} holes - Array di fori
|
|
29
|
+
* @param {Array} mats - Array di materiali
|
|
30
|
+
* @param {Object} options - Opzioni di configurazione
|
|
31
|
+
* @returns {THREE.Group} Gruppo contenente la geometria estrusa
|
|
32
|
+
*/ export function estrusopat(gcad: any, orient: string, pat: any, shape: any, mats: any[], options: any): THREE.Group;
|
|
33
|
+
export function get3dshape(punti: any, material: any, layer: any): any;
|
|
34
|
+
export function getbox(gcad: any, x: any, y: any, z: any, mat: any, options: any): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Crea un cilindro 3D con orientamento personalizzabile
|
|
37
|
+
* @param {string} ori - Orientamento (X/L, Y/A, Z/P)
|
|
38
|
+
* @param {number} h - Altezza
|
|
39
|
+
* @param {number} r1 - Raggio base
|
|
40
|
+
* @param {number} r2 - Raggio top
|
|
41
|
+
* @param {THREE.Material|Array} mats - Materiale/i da applicare
|
|
42
|
+
* @param {Object} options - Opzioni di configurazione
|
|
43
|
+
* @returns {Promise<THREE.Group>} Gruppo contenente il cilindro
|
|
44
|
+
*/
|
|
45
|
+
export function getcilindro(gcad: any, ori: string, h: number, r1: number, r2: number, mats: THREE.Material | any[], options: any): Promise<THREE.Group>;
|
|
46
|
+
/**
|
|
47
|
+
* Crea un box 3D con linee di bordo opzionali
|
|
48
|
+
* @param {number} x - Larghezza
|
|
49
|
+
* @param {number} y - Altezza
|
|
50
|
+
* @param {number} z - Profondità
|
|
51
|
+
* @param {THREE.Material} mat - Materiale da applicare
|
|
52
|
+
* @param {Object} options - Opzioni di configurazione
|
|
53
|
+
* @returns {Promise<THREE.Group>} Gruppo contenente il box
|
|
54
|
+
*/ export function getface(gcad: any, x: number, y: number, mat: THREE.Material, scaled?: boolean): Promise<THREE.Group>;
|
|
55
|
+
/**
|
|
56
|
+
* Crea una linea 3D
|
|
57
|
+
* @param {Object} l - Oggetto contenente punti p1 e p2
|
|
58
|
+
* @param {string} id - Identificatore
|
|
59
|
+
* @param {THREE.Material} [mat=null] - Materiale da applicare
|
|
60
|
+
* @returns {THREE.Line} Linea 3D
|
|
61
|
+
*/ export function getline(l: any, id: string, mat?: THREE.Material): THREE.Line;
|
|
62
|
+
export function getlinesgeom(edges: any, layer?: number): any;
|
|
63
|
+
export function getmesh(geom: any, material: any, layer?: number, clone?: boolean): any;
|
|
64
|
+
/**
|
|
65
|
+
* Crea un gestore di movimento per animare oggetti 3D.
|
|
66
|
+
* @param {string} key - Chiave identificativa del movimento
|
|
67
|
+
* @param {Array<Object>} gtimeline - Timeline di passi di animazione. Ogni passo può contenere:
|
|
68
|
+
* @param {number} time - Durata del passo in millisecondi
|
|
69
|
+
* @param {(number|function)} [x] - Traslazione X (unità o funzione che restituisce unità)
|
|
70
|
+
* @param {(number|function)} [y] - Traslazione Y
|
|
71
|
+
* @param {(number|function)} [z] - Traslazione Z
|
|
72
|
+
* @param {(number|function)} [s] - Scala uniforme (moltiplicatore)
|
|
73
|
+
* @param {(number|function)} [sx] - Scala X
|
|
74
|
+
* @param {(number|function)} [sy] - Scala Y
|
|
75
|
+
* @param {(number|function)} [sz] - Scala Z
|
|
76
|
+
* @param {(number|function)} [ax] - Rotazione X (in giri)
|
|
77
|
+
* @param {(number|function)} [ay] - Rotazione Y
|
|
78
|
+
* @param {(number|function)} [az] - Rotazione Z
|
|
79
|
+
* @param {(number|function)} [t] - Trasparenza (0-1)
|
|
80
|
+
* @returns {Object} Oggetto gestore del movimento con metodi:
|
|
81
|
+
* @property {number} tline - Durata totale della timeline
|
|
82
|
+
* @property {function} clear - Pulisce la timeline
|
|
83
|
+
* @property {function} add - Aggiunge un passo alla timeline
|
|
84
|
+
* @property {string} key - Chiave del movimento
|
|
85
|
+
* @property {function} step - Esegue un passo dell'animazione
|
|
86
|
+
* @property {function} reset - Resetta l'oggetto alla posizione iniziale
|
|
87
|
+
*/ export function getmovimento(key: string, gtimeline?: Array<any>): any;
|
|
88
|
+
export function getpannello(gcad: any, orientamento: any, x: any, y: any, z: any, mat1: any, mat2: any, options: any): Promise<any>;
|
|
89
|
+
/**
|
|
90
|
+
* Crea un punto 3D rappresentato da una sfera
|
|
91
|
+
* @param {Object} p - Coordinate del punto
|
|
92
|
+
* @param {string} id - Identificatore
|
|
93
|
+
* @param {THREE.Material} [mat=null] - Materiale da applicare
|
|
94
|
+
* @param {number} [size=5] - Dimensione della sfera
|
|
95
|
+
* @returns {THREE.Mesh} Punto 3D
|
|
96
|
+
*/ export function getpoint(p: any, id: string, mat?: THREE.Material, size?: number): THREE.Mesh;
|
|
97
|
+
export function getpunto(gcad: any, x: any, y: any, z: any, color: string, options: any): Promise<any>;
|
|
98
|
+
/**
|
|
99
|
+
* Crea una quota tra due punti in 3D sul piano XY
|
|
100
|
+
* @param {string} testo - Testo da visualizzare nella quota
|
|
101
|
+
* @param {number} x1 - Coordinata X del primo punto
|
|
102
|
+
* @param {number} y1 - Coordinata Y del primo punto
|
|
103
|
+
* @param {number} x2 - Coordinata X del secondo punto
|
|
104
|
+
* @param {number} y2 - Coordinata Y del secondo punto
|
|
105
|
+
* @param {number} sizetesto - Dimensione del testo
|
|
106
|
+
* @param {Object} options - Opzioni aggiuntive
|
|
107
|
+
* @returns {THREE.Group} Gruppo contenente la quota
|
|
108
|
+
*/ export function getquota(gcad: any, testo: string, x1: number, y1: number, x2: number, y2: number, altezza?: number, offset?: number, options?: any): THREE.Group;
|
|
109
|
+
/**
|
|
110
|
+
* Crea un punto di riferimento invisibile nell'albero 3D
|
|
111
|
+
* @param {number} x - Coordinata X
|
|
112
|
+
* @param {number} y - Coordinata Y
|
|
113
|
+
* @param {number} z - Coordinata Z
|
|
114
|
+
* @param {Object} dati - Dati da archiviare nell'oggetto
|
|
115
|
+
* @param {string} [id=null] - Identificatore opzionale
|
|
116
|
+
* @returns {THREE.Object3D} Oggetto di riferimento invisibile
|
|
117
|
+
*/
|
|
118
|
+
export function getriferimento(dati: any, x?: number, y?: number, z?: number, id?: string): THREE.Object3D;
|
|
119
|
+
export function getsprite(gcad: any, x: any, y: any, z: any, mat: any, options?: {}): Promise<any>;
|
|
120
|
+
/**
|
|
121
|
+
* Crea una targhetta rettangolare con testo
|
|
122
|
+
* @param {Array|string} testo - Array di oggetti {testo, size, colore} o stringa
|
|
123
|
+
* @param {number} dim - Larghezza/altezza della targhetta
|
|
124
|
+
* @param {Object} options - Opzioni aggiuntive
|
|
125
|
+
* @returns {THREE.Mesh} Mesh con la targhetta
|
|
126
|
+
*/ export function gettarghetta(gcad: any, testo: any[] | string, dim?: number, options?: any): THREE.Mesh;
|
|
127
|
+
export function groupfromgeometry(geometry: any, material: any, x: any, y: any, z: any, name: any, layer: any): any;
|
|
128
|
+
export function infoestrudi(shape: any, hshape: any, pts: any, options: any): {
|
|
129
|
+
aini: any;
|
|
130
|
+
aini2: any;
|
|
131
|
+
afin: any;
|
|
132
|
+
afin2: any;
|
|
133
|
+
pts: any;
|
|
134
|
+
mi: any;
|
|
135
|
+
ma: any;
|
|
136
|
+
rect: {
|
|
137
|
+
x: any;
|
|
138
|
+
y: any;
|
|
139
|
+
}[];
|
|
140
|
+
dimx: number;
|
|
141
|
+
dimy: number;
|
|
142
|
+
lnom: number;
|
|
143
|
+
lmax: number;
|
|
144
|
+
lmin: number;
|
|
145
|
+
lmed: number;
|
|
146
|
+
};
|
|
147
|
+
export let materialline1: any;
|
|
148
|
+
export let materialline2: any;
|
|
149
|
+
export const mblack: any;
|
|
150
|
+
export const mblue: any;
|
|
151
|
+
export const mgray1: any;
|
|
152
|
+
export const mgray2: any;
|
|
153
|
+
export const mgreen: any;
|
|
154
|
+
export const mred: any;
|
|
155
|
+
declare const mwhite$1: any;
|
|
156
|
+
export function posiziona(grp: any, pos?: {}): any;
|
|
157
|
+
export function randombasemat(): any;
|
|
158
|
+
export function revolve(gcad: any, shape: any, orient: any, mat: any, options: any): any;
|
|
159
|
+
export const scaleunit: 0.001;
|
|
160
|
+
export function spritemat(gcad: any, file: any): Promise<any>;
|
|
161
|
+
export function svuotanodo(n: any): void;
|
|
162
|
+
export { mwhite$1 as mwhite };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export class Render {
|
|
2
|
+
constructor(baseurl: any, easy: any, callback: any);
|
|
3
|
+
baseurl: any;
|
|
4
|
+
easy: any;
|
|
5
|
+
callback: any;
|
|
6
|
+
code(code: any, lang: any, codes: any): string;
|
|
7
|
+
blockquote(quote: any): any;
|
|
8
|
+
html(html: any): any;
|
|
9
|
+
heading(text: any, level: any, raw: any): string;
|
|
10
|
+
hr(): "" | "<div class=\"my-4\"><hr/></div>";
|
|
11
|
+
list(body: any, ordered: any): string;
|
|
12
|
+
listtitle(body: any): string;
|
|
13
|
+
listitem(text: any, num: any): string;
|
|
14
|
+
paragraph(text: any): any;
|
|
15
|
+
table(header: any, body: any): string;
|
|
16
|
+
tablerow(content: any): string;
|
|
17
|
+
tablecell(content: any, header: any, align: any): string;
|
|
18
|
+
colorbase(text: any): string;
|
|
19
|
+
formula(text: any, full?: boolean): string;
|
|
20
|
+
coloralt(text: any): string;
|
|
21
|
+
strong(text: any): string;
|
|
22
|
+
ico(text: any): string;
|
|
23
|
+
em(text: any): string;
|
|
24
|
+
codespan(text: any): string;
|
|
25
|
+
br(): string;
|
|
26
|
+
del(text: any): string;
|
|
27
|
+
link(href: any, title: any, text: any): string;
|
|
28
|
+
image(href: any, title: any, text: any): string;
|
|
29
|
+
text(text: any): any;
|
|
30
|
+
}
|
|
31
|
+
export const aliasInfo: {
|
|
32
|
+
alias: any;
|
|
33
|
+
check(): void;
|
|
34
|
+
retoalias: {};
|
|
35
|
+
regex: Set<any>;
|
|
36
|
+
add(sigla: any, valore: any): any;
|
|
37
|
+
removeAll(): any;
|
|
38
|
+
setmappa(mappa: any): void;
|
|
39
|
+
parse(data: any, info: any, mappa: any): {
|
|
40
|
+
comments: any[];
|
|
41
|
+
info: boolean;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export function elang(str: any, lang: any, punct: any, codes: any): string;
|
|
45
|
+
export function escapeHTML(str: any): any;
|
|
46
|
+
export function formatrule(code: any): string;
|
|
47
|
+
export function formatvariante(str: any): string;
|
|
48
|
+
export function mark(xx: any, baseurl: any, notitle: boolean, parsedlist: boolean, callback: any): any;
|
|
49
|
+
export function markeasy(xx: any, maxlen?: number, notitle?: boolean): any;
|
|
50
|
+
export function markunoFormatCodeMirror(CodeMirror: any): void;
|
|
51
|
+
export function parseinfomd(data: any, info: any, mappa: any): {
|
|
52
|
+
comments: any[];
|
|
53
|
+
info: boolean;
|
|
54
|
+
};
|
|
55
|
+
export function parselist(text: any, title?: string): {
|
|
56
|
+
txt: string;
|
|
57
|
+
cards: {
|
|
58
|
+
title: any;
|
|
59
|
+
lev: any;
|
|
60
|
+
data: any;
|
|
61
|
+
}[];
|
|
62
|
+
tm: any[];
|
|
63
|
+
};
|
|
64
|
+
export function parserule(tt: any): any[];
|
|
65
|
+
export function parsetext(tt: any): any[];
|
|
66
|
+
declare function tokenparser(res: any, render: any, maxlen?: number): any;
|
|
67
|
+
export function parsevars(v: any, vars: any): any;
|
|
68
|
+
export function tokenize(src: any, easylen: any, noheader?: boolean): any;
|
|
69
|
+
export function unescapeHTML(str: any): any;
|
|
70
|
+
export { tokenparser as parsetokens };
|