mxcad 1.0.96 → 1.0.98
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/dist/mxcad.d.ts +189 -10
- package/dist/mxcad.es.js +2177 -1831
- package/dist/mxcad.umd.js +46 -46
- package/dist/wasm/2d/mxdrawassembly_min.js +924 -810
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +931 -816
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/package.json +2 -2
package/dist/mxcad.d.ts
CHANGED
|
@@ -652,6 +652,10 @@ export declare class MxCADResbuf extends McRxObject {
|
|
|
652
652
|
* @param lItem 数据项索引。
|
|
653
653
|
*/
|
|
654
654
|
Remove(lItem: number): void;
|
|
655
|
+
/**
|
|
656
|
+
* 调试输入信息
|
|
657
|
+
*/
|
|
658
|
+
PrintData(): void;
|
|
655
659
|
}
|
|
656
660
|
/**
|
|
657
661
|
* MxCADUtilityClass 类提供了一系列与绘图相关的工具方法
|
|
@@ -1094,6 +1098,36 @@ export declare class McDbEntity extends McDbObject {
|
|
|
1094
1098
|
maxPt: McGePoint3d;
|
|
1095
1099
|
ret: boolean;
|
|
1096
1100
|
};
|
|
1101
|
+
/**
|
|
1102
|
+
*得到对象的扩展数据
|
|
1103
|
+
*/
|
|
1104
|
+
GetxData(appName?: string): MxCADResbuf;
|
|
1105
|
+
/**
|
|
1106
|
+
*设置对象的扩展数据
|
|
1107
|
+
*/
|
|
1108
|
+
SetxData(xdata: MxCADResbuf): boolean;
|
|
1109
|
+
GetxDataString(appName: string): {
|
|
1110
|
+
val: string;
|
|
1111
|
+
ret: boolean;
|
|
1112
|
+
};
|
|
1113
|
+
SetxDataString(appName: string, val: string): boolean;
|
|
1114
|
+
GetxDataDouble(appName: string): {
|
|
1115
|
+
val: number;
|
|
1116
|
+
ret: boolean;
|
|
1117
|
+
};
|
|
1118
|
+
SetxDataDouble(appName: string, val: number): boolean;
|
|
1119
|
+
GetxDataLong(appName: string): {
|
|
1120
|
+
val: number;
|
|
1121
|
+
ret: boolean;
|
|
1122
|
+
};
|
|
1123
|
+
SetxDataLong(appName: string, val: number): boolean;
|
|
1124
|
+
GetxDataPoint(appName: string): {
|
|
1125
|
+
val: McGePoint3d;
|
|
1126
|
+
ret: boolean;
|
|
1127
|
+
};
|
|
1128
|
+
SetxDataPoint(appName: string, val: McGePoint3d): boolean;
|
|
1129
|
+
DeleteXData(appName: string): boolean;
|
|
1130
|
+
GetAllAppName(): McGeStringArray;
|
|
1097
1131
|
}
|
|
1098
1132
|
/**
|
|
1099
1133
|
* 表示数据库曲线。
|
|
@@ -2451,6 +2485,13 @@ export declare class McObject {
|
|
|
2451
2485
|
* @returns 是否成功设置变量值
|
|
2452
2486
|
*/
|
|
2453
2487
|
SetSysVarPoint(varName: string, pt: McGePoint3d): boolean;
|
|
2488
|
+
/**
|
|
2489
|
+
* 设置系统变量的2维点数值
|
|
2490
|
+
* @param varName 变量名称
|
|
2491
|
+
* @param val 变量的点数值
|
|
2492
|
+
* @returns 是否成功设置变量值
|
|
2493
|
+
*/
|
|
2494
|
+
SetSysVarPoint2d(varName: string, pt: McGePoint3d): boolean;
|
|
2454
2495
|
/**
|
|
2455
2496
|
* 设置系统变量的浮点数值
|
|
2456
2497
|
* @param varName 变量名称
|
|
@@ -3245,7 +3286,7 @@ export interface MxDraw3d extends WasmConfig {
|
|
|
3245
3286
|
* */
|
|
3246
3287
|
openFromUrl: (name: string, fileUrl: string) => void;
|
|
3247
3288
|
/** 加载贴图图片 */
|
|
3248
|
-
loadTextureImg: (fileUrl: string) => void;
|
|
3289
|
+
loadTextureImg: (fileUrl: string, fileName: string) => void;
|
|
3249
3290
|
/** 设置多维数据集贴图背景 */
|
|
3250
3291
|
setCubemapBackground(url: string): void;
|
|
3251
3292
|
/** 完成初始化 */
|
|
@@ -3277,7 +3318,7 @@ export interface MxDraw3d extends WasmConfig {
|
|
|
3277
3318
|
/** 表示一个点 */
|
|
3278
3319
|
MdGePoint: typeof MdGePoint;
|
|
3279
3320
|
/** 表示一个向量 */
|
|
3280
|
-
|
|
3321
|
+
MdGeVec: typeof MdGeVec;
|
|
3281
3322
|
/** 表示一个Wire形状 */
|
|
3282
3323
|
MdGeWire: typeof MdGeWire;
|
|
3283
3324
|
/** 表示一个Edge形状 */
|
|
@@ -3425,6 +3466,18 @@ export interface MxDraw3d extends WasmConfig {
|
|
|
3425
3466
|
MdGeColor: typeof MdGeColor;
|
|
3426
3467
|
/** 表示材质 */
|
|
3427
3468
|
MdGeMaterialAspect: typeof MdGeMaterialAspect;
|
|
3469
|
+
/** 表示形状序列集合 */
|
|
3470
|
+
MdGeSequenceOfShape: typeof MdGeSequenceOfShape;
|
|
3471
|
+
/** 表示形状序列集合迭代器 */
|
|
3472
|
+
MdGeSequenceIteratorOfSequenceOfShape: typeof MdGeSequenceIteratorOfSequenceOfShape;
|
|
3473
|
+
/** 表示合并Edges成Wires */
|
|
3474
|
+
MdGeMakeWires: typeof MdGeMakeWires;
|
|
3475
|
+
/** 表示Wire生成Face */
|
|
3476
|
+
MdGeMakeFace: typeof MdGeMakeFace;
|
|
3477
|
+
/** 表示三点圆弧 */
|
|
3478
|
+
MdGeMakeArcOfCircle: typeof MdGeMakeArcOfCircle;
|
|
3479
|
+
/** 表示光照 */
|
|
3480
|
+
MdGeLight: typeof MdGeLight;
|
|
3428
3481
|
}
|
|
3429
3482
|
/**
|
|
3430
3483
|
* 所有类的父类, 除去MdGeTopo以及MdGeBrep
|
|
@@ -3448,9 +3501,37 @@ export declare class MdGeShape extends MdGeObject {
|
|
|
3448
3501
|
Common(other: MdGeShape): MdGeShape;
|
|
3449
3502
|
Section(other: MdGeShape): MdGeShape;
|
|
3450
3503
|
ShapeType(): MdGe.MxShapeEnum;
|
|
3504
|
+
MirrorByPoint(theP: MdGePoint): void;
|
|
3505
|
+
MirroredByPoint(theP: MdGePoint): MdGeShape;
|
|
3506
|
+
MirrorByAxis(axis: MdGeAxis): void;
|
|
3507
|
+
MirroredByAxis(axis: MdGeAxis): MdGeShape;
|
|
3508
|
+
MirrorByCSYSR(csysr: MdGeCSYSR): void;
|
|
3509
|
+
MirroredByCSYSR(csysr: MdGeCSYSR): MdGeShape;
|
|
3510
|
+
Rotate(axis: MdGeAxis, ang: number): void;
|
|
3511
|
+
Rotated(axis: MdGeAxis, ang: number): MdGeShape;
|
|
3512
|
+
Scale(point: MdGePoint, s: number): void;
|
|
3513
|
+
Scaled(point: MdGePoint, s: number): MdGeShape;
|
|
3514
|
+
Transform(trsf: MdGeTrsf): void;
|
|
3515
|
+
Transformed(trsf: MdGeTrsf): MdGeShape;
|
|
3516
|
+
TranslateByVec(vec: MdGeVec): void;
|
|
3517
|
+
TranslatedByVec(vec: MdGeVec): MdGeShape;
|
|
3518
|
+
TranslateBy2Points(point1: MdGePoint, point2: MdGePoint): void;
|
|
3519
|
+
TranslatedBy2Points(point1: MdGePoint, point2: MdGePoint): MdGeShape;
|
|
3451
3520
|
SetTextureFileName(path: string): void;
|
|
3452
3521
|
SetMaterialAspect(material: MdGeMaterialAspect): void;
|
|
3453
3522
|
SetColor(color: MdGeColor): void;
|
|
3523
|
+
TextureRepeat(): boolean;
|
|
3524
|
+
URepeat(): number;
|
|
3525
|
+
VRepeat(): number;
|
|
3526
|
+
SetTextureRepeat(theToRepeat: boolean, theURepeat: number, theVRepeat: number): void;
|
|
3527
|
+
TextureScale(): boolean;
|
|
3528
|
+
TextureScaleU(): number;
|
|
3529
|
+
TextureScaleV(): number;
|
|
3530
|
+
SetTextureScale(theToSetTextureScale: boolean, theScaleU: number, theScaleV: number): void;
|
|
3531
|
+
TextureOrigin(): boolean;
|
|
3532
|
+
TextureUOrigin(): number;
|
|
3533
|
+
TextureVOrigin(): number;
|
|
3534
|
+
SetTextureOrigin(theToSetTextureOrigin: boolean, theUOrigin: number, theVOrigin: number): void;
|
|
3454
3535
|
IsNull(): boolean;
|
|
3455
3536
|
Draw(): void;
|
|
3456
3537
|
}
|
|
@@ -3459,7 +3540,6 @@ export declare class MdGeShape extends MdGeObject {
|
|
|
3459
3540
|
*/
|
|
3460
3541
|
export declare class MdGeVertex extends MdGeShape {
|
|
3461
3542
|
constructor(p1?: object | number, p2?: number, p3?: number);
|
|
3462
|
-
Draw(): void;
|
|
3463
3543
|
}
|
|
3464
3544
|
/**
|
|
3465
3545
|
* 表示一个Edge形状
|
|
@@ -3469,7 +3549,6 @@ export declare class MdGeEdge extends MdGeShape {
|
|
|
3469
3549
|
Wire(): MdGeWire;
|
|
3470
3550
|
AddedEdge(edge: MdGeEdge): MdGeWire;
|
|
3471
3551
|
AddedWire(wire: MdGeWire): MdGeWire;
|
|
3472
|
-
Draw(): void;
|
|
3473
3552
|
}
|
|
3474
3553
|
/**
|
|
3475
3554
|
* 表示一个Wire形状
|
|
@@ -3478,42 +3557,36 @@ export declare class MdGeWire extends MdGeShape {
|
|
|
3478
3557
|
constructor(p?: object);
|
|
3479
3558
|
AddedEdge(edge: MdGeEdge): MdGeWire;
|
|
3480
3559
|
AddedWire(wire: MdGeWire): MdGeWire;
|
|
3481
|
-
Draw(): void;
|
|
3482
3560
|
}
|
|
3483
3561
|
/**
|
|
3484
3562
|
* 表示一个Face形状
|
|
3485
3563
|
*/
|
|
3486
3564
|
export declare class MdGeFace extends MdGeShape {
|
|
3487
3565
|
constructor(p?: object);
|
|
3488
|
-
Draw(): void;
|
|
3489
3566
|
}
|
|
3490
3567
|
/**
|
|
3491
3568
|
* 表示一个Shell形状
|
|
3492
3569
|
*/
|
|
3493
3570
|
export declare class MdGeShell extends MdGeShape {
|
|
3494
3571
|
constructor(p?: object);
|
|
3495
|
-
Draw(): void;
|
|
3496
3572
|
}
|
|
3497
3573
|
/**
|
|
3498
3574
|
* 表示一个Solid形状
|
|
3499
3575
|
*/
|
|
3500
3576
|
export declare class MdGeSolid extends MdGeShape {
|
|
3501
3577
|
constructor(p?: object);
|
|
3502
|
-
Draw(): void;
|
|
3503
3578
|
}
|
|
3504
3579
|
/**
|
|
3505
3580
|
* 表示一个CompSolid形状
|
|
3506
3581
|
*/
|
|
3507
3582
|
export declare class MdGeCompSolid extends MdGeShape {
|
|
3508
3583
|
constructor(p?: object);
|
|
3509
|
-
Draw(): void;
|
|
3510
3584
|
}
|
|
3511
3585
|
/**
|
|
3512
3586
|
* 表示一个Compound形状
|
|
3513
3587
|
*/
|
|
3514
3588
|
export declare class MdGeCompound extends MdGeShape {
|
|
3515
3589
|
constructor(p?: object);
|
|
3516
|
-
Draw(): void;
|
|
3517
3590
|
}
|
|
3518
3591
|
/**
|
|
3519
3592
|
* 表示一个矩阵。
|
|
@@ -5032,6 +5105,12 @@ export declare namespace MdGe {
|
|
|
5032
5105
|
DM_WireFrame = 0,
|
|
5033
5106
|
DM_Shaded = 1
|
|
5034
5107
|
}
|
|
5108
|
+
enum MxTypeOfLightSource {
|
|
5109
|
+
LightSource_TOLS_AMBIENT = 0,
|
|
5110
|
+
LightSource_TOLS_DIRECTIONAL = 1,
|
|
5111
|
+
LightSource_TOLS_POSITIONAL = 2,
|
|
5112
|
+
LightSource_TOLS_SPOT = 3
|
|
5113
|
+
}
|
|
5035
5114
|
}
|
|
5036
5115
|
/**
|
|
5037
5116
|
* 表示拓扑元素遍历
|
|
@@ -5826,6 +5905,9 @@ export declare class MdGeBRep {
|
|
|
5826
5905
|
Pnt(V: MdGeVertex): MdGePoint;
|
|
5827
5906
|
Parameter(V: MdGeVertex, E: MdGeEdge, F?: MdGeFace): number;
|
|
5828
5907
|
MaxTolerance(theShape: MdGeShape, theSubShape: MdGe.MxShapeEnum): number;
|
|
5908
|
+
openBrepFromUrl(theModelPath: string): MdGeShape;
|
|
5909
|
+
RemoveAllLights(): void;
|
|
5910
|
+
AddLight(theLight: MdGeLight): void;
|
|
5829
5911
|
}
|
|
5830
5912
|
/**
|
|
5831
5913
|
* 表示颜色
|
|
@@ -5892,6 +5974,103 @@ export declare class MdGeMaterialAspect extends MdGeObject {
|
|
|
5892
5974
|
IsDifferent(theOther: MdGeMaterialAspect): boolean;
|
|
5893
5975
|
IsEqual(theOther: MdGeMaterialAspect): boolean;
|
|
5894
5976
|
}
|
|
5977
|
+
/**
|
|
5978
|
+
* 表示形状序列集合
|
|
5979
|
+
*/
|
|
5980
|
+
export declare class MdGeSequenceOfShape extends MdGeObject {
|
|
5981
|
+
constructor(p?: object);
|
|
5982
|
+
begin(): MdGeSequenceIteratorOfSequenceOfShape;
|
|
5983
|
+
end(): MdGeSequenceIteratorOfSequenceOfShape;
|
|
5984
|
+
Size(): number;
|
|
5985
|
+
Length(): number;
|
|
5986
|
+
Lower(): number;
|
|
5987
|
+
Upper(): number;
|
|
5988
|
+
IsEmpty(): boolean;
|
|
5989
|
+
Reverse(): void;
|
|
5990
|
+
Exchange(I: number, J: number): void;
|
|
5991
|
+
Remove(p1: number, p2?: number): void;
|
|
5992
|
+
Append(theShape: MdGeShape): void;
|
|
5993
|
+
Prepend(theShape: MdGeShape): void;
|
|
5994
|
+
InsertBefore(theIndex: number, theShape: MdGeShape): void;
|
|
5995
|
+
InsertAfter(theIndex: number, theShape: MdGeShape): void;
|
|
5996
|
+
First(): MdGeShape;
|
|
5997
|
+
Last(): MdGeShape;
|
|
5998
|
+
Value(theIndex: number): MdGeShape;
|
|
5999
|
+
SetValue(theIndex: number, theShape: MdGeShape): void;
|
|
6000
|
+
}
|
|
6001
|
+
/**
|
|
6002
|
+
* 表示形状序列迭代器
|
|
6003
|
+
*/
|
|
6004
|
+
export declare class MdGeSequenceIteratorOfSequenceOfShape extends MdGeObject {
|
|
6005
|
+
constructor(p?: object);
|
|
6006
|
+
More(): boolean;
|
|
6007
|
+
Next(): void;
|
|
6008
|
+
Value(): MdGeShape;
|
|
6009
|
+
IsEqual(theOther: MdGeSequenceIteratorOfSequenceOfShape): boolean;
|
|
6010
|
+
}
|
|
6011
|
+
/**
|
|
6012
|
+
* 表示由Edges链接形成Wires
|
|
6013
|
+
*/
|
|
6014
|
+
export declare class MdGeMakeWires extends MdGeObject {
|
|
6015
|
+
constructor(p?: object);
|
|
6016
|
+
ConnectEdgesToWires(edges: MdGeSequenceOfShape, toler: number, shared: boolean): MdGeSequenceOfShape;
|
|
6017
|
+
ConnectWiresToWires(iwires: MdGeSequenceOfShape, toler: number, shared: boolean): MdGeSequenceOfShape;
|
|
6018
|
+
}
|
|
6019
|
+
/**
|
|
6020
|
+
* 表示Wire生成Face
|
|
6021
|
+
*/
|
|
6022
|
+
export declare class MdGeMakeFace extends MdGeObject {
|
|
6023
|
+
constructor(p?: MdGeWire | object);
|
|
6024
|
+
Add(wire: MdGeWire): void;
|
|
6025
|
+
Face(): MdGeFace;
|
|
6026
|
+
}
|
|
6027
|
+
/**
|
|
6028
|
+
* 三点圆弧
|
|
6029
|
+
*/
|
|
6030
|
+
export declare class MdGeMakeArcOfCircle extends MdGeObject {
|
|
6031
|
+
constructor(p1: MdGePoint | object, p2?: MdGePoint, p3?: MdGePoint);
|
|
6032
|
+
Edge(): MdGeEdge;
|
|
6033
|
+
}
|
|
6034
|
+
/**
|
|
6035
|
+
* 光照
|
|
6036
|
+
*/
|
|
6037
|
+
export declare class MdGeLight extends MdGeObject {
|
|
6038
|
+
constructor(p: MdGe.MxTypeOfLightSource | object);
|
|
6039
|
+
CopyFrom(theLight: MdGeLight): void;
|
|
6040
|
+
Type(): MdGe.MxTypeOfLightSource;
|
|
6041
|
+
Name(): string;
|
|
6042
|
+
SetName(theName: string): void;
|
|
6043
|
+
Color(): MdGeColor;
|
|
6044
|
+
SetColor(theColor: MdGeColor): void;
|
|
6045
|
+
IsEnabled(): boolean;
|
|
6046
|
+
SetEnabled(theIsOn: boolean): void;
|
|
6047
|
+
ToCastShadows(): boolean;
|
|
6048
|
+
SetCastShadows(theToCast: boolean): void;
|
|
6049
|
+
IsHeadlight(): boolean;
|
|
6050
|
+
Headlight(): boolean;
|
|
6051
|
+
SetHeadlight(theValue: boolean): void;
|
|
6052
|
+
Position(): MdGePoint;
|
|
6053
|
+
SetPosition(p1: MdGePoint | number, p2?: number, p3?: number): void;
|
|
6054
|
+
ConstAttenuation(): number;
|
|
6055
|
+
LinearAttenuation(): number;
|
|
6056
|
+
SetAttenuation(theConstAttenuation: number, theLinearAttenuation: number): void;
|
|
6057
|
+
Direction(): MdGeDir;
|
|
6058
|
+
SetDirection(p1: MdGeDir | number, p2?: number, p3?: number): void;
|
|
6059
|
+
DisplayPosition(): MdGePoint;
|
|
6060
|
+
SetDisplayPosition(thePosition: MdGePoint): void;
|
|
6061
|
+
Angle(): number;
|
|
6062
|
+
SetAngle(theAngle: number): void;
|
|
6063
|
+
Concentration(): number;
|
|
6064
|
+
SetConcentration(theConcentration: number): void;
|
|
6065
|
+
Intensity(): number;
|
|
6066
|
+
SetIntensity(theValue: number): void;
|
|
6067
|
+
Smoothness(): number;
|
|
6068
|
+
SetSmoothRadius(theValue: number): void;
|
|
6069
|
+
SetSmoothAngle(theValue: number): void;
|
|
6070
|
+
HasRange(): boolean;
|
|
6071
|
+
Range(): number;
|
|
6072
|
+
SetRange(theValue: number): void;
|
|
6073
|
+
}
|
|
5895
6074
|
export declare function loadMxCADassembly3d(config: MxDraw3dConfig, call?: (mxDraw3d: MxDraw3d) => void): Promise<MxDraw3d>;
|
|
5896
6075
|
|
|
5897
6076
|
export {};
|