mxcad 1.0.163 → 1.0.165
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 +523 -24
- package/dist/mxcad.es.js +2686 -920
- package/dist/mxcad.umd.js +2 -2
- package/dist/wasm/2d/mxdrawassembly_min.js +1630 -1429
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +1611 -1411
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/dist/wasm/3d/mxdraw3d_min.js +1229 -28
- package/dist/wasm/3d/mxdraw3d_min.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -47,12 +47,13 @@ export declare class McRxObject {
|
|
|
47
47
|
/**
|
|
48
48
|
* 内部实现对象。
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
imp: any;
|
|
51
51
|
/**
|
|
52
52
|
* 构造函数。
|
|
53
53
|
* @param imp 内部实现对象。
|
|
54
54
|
*/
|
|
55
55
|
constructor(imp?: any);
|
|
56
|
+
protected constructor_MxCADResbuf(imp: any): void;
|
|
56
57
|
/**
|
|
57
58
|
* 获取内部实现对象。
|
|
58
59
|
* @returns 内部实现对象。
|
|
@@ -94,8 +95,11 @@ export declare class McRxObject {
|
|
|
94
95
|
* - kInvalid:无效对象。
|
|
95
96
|
*/
|
|
96
97
|
export declare enum McObjectIdType {
|
|
98
|
+
/** CAD 对象 */
|
|
97
99
|
kMxCAD = 0,
|
|
100
|
+
/** 绘图对象 */
|
|
98
101
|
kMxDraw = 1,
|
|
102
|
+
/** 无效对象 */
|
|
99
103
|
kInvalid = 2
|
|
100
104
|
}
|
|
101
105
|
/**
|
|
@@ -162,6 +166,8 @@ export declare class McObjectId {
|
|
|
162
166
|
* 返回MxCAD McDbDimension 对象。
|
|
163
167
|
*/
|
|
164
168
|
getMcDbDimension(): McDbDimension | null;
|
|
169
|
+
syncMcDbCustomEntity(): void;
|
|
170
|
+
getMcDbCustomEntity(): McDbCustomEntity | null;
|
|
165
171
|
clone(): McDbObject | null;
|
|
166
172
|
/**
|
|
167
173
|
* 返回id指向的对象名称.
|
|
@@ -172,6 +178,8 @@ export declare class McObjectId {
|
|
|
172
178
|
*/
|
|
173
179
|
getMxDbEntity(): MxDbEntity | null;
|
|
174
180
|
getMcDbRasterImageDef(): McDbRasterImageDef | null;
|
|
181
|
+
getMcDbDictionary(): McDbDictionary | null;
|
|
182
|
+
getMcDbXrecord(): McDbXrecord | null;
|
|
175
183
|
}
|
|
176
184
|
/**
|
|
177
185
|
* 表示一个数据库对象。
|
|
@@ -217,6 +225,11 @@ export declare class McDbObject extends McRxObject {
|
|
|
217
225
|
* 得到对象拥用者的id
|
|
218
226
|
*/
|
|
219
227
|
getOwnerID(): number;
|
|
228
|
+
getDatabaseIndexId(): number;
|
|
229
|
+
moveGripPointsAt(iIndex: number, dXOffset: number, dYOffset: number, dZOffset: number): any;
|
|
230
|
+
getGripPoints(): McGePoint3dArray;
|
|
231
|
+
tempRelationObject(): number;
|
|
232
|
+
freeTempRelationObject(): void;
|
|
220
233
|
}
|
|
221
234
|
export declare class McDbObjectArray {
|
|
222
235
|
aryVal: McDbObject[];
|
|
@@ -307,6 +320,7 @@ export declare class McGeVector3d {
|
|
|
307
320
|
* @param dZ Z 坐标。
|
|
308
321
|
*/
|
|
309
322
|
constructor(dX?: number | object, dY?: number, dZ?: number);
|
|
323
|
+
/** 转换为THREE.Vector3 */
|
|
310
324
|
toVector3(): THREE.Vector3;
|
|
311
325
|
/**
|
|
312
326
|
* 复制对象的值
|
|
@@ -317,18 +331,34 @@ export declare class McGeVector3d {
|
|
|
317
331
|
*/
|
|
318
332
|
clone(): McGeVector3d;
|
|
319
333
|
c(): McGeVector3d;
|
|
334
|
+
/** 旋转
|
|
335
|
+
* @param ang 旋转角度。
|
|
336
|
+
* @param axis 旋转轴向量
|
|
337
|
+
* */
|
|
320
338
|
rotateBy(ang: number, axis?: McGeVector3d): this;
|
|
339
|
+
/** 向量取反 */
|
|
321
340
|
negate(): this;
|
|
341
|
+
/** 垂直的向量 */
|
|
322
342
|
perpVector(): this;
|
|
343
|
+
/** 计算角度 */
|
|
323
344
|
angleTo1(vec: McGeVector3d): number;
|
|
345
|
+
/** 计算角度 */
|
|
324
346
|
angleTo2(vec: McGeVector3d, refVec: McGeVector3d): number;
|
|
347
|
+
/** 归一化操作 */
|
|
325
348
|
normalize(): this;
|
|
349
|
+
/** 向量长度 */
|
|
326
350
|
length(): number;
|
|
351
|
+
/** 是否为单位向量 */
|
|
327
352
|
isUnitLength(): boolean;
|
|
353
|
+
/** 是否为零向量 */
|
|
328
354
|
isZeroLength(): boolean;
|
|
355
|
+
/** 点积 */
|
|
329
356
|
dotProduct(vec: McGeVector3d): number;
|
|
357
|
+
/** 交叉积 */
|
|
330
358
|
crossProduct(vec: McGeVector3d): McGeVector3d;
|
|
359
|
+
/** 判断比较向量是否相等 */
|
|
331
360
|
isEqualTo(vec: McGeVector3d): boolean;
|
|
361
|
+
/** 向量与某个值相乘 */
|
|
332
362
|
mult(val: number): this;
|
|
333
363
|
/**
|
|
334
364
|
* X 坐标。
|
|
@@ -594,14 +624,23 @@ export declare class MdGeDoubleArray {
|
|
|
594
624
|
forEach(call: (val: number, index: number) => void): void;
|
|
595
625
|
}
|
|
596
626
|
export declare function getFilterImp(filter?: MxCADResbuf | null): any;
|
|
627
|
+
/*** AutoLISP 中 resbuf 结构中可能的数据类型 */
|
|
597
628
|
export declare enum MxCADResbufDataType {
|
|
629
|
+
/** 长整型 */
|
|
598
630
|
kLong = 1071,
|
|
631
|
+
/** 双精度浮点数 */
|
|
599
632
|
kDouble = 1040,
|
|
633
|
+
/** 字符串 */
|
|
600
634
|
kString = 1000,
|
|
635
|
+
/** 点坐标 */
|
|
601
636
|
kPoint = 1010,
|
|
637
|
+
/** 实体类型 */
|
|
602
638
|
kEntityType = 5020,
|
|
639
|
+
/** 实体ID */
|
|
603
640
|
kEntityId = -8000,
|
|
641
|
+
/** 实体 */
|
|
604
642
|
kEntity = -8500,
|
|
643
|
+
/** 扩展数据名称 */
|
|
605
644
|
kExDataName = 1001
|
|
606
645
|
}
|
|
607
646
|
/**
|
|
@@ -718,7 +757,21 @@ export declare class MxCADResbuf extends McRxObject {
|
|
|
718
757
|
*/
|
|
719
758
|
AddString(str: string, lDataType?: number, decodeFromGb2312?: boolean): number;
|
|
720
759
|
/**
|
|
721
|
-
*
|
|
760
|
+
* 添加实体类型,用于选择集过滤使用
|
|
761
|
+
* @param str 多个类型用,连接 例如: "TEXT,MTEXT"
|
|
762
|
+
* @description 实体的类型表
|
|
763
|
+
* | 类型 | 描述 |
|
|
764
|
+
* | ------- | ------- |
|
|
765
|
+
* | TEXT | 文字 |
|
|
766
|
+
* | MTEXT | 多行文字 |
|
|
767
|
+
* | CIRCLE | 圆 |
|
|
768
|
+
* | ARC | 圆弧 |
|
|
769
|
+
* | LINE | 线 |
|
|
770
|
+
* | LWPOLYLINE | 多段线 |
|
|
771
|
+
* | INSERT | 图块 |
|
|
772
|
+
* | ELLIPSE | 椭圆 |
|
|
773
|
+
* | SPLINE | 样条线 |
|
|
774
|
+
* | LinkLine | 超链接 |
|
|
722
775
|
*/
|
|
723
776
|
AddMcDbEntityTypes(str: string): any;
|
|
724
777
|
/**
|
|
@@ -781,47 +834,98 @@ export declare class MxCADUtilityClass {
|
|
|
781
834
|
* 得到当前选中的对象。
|
|
782
835
|
*/
|
|
783
836
|
getCurrentSelect(filter?: MxCADResbuf | null): McObjectId[];
|
|
837
|
+
/** 用户选择
|
|
838
|
+
* @param strPrompt 字符串提示
|
|
839
|
+
* @param filter 过滤对象
|
|
840
|
+
* @returns 得到选择的对象ID
|
|
841
|
+
* */
|
|
784
842
|
userSelect(strPrompt?: string, filter?: MxCADResbuf | null): Promise<McObjectId[]>;
|
|
785
843
|
init(): void;
|
|
786
|
-
|
|
844
|
+
/** 获取角点(鼠标点击的两个点)
|
|
845
|
+
* @param strPrompt 字符串提示
|
|
846
|
+
* @param pt1 第一个点 (已知一个角点的情况)
|
|
847
|
+
* @param detailedResult {@link DetailedResult} 交互结果讲台的回调
|
|
848
|
+
* @param drawSelectCroner 绘制选择对象的选框(true有背景false无背景)
|
|
849
|
+
* @param isDisableAllTrace 是否禁用所有跟踪
|
|
850
|
+
* */
|
|
851
|
+
getCorner(strPrompt?: string, pt1?: McGePoint3d, detailedResult?: (retcode: DetailedResult) => any, drawSelectCroner?: boolean, isDisableAllTrace?: boolean): Promise<{
|
|
787
852
|
pt1: McGePoint3d;
|
|
788
853
|
pt2: McGePoint3d;
|
|
789
854
|
} | null>;
|
|
855
|
+
/** 获取多个实体形成的包围盒
|
|
856
|
+
* @param aryId 实体对象ID数组
|
|
857
|
+
* */
|
|
790
858
|
getMcDbEntitysBoundingBox(aryId: McObjectId[]): {
|
|
791
859
|
minPt: McGePoint3d;
|
|
792
860
|
maxPt: McGePoint3d;
|
|
793
861
|
} | undefined;
|
|
862
|
+
/** 计算凸度
|
|
863
|
+
* @param pt1 开始点
|
|
864
|
+
* @param pt2 中点
|
|
865
|
+
* @param pt3 结束点
|
|
866
|
+
* */
|
|
794
867
|
calcBulge(pt1: McGePoint3d, pt2: McGePoint3d, pt3: McGePoint3d): {
|
|
795
868
|
val: number;
|
|
796
869
|
ret: boolean;
|
|
797
870
|
};
|
|
871
|
+
/** 通过一个点坐标填充对应位置实体的填充 */
|
|
798
872
|
builderHatchFromPoint(pt: McGePoint3d): McDbHatch | null;
|
|
799
873
|
}
|
|
874
|
+
/** 提供了一系列与绘图相关的工具方法 */
|
|
800
875
|
export declare let MxCADUtility: MxCADUtilityClass;
|
|
876
|
+
/** 选择集状态枚举 */
|
|
801
877
|
export declare enum MxCADSelectionSetStatus {
|
|
878
|
+
/** 构造选择集成功 */
|
|
802
879
|
kSelected = 0,
|
|
880
|
+
/** 当交互构造选择集时,用户直接按下了 Enter 键。 */
|
|
803
881
|
kNone = 1,
|
|
882
|
+
/** 当交互构造选择集时,用户按下了 Esc 键取消。 */
|
|
804
883
|
kCanceled = 2,
|
|
884
|
+
/** 拒绝执行的无效请求(关键字错误)。 */
|
|
805
885
|
kRejected = 3,
|
|
886
|
+
/** 输入了关键值 */
|
|
806
887
|
kKeyword = 4
|
|
807
888
|
}
|
|
889
|
+
/** 选择集 用于选择实体 */
|
|
808
890
|
export declare class MxCADSelectionSet extends McRxObject {
|
|
891
|
+
/** 是否循环选择 */
|
|
809
892
|
isWhileSelect: boolean;
|
|
893
|
+
/** 选择是否高亮 */
|
|
810
894
|
isSelectHighlight: boolean;
|
|
811
895
|
private selectPt1;
|
|
812
896
|
private selectPt2;
|
|
813
897
|
constructor();
|
|
898
|
+
/** 得到选择形成的两个对角点 */
|
|
814
899
|
getSelectPoint(): {
|
|
815
900
|
pt1: McGePoint3d;
|
|
816
901
|
pt2: McGePoint3d;
|
|
817
902
|
};
|
|
903
|
+
/** 全选
|
|
904
|
+
* @param filter 过滤对象
|
|
905
|
+
* */
|
|
818
906
|
allSelect(filter?: MxCADResbuf | null): number;
|
|
907
|
+
/** 根据一个坐标点选择一个实体对象的索引
|
|
908
|
+
* @param dX 坐标x
|
|
909
|
+
* @param dY 坐标y
|
|
910
|
+
* @param filter 过滤对象
|
|
911
|
+
* */
|
|
819
912
|
pointSelect(dX: number, dY: number, filter?: MxCADResbuf | null, dTol?: number): number;
|
|
913
|
+
/** 根据两个对角点选择一个实体对象的索引
|
|
914
|
+
* @param
|
|
915
|
+
* */
|
|
820
916
|
crossingSelect(dX1: number, dY1: number, dX2: number, dY2: number, filter?: MxCADResbuf | null): number;
|
|
917
|
+
/** 获取当前选中的个数 */
|
|
821
918
|
count(): number;
|
|
919
|
+
/** 根据对象索引 得到对应对象ID */
|
|
822
920
|
item(lItem: number): McObjectId;
|
|
921
|
+
/** 遍历已选中的实体 */
|
|
823
922
|
forEach(call: (val: McObjectId) => void): void;
|
|
923
|
+
/** 得到当前已选中的所有对象ID */
|
|
824
924
|
getIds(): McObjectId[];
|
|
925
|
+
/** 用户选择
|
|
926
|
+
* @param 字符串提示
|
|
927
|
+
* @param filter 提示
|
|
928
|
+
* */
|
|
825
929
|
userSelect(strPrompt?: string, filter?: MxCADResbuf | null): Promise<boolean>;
|
|
826
930
|
}
|
|
827
931
|
export declare class MxCADUiPrBase {
|
|
@@ -932,14 +1036,23 @@ export declare class MxCADUiPrBase {
|
|
|
932
1036
|
* 是否禁用捕捉
|
|
933
1037
|
*/
|
|
934
1038
|
isDisableOsnap(): boolean;
|
|
1039
|
+
/** 设置是否禁用动态跟踪 */
|
|
935
1040
|
setDisableDynamicTrace(isDisable: boolean): void;
|
|
1041
|
+
/** 是否禁用动态跟踪 */
|
|
936
1042
|
isDisableDynamicTrace(): boolean;
|
|
1043
|
+
/** 设置是否禁用极轴跟踪 */
|
|
937
1044
|
setDisablePolarAxisTrace(isDisable: boolean): void;
|
|
1045
|
+
/** 是否禁用极轴跟踪 */
|
|
938
1046
|
isDisablePolarAxisTrace(): boolean;
|
|
1047
|
+
/** 设置是否禁用格网追踪 */
|
|
939
1048
|
setDisableGridTrace(isDisable: boolean): void;
|
|
1049
|
+
/** 是否禁用格网追踪 */
|
|
940
1050
|
isDisableGridTrace(): boolean;
|
|
1051
|
+
/** 设置是否禁用正射追踪 */
|
|
941
1052
|
setDisableOrthoTrace(isDisable: boolean): void;
|
|
1053
|
+
/** 是否禁用正射追踪 */
|
|
942
1054
|
isDisableOrthoTrace(): boolean;
|
|
1055
|
+
/** 禁用所有跟踪 */
|
|
943
1056
|
disableAllTrace(isDisable?: boolean): void;
|
|
944
1057
|
/**
|
|
945
1058
|
* 返回输入控制设置,UserInputControls
|
|
@@ -950,12 +1063,19 @@ export declare class MxCADUiPrBase {
|
|
|
950
1063
|
*/
|
|
951
1064
|
setUserInputControls(contros: number): void;
|
|
952
1065
|
}
|
|
1066
|
+
/** UI交互取点 (鼠标点击画布) */
|
|
953
1067
|
export declare class MxCADUiPrPoint extends MxCADUiPrBase {
|
|
954
1068
|
constructor();
|
|
1069
|
+
/**
|
|
1070
|
+
* 运行go方法, 将返回用户交互的Promise任务
|
|
1071
|
+
* @description
|
|
1072
|
+
* 当鼠标点击画布后 Promise完成, 得到其点击的坐标点
|
|
1073
|
+
* 其他交互操作方式将返回null 如按下Esc取消键或在交互中输入对应的关键词
|
|
1074
|
+
* */
|
|
955
1075
|
go(): Promise<McGePoint3d | null>;
|
|
956
1076
|
/**
|
|
957
|
-
*
|
|
958
|
-
* @returns
|
|
1077
|
+
* 得以获取的点
|
|
1078
|
+
* @returns 点坐标
|
|
959
1079
|
*/
|
|
960
1080
|
value(): McGePoint3d;
|
|
961
1081
|
/**
|
|
@@ -981,6 +1101,9 @@ export declare class MxCADUiPrPoint extends MxCADUiPrBase {
|
|
|
981
1101
|
*/
|
|
982
1102
|
setUseBasePt(useIt: boolean): void;
|
|
983
1103
|
}
|
|
1104
|
+
/** UI交互获取距离
|
|
1105
|
+
* @description 根据两个点确定一段距离
|
|
1106
|
+
*/
|
|
984
1107
|
export declare class MxCADUiPrDist extends MxCADUiPrBase {
|
|
985
1108
|
constructor();
|
|
986
1109
|
/**
|
|
@@ -1011,6 +1134,7 @@ export declare class MxCADUiPrDist extends MxCADUiPrBase {
|
|
|
1011
1134
|
*/
|
|
1012
1135
|
go(): Promise<number | null>;
|
|
1013
1136
|
}
|
|
1137
|
+
/** UI交互 根据两个点计算得到角度 */
|
|
1014
1138
|
export declare class MxCADUiPrAngle extends MxCADUiPrBase {
|
|
1015
1139
|
constructor();
|
|
1016
1140
|
/**
|
|
@@ -1041,6 +1165,7 @@ export declare class MxCADUiPrAngle extends MxCADUiPrBase {
|
|
|
1041
1165
|
*/
|
|
1042
1166
|
go(): Promise<number | null>;
|
|
1043
1167
|
}
|
|
1168
|
+
/** UI交互 根据用户输入得到整型数字 */
|
|
1044
1169
|
export declare class MxCADUiPrInt extends MxCADUiPrBase {
|
|
1045
1170
|
constructor();
|
|
1046
1171
|
/**
|
|
@@ -1054,6 +1179,7 @@ export declare class MxCADUiPrInt extends MxCADUiPrBase {
|
|
|
1054
1179
|
*/
|
|
1055
1180
|
go(): Promise<number | null>;
|
|
1056
1181
|
}
|
|
1182
|
+
/** UI交互 根据用户输入得到关键词 */
|
|
1057
1183
|
export declare class MxCADUiPrKeyWord extends MxCADUiPrBase {
|
|
1058
1184
|
constructor();
|
|
1059
1185
|
/**
|
|
@@ -1063,6 +1189,7 @@ export declare class MxCADUiPrKeyWord extends MxCADUiPrBase {
|
|
|
1063
1189
|
*/
|
|
1064
1190
|
go(): Promise<string | null>;
|
|
1065
1191
|
}
|
|
1192
|
+
/** UI交互 根据用户输入得到字符串 */
|
|
1066
1193
|
export declare class MxCADUiPrString extends MxCADUiPrBase {
|
|
1067
1194
|
constructor();
|
|
1068
1195
|
/**
|
|
@@ -1076,6 +1203,7 @@ export declare class MxCADUiPrString extends MxCADUiPrBase {
|
|
|
1076
1203
|
*/
|
|
1077
1204
|
go(): Promise<string | null>;
|
|
1078
1205
|
}
|
|
1206
|
+
/** UI交互 根据用户鼠标点击的坐标得到对应的实体 */
|
|
1079
1207
|
export declare class MxCADUiPrEntity extends MxCADUiPrBase {
|
|
1080
1208
|
private filter?;
|
|
1081
1209
|
private id;
|
|
@@ -1236,12 +1364,20 @@ export declare class McDbEntity extends McDbObject {
|
|
|
1236
1364
|
setxDataPoint(appName: string, val: McGePoint3d): boolean;
|
|
1237
1365
|
deleteXData(appName: string): boolean;
|
|
1238
1366
|
getAllAppName(): McGeStringArray;
|
|
1367
|
+
/** 图层ID对象 */
|
|
1239
1368
|
get layerId(): McObjectId;
|
|
1240
1369
|
set layerId(id: McObjectId);
|
|
1370
|
+
/** 线型ID对象 */
|
|
1241
1371
|
get linetypeId(): McObjectId;
|
|
1242
1372
|
set linetypeId(id: McObjectId);
|
|
1373
|
+
/** 文字样式ID对象 */
|
|
1243
1374
|
get textStyleId(): McObjectId;
|
|
1244
1375
|
set textStyleId(id: McObjectId);
|
|
1376
|
+
/** 与其他实体相交, 得到交点
|
|
1377
|
+
* @param intersectObject 需要相交的是实体对象
|
|
1378
|
+
* @param exOption 相交的选项
|
|
1379
|
+
* @returns 得到所有交点
|
|
1380
|
+
* */
|
|
1245
1381
|
IntersectWith(intersectObject: McDbEntity, exOption: McDb.Intersect): McGePoint3dArray;
|
|
1246
1382
|
/**
|
|
1247
1383
|
* 计算面积
|
|
@@ -1251,9 +1387,14 @@ export declare class McDbEntity extends McDbObject {
|
|
|
1251
1387
|
ret: boolean;
|
|
1252
1388
|
};
|
|
1253
1389
|
/**
|
|
1254
|
-
*
|
|
1390
|
+
* 禁用对象的自动更新显示.
|
|
1255
1391
|
*/
|
|
1256
1392
|
disableDisplay(isDisable: boolean): void;
|
|
1393
|
+
/**
|
|
1394
|
+
* 显示调用对象更新显示.
|
|
1395
|
+
*/
|
|
1396
|
+
updateDisplay(): void;
|
|
1397
|
+
syncData(_toCpp?: boolean): boolean;
|
|
1257
1398
|
}
|
|
1258
1399
|
/**
|
|
1259
1400
|
* 表示数据库曲线。
|
|
@@ -2177,7 +2318,7 @@ export declare class McDbPoint extends McDbEntity {
|
|
|
2177
2318
|
set position(pt: McGePoint3d);
|
|
2178
2319
|
}
|
|
2179
2320
|
/**
|
|
2180
|
-
*
|
|
2321
|
+
* 表示填充对象
|
|
2181
2322
|
*/
|
|
2182
2323
|
export declare class McDbHatch extends McDbEntity {
|
|
2183
2324
|
/**
|
|
@@ -2185,26 +2326,53 @@ export declare class McDbHatch extends McDbEntity {
|
|
|
2185
2326
|
* @param imp 内部对象。
|
|
2186
2327
|
*/
|
|
2187
2328
|
constructor(x?: object);
|
|
2329
|
+
/** 循环次数 */
|
|
2188
2330
|
get numLoops(): number;
|
|
2331
|
+
/** 某次循环索引中的类型 */
|
|
2189
2332
|
loopTypeAt(loopIndex: number): number;
|
|
2333
|
+
/** 获取索引的值
|
|
2334
|
+
* @param loopIndex index 循环的索引
|
|
2335
|
+
* @returns { Object } ret 是否成功获取 | lootype 类型 | vertices 坐标集合 | bulges凸度集合
|
|
2336
|
+
* @example
|
|
2337
|
+
* ```ts
|
|
2338
|
+
* import { McDbHatch } from "mxcad"
|
|
2339
|
+
* const hatch = new McDbHatch()
|
|
2340
|
+
* const numLoops = hatch.numLoops;
|
|
2341
|
+
* for (let i = 0; i < numLoops; i++) {
|
|
2342
|
+
* const loop = hatch.getLoopAt(i);
|
|
2343
|
+
* console.log(loop)
|
|
2344
|
+
* };
|
|
2345
|
+
* ```
|
|
2346
|
+
* */
|
|
2190
2347
|
getLoopAt(loopIndex: number): {
|
|
2191
2348
|
ret: boolean;
|
|
2192
2349
|
lootype: number;
|
|
2193
2350
|
vertices: McGePoint3d[];
|
|
2194
2351
|
bulges: number[];
|
|
2195
2352
|
};
|
|
2353
|
+
/** 填充图案类型 */
|
|
2196
2354
|
patternType(): number;
|
|
2355
|
+
/** 填充图案名称 */
|
|
2197
2356
|
patternName(): string;
|
|
2357
|
+
/** 设置填充图案 */
|
|
2198
2358
|
setPattern(type: number, patName: string): void;
|
|
2359
|
+
/** 填充图案角度 */
|
|
2199
2360
|
get patternAngle(): number;
|
|
2200
2361
|
set patternAngle(angle: number);
|
|
2362
|
+
/** 填充图案缩放比例 */
|
|
2201
2363
|
get patternScale(): number;
|
|
2202
2364
|
set patternScale(scale: number);
|
|
2365
|
+
/** 填充图案空间 */
|
|
2203
2366
|
get patternSpace(): number;
|
|
2204
2367
|
set patternSpace(space: number);
|
|
2205
2368
|
get patternDouble(): boolean;
|
|
2206
2369
|
set patternDouble(isDouble: boolean);
|
|
2370
|
+
/** 图案定义的数量 */
|
|
2207
2371
|
get numPatternDefinitions(): number;
|
|
2372
|
+
/** 获取对应图案定义的数据
|
|
2373
|
+
* @param index 索引
|
|
2374
|
+
* @returns { Object } ret 是否成功获取 | angle 角度 | baseX, baseY 基点位置 | offsetX, offsetY 偏移位置 | aryDashes 短划线数据
|
|
2375
|
+
* */
|
|
2208
2376
|
getPatternDefinitionAt(index: number): {
|
|
2209
2377
|
ret: boolean;
|
|
2210
2378
|
angle: number;
|
|
@@ -2214,14 +2382,45 @@ export declare class McDbHatch extends McDbEntity {
|
|
|
2214
2382
|
offsetY: number;
|
|
2215
2383
|
aryDashes: number[];
|
|
2216
2384
|
};
|
|
2385
|
+
/** 添加图案定义
|
|
2386
|
+
* @param angle 角度 如 45
|
|
2387
|
+
* @param baseX 基点x坐标
|
|
2388
|
+
* @param baseY 基点y坐标
|
|
2389
|
+
* @param offsetX 偏移x坐标
|
|
2390
|
+
* @param offsetY 偏移y坐标
|
|
2391
|
+
* @param dashes 短划线数据
|
|
2392
|
+
* @example
|
|
2393
|
+
* ```ts
|
|
2394
|
+
* import { McDbHatch } from "mxcad"
|
|
2395
|
+
* const hatch = new McDbHatch()
|
|
2396
|
+
* hatch.addPatternDefinition(45, 0, 0, 0, 0.25, [45, 0.17677695, 0, 0, 0.25, 0.125, -0.0625])
|
|
2397
|
+
* ```
|
|
2398
|
+
* @returns { Boolean } 是否成功添加图案定义
|
|
2399
|
+
* */
|
|
2217
2400
|
addPatternDefinition(angle: number, baseX: number, baseY: number, offsetX: number, offsetY: number, dashes: number[]): boolean;
|
|
2401
|
+
/** 清空图案定义 */
|
|
2218
2402
|
clearPatternDefinition(): boolean;
|
|
2403
|
+
/** 填充样式 */
|
|
2219
2404
|
hatchStyle(): McDb.HatchStyle;
|
|
2405
|
+
/** 设置填充样式 */
|
|
2220
2406
|
setHatchStyle(val: McDb.HatchStyle): void;
|
|
2221
2407
|
evaluateHatch(): boolean;
|
|
2408
|
+
/** 追加循环
|
|
2409
|
+
* @param loopType 循环类型
|
|
2410
|
+
* @param vertices 坐标集合
|
|
2411
|
+
* @param bulges 凸度集合
|
|
2412
|
+
* */
|
|
2222
2413
|
appendLoop(loopType: number, vertices: McGePoint3dArray, bulges: number[]): boolean;
|
|
2414
|
+
/** 删除某个索引下的循环 */
|
|
2223
2415
|
removeLoopAt(loopIndex: number): boolean;
|
|
2416
|
+
/** 删除所有循环 */
|
|
2224
2417
|
removeAllLoop(): boolean;
|
|
2418
|
+
/** 设置某个索引下的循环数据
|
|
2419
|
+
* @param loopIndex 循环索引
|
|
2420
|
+
* @param loopType 循环类型
|
|
2421
|
+
* @param vertices 坐标集合
|
|
2422
|
+
* @param bulges 凸度集合
|
|
2423
|
+
* */
|
|
2225
2424
|
setLoopAt(loopIndex: number, loopType: number, vertices: McGePoint3dArray, bulges: number[]): boolean;
|
|
2226
2425
|
isSolid(): boolean;
|
|
2227
2426
|
}
|
|
@@ -2282,10 +2481,21 @@ export declare namespace McDb {
|
|
|
2282
2481
|
/** 自适应 */
|
|
2283
2482
|
kTextFit = 5
|
|
2284
2483
|
}
|
|
2484
|
+
/** 相交的类型
|
|
2485
|
+
* 调用 {@link McDbEntity.IntersectWith} 方法的第二个参数
|
|
2486
|
+
* */
|
|
2285
2487
|
enum Intersect {
|
|
2488
|
+
/** 两个实体都不延伸 */
|
|
2286
2489
|
kOnBothOperands = 0,
|
|
2490
|
+
/** 只延伸原实体
|
|
2491
|
+
* 指调用 {@link McDbEntity.IntersectWith} 方法的实例本身
|
|
2492
|
+
* */
|
|
2287
2493
|
kExtendThis = 1,
|
|
2494
|
+
/**只延伸作为参数的实体
|
|
2495
|
+
* 指 {@link McDbEntity.IntersectWith} 的第一个参数
|
|
2496
|
+
* */
|
|
2288
2497
|
kExtendArg = 2,
|
|
2498
|
+
/** 两个实体都延伸 */
|
|
2289
2499
|
kExtendBoth = 3
|
|
2290
2500
|
}
|
|
2291
2501
|
/**
|
|
@@ -2366,47 +2576,74 @@ export declare namespace McDb {
|
|
|
2366
2576
|
kLnWtByLwDefault = -3
|
|
2367
2577
|
}
|
|
2368
2578
|
/**
|
|
2369
|
-
*
|
|
2579
|
+
* 表示图案填充中不同类型的循环
|
|
2370
2580
|
* @public
|
|
2371
2581
|
*/
|
|
2372
2582
|
enum HatchLoopType {
|
|
2583
|
+
/** 默认填充循环类型 */
|
|
2373
2584
|
kDefault = 0,
|
|
2585
|
+
/** 外部填充循环类型 表示外部轮廓或边界 */
|
|
2374
2586
|
kExternal = 1,
|
|
2587
|
+
/** 多段线填充循环类型 表示由多个线段组成的区域*/
|
|
2375
2588
|
kPolyline = 2,
|
|
2589
|
+
/** 派生填充循环类型 表示从其他图形元素派生而来的填充区域*/
|
|
2376
2590
|
kDerived = 4,
|
|
2591
|
+
/** 文本框填充循环类型 表示包含文本的区域*/
|
|
2377
2592
|
kTextbox = 8,
|
|
2593
|
+
/** 最外层填充循环类型 表示填充区域的最外层边界*/
|
|
2378
2594
|
kOutermost = 16,
|
|
2595
|
+
/** 未闭合填充循环类型 表示填充区域的边界没有闭合*/
|
|
2379
2596
|
kNotClosed = 32,
|
|
2597
|
+
/** 自相交填充循环类型 表示填充区域的边界自相交*/
|
|
2380
2598
|
kSelfIntersecting = 64,
|
|
2599
|
+
/** 文本岛填充循环类型 表示包含文本的孤立区域*/
|
|
2381
2600
|
kTextIsland = 128
|
|
2382
2601
|
}
|
|
2383
2602
|
/**
|
|
2384
|
-
*
|
|
2603
|
+
* 表示填充区域中的边的曲线类型
|
|
2385
2604
|
* @public
|
|
2386
2605
|
*/
|
|
2387
2606
|
enum HatchEdgeType {
|
|
2607
|
+
/** 表示直线类型的边 */
|
|
2388
2608
|
kLine = 1,
|
|
2609
|
+
/** 圆弧类型的边 */
|
|
2389
2610
|
kCirArc = 2,
|
|
2611
|
+
/** 椭圆弧类型的边 */
|
|
2390
2612
|
kEllArc = 3,
|
|
2613
|
+
/** 样条曲线类型的边 */
|
|
2391
2614
|
kSpline = 4
|
|
2392
2615
|
}
|
|
2393
2616
|
/**
|
|
2394
|
-
*
|
|
2617
|
+
* 表示填充图案的来源类型
|
|
2395
2618
|
* @public
|
|
2396
2619
|
*/
|
|
2397
2620
|
enum HatchPatternType {
|
|
2621
|
+
/** 用户自定义的填充图案 */
|
|
2398
2622
|
kUserDefined = 0,
|
|
2623
|
+
/** 预定义的填充图案 */
|
|
2399
2624
|
kPreDefined = 1,
|
|
2625
|
+
/** 自定义定义的填充图案 */
|
|
2400
2626
|
kCustomDefined = 2
|
|
2401
2627
|
}
|
|
2628
|
+
/**
|
|
2629
|
+
* 表示填充图案的风格
|
|
2630
|
+
* @public
|
|
2631
|
+
* */
|
|
2402
2632
|
enum HatchStyle {
|
|
2633
|
+
/** 普通风格 标准的、普通的填充图案风格 */
|
|
2403
2634
|
kNormal = 0,
|
|
2635
|
+
/** 外部风格 填充会强调区域的外部边界 用于使外部区域在绘图中更为显眼 */
|
|
2404
2636
|
kOuter = 1,
|
|
2637
|
+
/** 忽略风格 表示在某些情况下应忽略填充图案的风格 在特定的绘图需求下,不需要显示填充图案的情况*/
|
|
2405
2638
|
kIgnore = 2
|
|
2406
2639
|
}
|
|
2640
|
+
/** 指定裁剪操作中使用的边界类型*/
|
|
2407
2641
|
enum ClipBoundaryType {
|
|
2642
|
+
/** 无效的裁剪边界类型 */
|
|
2408
2643
|
kInvalid = 0,
|
|
2644
|
+
/** 矩形裁剪边界类型 */
|
|
2409
2645
|
kRect = 1,
|
|
2646
|
+
/** 多边形裁剪边界类型 */
|
|
2410
2647
|
kPoly = 2
|
|
2411
2648
|
}
|
|
2412
2649
|
}
|
|
@@ -2526,7 +2763,7 @@ export declare class McDbTextStyleTableRecord extends McDbObject {
|
|
|
2526
2763
|
*/
|
|
2527
2764
|
constructor(imp?: any);
|
|
2528
2765
|
/**
|
|
2529
|
-
*
|
|
2766
|
+
* 获取或设置文字样式名称。
|
|
2530
2767
|
*/
|
|
2531
2768
|
get name(): string;
|
|
2532
2769
|
set name(val: string);
|
|
@@ -2534,19 +2771,26 @@ export declare class McDbTextStyleTableRecord extends McDbObject {
|
|
|
2534
2771
|
set isShapeFile(val: boolean);
|
|
2535
2772
|
get isVertical(): boolean;
|
|
2536
2773
|
set isVertical(val: boolean);
|
|
2774
|
+
/** 文字大小(高度) */
|
|
2537
2775
|
get textSize(): number;
|
|
2538
2776
|
set textSize(val: number);
|
|
2777
|
+
/** 宽度因子 */
|
|
2539
2778
|
get xScale(): number;
|
|
2540
2779
|
set xScale(val: number);
|
|
2780
|
+
/** 倾斜角度 */
|
|
2541
2781
|
get obliquingAngle(): number;
|
|
2542
2782
|
set obliquingAngle(val: number);
|
|
2543
2783
|
get flagBits(): number;
|
|
2544
2784
|
set flagBits(val: number);
|
|
2785
|
+
/** 字体名称 */
|
|
2545
2786
|
get fileName(): string;
|
|
2546
2787
|
set fileName(val: string);
|
|
2788
|
+
/** 大字体名称 */
|
|
2547
2789
|
get bigFontFileName(): string;
|
|
2548
2790
|
set bigFontFileName(val: string);
|
|
2791
|
+
/** 设置字体样式 */
|
|
2549
2792
|
setFont(sTypeface: string, bold: boolean, italic: boolean, charset: number, pitchAndFamily: number): boolean;
|
|
2793
|
+
/** 获取字体样式 */
|
|
2550
2794
|
font(): {
|
|
2551
2795
|
sTypeface: string;
|
|
2552
2796
|
bold: boolean;
|
|
@@ -2612,7 +2856,7 @@ export declare class McDbLayerTable extends McDbObject {
|
|
|
2612
2856
|
getAllRecordId(skipDeleted?: boolean): McObjectId[];
|
|
2613
2857
|
add(rec: McDbLayerTableRecord): McObjectId;
|
|
2614
2858
|
get(sName: string, skipDeleted?: boolean): McObjectId;
|
|
2615
|
-
has(sName: string): boolean;
|
|
2859
|
+
has(sName: string, skipDeleted?: boolean): boolean;
|
|
2616
2860
|
}
|
|
2617
2861
|
/**
|
|
2618
2862
|
* 表示数据库线型表。
|
|
@@ -2626,7 +2870,7 @@ export declare class McDbLinetypeTable extends McDbObject {
|
|
|
2626
2870
|
getAllRecordId(skipDeleted?: boolean): McObjectId[];
|
|
2627
2871
|
add(rec: McDbLinetypeTableRecord): McObjectId;
|
|
2628
2872
|
get(sName: string, skipDeleted?: boolean): McObjectId;
|
|
2629
|
-
has(sName: string): boolean;
|
|
2873
|
+
has(sName: string, skipDeleted?: boolean): boolean;
|
|
2630
2874
|
}
|
|
2631
2875
|
/**
|
|
2632
2876
|
* 表示数据库文字样式表。
|
|
@@ -2640,7 +2884,7 @@ export declare class McDbTextStyleTable extends McDbObject {
|
|
|
2640
2884
|
getAllRecordId(skipDeleted?: boolean): McObjectId[];
|
|
2641
2885
|
add(rec: McDbTextStyleTableRecord): McObjectId;
|
|
2642
2886
|
get(sName: string, skipDeleted?: boolean): McObjectId;
|
|
2643
|
-
has(sName: string): boolean;
|
|
2887
|
+
has(sName: string, skipDeleted?: boolean): boolean;
|
|
2644
2888
|
}
|
|
2645
2889
|
/**
|
|
2646
2890
|
* 表示数据库。
|
|
@@ -2674,6 +2918,11 @@ export declare class McDbDatabase extends McRxObject {
|
|
|
2674
2918
|
* @returns 块表。
|
|
2675
2919
|
*/
|
|
2676
2920
|
getBlockTable(): McDbBlockTable;
|
|
2921
|
+
/**
|
|
2922
|
+
* 得到图纸的字典对象。
|
|
2923
|
+
* @returns McDbDictionary
|
|
2924
|
+
*/
|
|
2925
|
+
getNamedObjectsDictionary(): McDbDictionary;
|
|
2677
2926
|
get blockTable(): McDbBlockTable;
|
|
2678
2927
|
/**
|
|
2679
2928
|
*返回当前空间块表记录
|
|
@@ -2758,10 +3007,14 @@ export declare class McDbDatabase extends McRxObject {
|
|
|
2758
3007
|
*/
|
|
2759
3008
|
resetModificationStatus(): void;
|
|
2760
3009
|
}
|
|
3010
|
+
/** 图块记录 */
|
|
2761
3011
|
export declare class McDbBlockTableRecord extends McDbObject {
|
|
2762
3012
|
constructor(imp?: any);
|
|
3013
|
+
/** 给图块添加对应实体 */
|
|
2763
3014
|
appendAcDbEntity(pEntity: McDbEntity): McObjectId;
|
|
3015
|
+
/** 获取图块中所有实体的对象ID */
|
|
2764
3016
|
getAllEntityId(skipDeleted?: boolean): McObjectId[];
|
|
3017
|
+
/** 图块原点 */
|
|
2765
3018
|
get origin(): McGePoint3d;
|
|
2766
3019
|
set origin(origin: McGePoint3d);
|
|
2767
3020
|
/**
|
|
@@ -2791,6 +3044,19 @@ export declare class McDbRasterImageDef extends McDbObject {
|
|
|
2791
3044
|
set sourceFileName(sPathName: string);
|
|
2792
3045
|
get sourceFileName(): string;
|
|
2793
3046
|
}
|
|
3047
|
+
export declare class McDbDictionary extends McDbObject {
|
|
3048
|
+
constructor(imp?: any);
|
|
3049
|
+
getAllObject(): McObjectId[];
|
|
3050
|
+
getAllObjectName(): McGeStringArray;
|
|
3051
|
+
remove(sName: string): boolean;
|
|
3052
|
+
addObject(sName: string, obj: McDbObject): McObjectId;
|
|
3053
|
+
getAt(sName: string, isGetErased?: boolean): McObjectId;
|
|
3054
|
+
}
|
|
3055
|
+
export declare class McDbXrecord extends McDbObject {
|
|
3056
|
+
constructor(imp?: any);
|
|
3057
|
+
setData(xdata: MxCADResbuf): boolean;
|
|
3058
|
+
getData(): MxCADResbuf;
|
|
3059
|
+
}
|
|
2794
3060
|
declare class MxAI {
|
|
2795
3061
|
private serverUrl;
|
|
2796
3062
|
private mapFun;
|
|
@@ -2826,7 +3092,7 @@ export declare class McObject {
|
|
|
2826
3092
|
/** 监听对象选择事件
|
|
2827
3093
|
* @example
|
|
2828
3094
|
* ```ts
|
|
2829
|
-
* import { MxCpp } from
|
|
3095
|
+
* import { MxCpp } from "mxcad"
|
|
2830
3096
|
* MxCpp.getCurrentMxCAD().on("selectChange", (ids)=> {
|
|
2831
3097
|
* let ent = id.getMcDbEntity()
|
|
2832
3098
|
* if(!ent) return
|
|
@@ -3555,6 +3821,7 @@ export declare class McAppType {
|
|
|
3555
3821
|
private imp;
|
|
3556
3822
|
MxCADAssist: any;
|
|
3557
3823
|
private objectIdToObjectCalls;
|
|
3824
|
+
private classNameToCreateCalls;
|
|
3558
3825
|
/**
|
|
3559
3826
|
* 初始化 McAppType 对象。
|
|
3560
3827
|
* @param imp 传入的 imp 对象。
|
|
@@ -3597,7 +3864,7 @@ export declare class McAppType {
|
|
|
3597
3864
|
* 判断一个对象id是否指类类型名对象
|
|
3598
3865
|
*/
|
|
3599
3866
|
objectIdIsKindOf(lIdIndex: number, className: string): boolean;
|
|
3600
|
-
private
|
|
3867
|
+
private initCalls;
|
|
3601
3868
|
/**
|
|
3602
3869
|
* 将对象 id 转换为 McDbObject 对象。
|
|
3603
3870
|
* @param lIdIndex 对象的 id。
|
|
@@ -3689,11 +3956,16 @@ export interface MxCADUI {
|
|
|
3689
3956
|
};
|
|
3690
3957
|
setRegistData: (sData: string) => void;
|
|
3691
3958
|
}
|
|
3959
|
+
/** 自定义属性窗口的值的类型 */
|
|
3692
3960
|
export declare enum MxPropertiesWindowCustomValueType {
|
|
3961
|
+
/** 整数 */
|
|
3693
3962
|
kInt = 1,
|
|
3963
|
+
/** 双精度浮点数 */
|
|
3694
3964
|
kDouble = 2,
|
|
3965
|
+
/** 字符串 */
|
|
3695
3966
|
kString = 3
|
|
3696
3967
|
}
|
|
3968
|
+
/** 自定义属性窗口需要的值 */
|
|
3697
3969
|
export declare class MxPropertiesWindowCustomValue {
|
|
3698
3970
|
sVarName: string;
|
|
3699
3971
|
iVarType: number;
|
|
@@ -3706,12 +3978,63 @@ export declare class MxPropertiesWindowCustomValue {
|
|
|
3706
3978
|
export declare class MxPropertiesWindowCustom {
|
|
3707
3979
|
private getPropertiesCall;
|
|
3708
3980
|
private setPropertiesCall;
|
|
3981
|
+
/** 插件程序程序调用,注册返回对象自定属性函数。 */
|
|
3709
3982
|
onEvent_getProperties(call: (id: McObjectId) => MxPropertiesWindowCustomValue[]): void;
|
|
3983
|
+
/** 插件程序程序调用,注册设置对象自定属性函数。 */
|
|
3710
3984
|
onEvent_setProperties(call: (id: McObjectId, prop: MxPropertiesWindowCustomValue) => void): void;
|
|
3985
|
+
/** 插件程序程序调用,设置该对象状态支持自定义属性在属性窗口显示。 */
|
|
3711
3986
|
setEntitySupportCustom(id: McObjectId, isCustomProperties?: boolean): void;
|
|
3987
|
+
/** 属性UI程序调用 */
|
|
3712
3988
|
getEntityProperties(id: McObjectId): MxPropertiesWindowCustomValue[];
|
|
3989
|
+
/** 属性UI程序调用 */
|
|
3713
3990
|
setEntityProperties(id: McObjectId, prop: MxPropertiesWindowCustomValue): void;
|
|
3714
3991
|
}
|
|
3992
|
+
export declare enum MxCADCloneType {
|
|
3993
|
+
/** 正常Clone */
|
|
3994
|
+
kClone = 1,
|
|
3995
|
+
/** 动态拖动Clone */
|
|
3996
|
+
kDragClone = 2,
|
|
3997
|
+
/** 数据归档 */
|
|
3998
|
+
kCPPClone = 3
|
|
3999
|
+
}
|
|
4000
|
+
export declare abstract class IMcDbDwgFiler {
|
|
4001
|
+
private type;
|
|
4002
|
+
constructor(type: MxCADCloneType);
|
|
4003
|
+
getType(): MxCADCloneType;
|
|
4004
|
+
abstract writePoint(name: string, pt: McGePoint3d): void;
|
|
4005
|
+
abstract readPoint(name: string): {
|
|
4006
|
+
pt: McGePoint3d;
|
|
4007
|
+
ret: boolean;
|
|
4008
|
+
};
|
|
4009
|
+
}
|
|
4010
|
+
export declare class MxCADWorldDraw {
|
|
4011
|
+
private imp;
|
|
4012
|
+
constructor(lPtrWorldDraw: number);
|
|
4013
|
+
drawEntity(entity: McDbEntity): void;
|
|
4014
|
+
}
|
|
4015
|
+
/**
|
|
4016
|
+
* 自定义实体。
|
|
4017
|
+
*/
|
|
4018
|
+
export declare abstract class McDbCustomEntity extends McDbEntity {
|
|
4019
|
+
/**
|
|
4020
|
+
* 构造函数。
|
|
4021
|
+
* @param imp 内部实现对象。
|
|
4022
|
+
*/
|
|
4023
|
+
constructor(imp?: any);
|
|
4024
|
+
rxInit(): void;
|
|
4025
|
+
clone(): McDbObject | null;
|
|
4026
|
+
syncData(toCpp?: boolean): boolean;
|
|
4027
|
+
protected assertWrite(autoUndo?: boolean): void;
|
|
4028
|
+
moveGripPointsAt(_iIndex: number, _dXOffset: number, _dYOffset: number, _dZOffset: number): void;
|
|
4029
|
+
getGripPoints(): McGePoint3dArray;
|
|
4030
|
+
tempRelationObject(): number;
|
|
4031
|
+
freeTempRelationObject(): void;
|
|
4032
|
+
abstract create(imp?: any): McDbCustomEntity;
|
|
4033
|
+
abstract getTypeName(): string;
|
|
4034
|
+
abstract dwgInFields(filter: IMcDbDwgFiler): boolean;
|
|
4035
|
+
abstract dwgOutFields(filter: IMcDbDwgFiler): boolean;
|
|
4036
|
+
abstract worldDraw(draw: MxCADWorldDraw): void;
|
|
4037
|
+
}
|
|
3715
4038
|
export declare let MxCpp: MxCppType;
|
|
3716
4039
|
export declare function loadMxCADassembly(call?: (MxCpp: MxCppType) => void, locateFile?: (fileName: string, base?: string | URL) => string, wasmBinary?: ArrayBuffer, fontspath?: string, networkFonts?: string[]): Promise<MxCppType>;
|
|
3717
4040
|
export declare function MxCheckTheBrowser(): {
|
|
@@ -3909,16 +4232,21 @@ export declare class Color extends ObjectInheritance {
|
|
|
3909
4232
|
}
|
|
3910
4233
|
export interface Color extends McCmColor {
|
|
3911
4234
|
}
|
|
3912
|
-
/** 绘制文字
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
4235
|
+
/** 绘制文字
|
|
4236
|
+
* @param height 文字高度
|
|
4237
|
+
* @param text 文字内容
|
|
4238
|
+
* @param position 文字位置
|
|
4239
|
+
* @param angle 文件角度
|
|
4240
|
+
* @param color 文字颜色
|
|
4241
|
+
*/
|
|
4242
|
+
export declare function drawText(): Promise<McObjectId | undefined>;
|
|
4243
|
+
export declare function drawCircle(): Promise<McObjectId | undefined>;
|
|
3916
4244
|
export declare function drawLine(): Promise<void>;
|
|
3917
|
-
export declare function drawMText(): Promise<
|
|
4245
|
+
export declare function drawMText(): Promise<McObjectId | undefined>;
|
|
3918
4246
|
export declare function drawPolyLine(): Promise<void>;
|
|
3919
4247
|
export declare function drawPolygon(): Promise<void>;
|
|
3920
4248
|
export declare function drawArc(): Promise<void>;
|
|
3921
|
-
export declare function drawEllipticalArc():
|
|
4249
|
+
export declare function drawEllipticalArc(): Promise<McObjectId | undefined>;
|
|
3922
4250
|
export declare function Mx_Erase(): Promise<void>;
|
|
3923
4251
|
export declare const drawRectang: () => Promise<void>;
|
|
3924
4252
|
declare const getWasmURL: (wasmURL: string, baseURL?: string | URL) => string;
|
|
@@ -4072,6 +4400,10 @@ export interface MxDraw3d extends WasmConfig {
|
|
|
4072
4400
|
removeAllObjects(): void;
|
|
4073
4401
|
/** 高亮entry对应模型 */
|
|
4074
4402
|
highLightSelShape(theEntry: number): void;
|
|
4403
|
+
/** 高亮 */
|
|
4404
|
+
highLightSelLabelShape(labelEntryStr: string): void;
|
|
4405
|
+
/** 显示隐藏 */
|
|
4406
|
+
setObjectShowStateByLabel(labelEntryStr: string, theToShow: boolean): void;
|
|
4075
4407
|
/** 更新画布大小 */
|
|
4076
4408
|
updateCanvasSize: () => void;
|
|
4077
4409
|
/** 通过浏览器器File对象打开3D文件
|
|
@@ -4170,6 +4502,9 @@ export interface MxDraw3d extends WasmConfig {
|
|
|
4170
4502
|
MxDimensionTextHorizontalPosition: typeof MdGe.MxDimensionTextHorizontalPosition;
|
|
4171
4503
|
MxKindOfDimension: typeof MdGe.MxKindOfDimension;
|
|
4172
4504
|
MxDocColorType: typeof MdGe.MxDocColorType;
|
|
4505
|
+
MxKindOfInteractive: typeof MdGe.MxKindOfInteractive;
|
|
4506
|
+
MxPrs3dTypeOfHLR: typeof MdGe.MxPrs3dTypeOfHLR;
|
|
4507
|
+
MxDisplayStatus: typeof MdGe.MxDisplayStatus;
|
|
4173
4508
|
/** 表示拓扑元素遍历 */
|
|
4174
4509
|
MdGeExplorer: typeof MdGeExplorer;
|
|
4175
4510
|
/** 表示倒圆角 */
|
|
@@ -4284,6 +4619,17 @@ export interface MxDraw3d extends WasmConfig {
|
|
|
4284
4619
|
MdGeDocReader: typeof MdGeDocReader;
|
|
4285
4620
|
/** 文件写入器 */
|
|
4286
4621
|
MdGeDocWriter: typeof MdGeDocWriter;
|
|
4622
|
+
/** 上下文 */
|
|
4623
|
+
MdGeAisContext: typeof MdGeAisContext;
|
|
4624
|
+
mdGeAisContext: MdGeAisContext;
|
|
4625
|
+
/** ais对象 */
|
|
4626
|
+
MdGeAisObject: typeof MdGeAisObject;
|
|
4627
|
+
/** ais形状 */
|
|
4628
|
+
MdGeAisShape: typeof MdGeAisShape;
|
|
4629
|
+
/** 包围盒 */
|
|
4630
|
+
MdGeBndBox: typeof MdGeBndBox;
|
|
4631
|
+
/** aistextured形状 */
|
|
4632
|
+
MdGeAisTexturedShape: typeof MdGeAisTexturedShape;
|
|
4287
4633
|
}
|
|
4288
4634
|
/**
|
|
4289
4635
|
* 所有类的父类, 除去MdGeTopo以及MdGeBrep
|
|
@@ -4340,7 +4686,9 @@ export declare class MdGeShape extends MdGeObject {
|
|
|
4340
4686
|
TextureVOrigin(): number;
|
|
4341
4687
|
SetTextureOrigin(theToSetTextureOrigin: boolean, theUOrigin: number, theVOrigin: number): void;
|
|
4342
4688
|
IsNull(): boolean;
|
|
4343
|
-
|
|
4689
|
+
SetShapeName(theShapeName: string): void;
|
|
4690
|
+
GetShapeName(): string;
|
|
4691
|
+
Draw(): string;
|
|
4344
4692
|
}
|
|
4345
4693
|
/**
|
|
4346
4694
|
* 表示一个点形状
|
|
@@ -6074,6 +6422,34 @@ export declare namespace MdGe {
|
|
|
6074
6422
|
DocColor_ColorSurf = 1,
|
|
6075
6423
|
DocColor_ColorCurv = 2
|
|
6076
6424
|
}
|
|
6425
|
+
enum MxKindOfInteractive {
|
|
6426
|
+
KindOfInteractive_None = 0,
|
|
6427
|
+
KindOfInteractive_Datum = 1,
|
|
6428
|
+
KindOfInteractive_Shape = 2,
|
|
6429
|
+
KindOfInteractive_Object = 3,
|
|
6430
|
+
KindOfInteractive_Relation = 4,
|
|
6431
|
+
KindOfInteractive_Dimension = 5,
|
|
6432
|
+
KindOfInteractive_LightSource = 6,
|
|
6433
|
+
KOI_None = 0,
|
|
6434
|
+
KOI_Datum = 1,
|
|
6435
|
+
KOI_Shape = 2,
|
|
6436
|
+
KOI_Object = 3,
|
|
6437
|
+
KOI_Relation = 4,
|
|
6438
|
+
KOI_Dimension = 5
|
|
6439
|
+
}
|
|
6440
|
+
enum MxPrs3dTypeOfHLR {
|
|
6441
|
+
TOH_NotSet = 0,
|
|
6442
|
+
TOH_PolyAlgo = 1,
|
|
6443
|
+
TOH_Algo = 2
|
|
6444
|
+
}
|
|
6445
|
+
enum MxDisplayStatus {
|
|
6446
|
+
DisplayStatus_Displayed = 0,
|
|
6447
|
+
DisplayStatus_Erased = 1,
|
|
6448
|
+
DisplayStatus_None = 2,
|
|
6449
|
+
DS_Displayed = 0,
|
|
6450
|
+
DS_Erased = 1,
|
|
6451
|
+
DS_None = 2
|
|
6452
|
+
}
|
|
6077
6453
|
}
|
|
6078
6454
|
/**
|
|
6079
6455
|
* 表示拓扑元素遍历
|
|
@@ -7174,7 +7550,7 @@ export declare class MdGeApplication extends MdGeObject {
|
|
|
7174
7550
|
Close(aDoc: MdGeDocument): void;
|
|
7175
7551
|
}
|
|
7176
7552
|
export declare class MdGeDocument extends MdGeObject {
|
|
7177
|
-
constructor(p:
|
|
7553
|
+
constructor(p: object);
|
|
7178
7554
|
IsSaved(): boolean;
|
|
7179
7555
|
IsChanged(): boolean;
|
|
7180
7556
|
SetSaved(): void;
|
|
@@ -7363,6 +7739,129 @@ export declare class MdGeDocWriter extends MdGeObject {
|
|
|
7363
7739
|
constructor(p: string | object);
|
|
7364
7740
|
WriteFile(theDoc: MdGeDocument, fileName: string): boolean;
|
|
7365
7741
|
}
|
|
7742
|
+
export declare class MdGeAisContext extends MdGeObject {
|
|
7743
|
+
constructor(p?: object);
|
|
7744
|
+
DisplayStatus(anIobj: MdGeAisObject): MdGe.MxDisplayStatus;
|
|
7745
|
+
IsDisplayed(aniobj: MdGeAisObject, aMode?: number): boolean;
|
|
7746
|
+
SetAutoActivateSelection(theIsAuto: boolean): void;
|
|
7747
|
+
GetAutoActivateSelection(): boolean;
|
|
7748
|
+
Display(theIObj: MdGeAisObject, theToUpdateViewer: boolean): void;
|
|
7749
|
+
Display(theIObj: MdGeAisObject, theDispMode: number, theSelectionMode: number, theToUpdateViewer: boolean, theDispStatus: MdGe.MxDisplayStatus): void;
|
|
7750
|
+
Load(theObj: MdGeAisObject, theSelectionMode: number): void;
|
|
7751
|
+
Erase(theIObj: MdGeAisObject, theToUpdateViewer: boolean): void;
|
|
7752
|
+
EraseAll(theToUpdateViewer: boolean): void;
|
|
7753
|
+
DisplayAll(theToUpdateViewer: boolean): void;
|
|
7754
|
+
EraseSelected(theToUpdateViewer: boolean): void;
|
|
7755
|
+
DisplaySelected(theToUpdateViewer: boolean): void;
|
|
7756
|
+
ClearPrs(theIObj: MdGeAisObject, theMode: number, theToUpdateViewer: boolean): void;
|
|
7757
|
+
Remove(theIObj: MdGeAisObject, theToUpdateViewer: boolean): void;
|
|
7758
|
+
RemoveAll(theToUpdateViewer: boolean): void;
|
|
7759
|
+
Redisplay(theIObj: MdGeAisObject, theToUpdateViewer: boolean, theAllModes: boolean): void;
|
|
7760
|
+
RedisplayType(theTypeOfObject: MdGe.MxKindOfInteractive, theSignature: number, theToUpdateViewer: boolean): void;
|
|
7761
|
+
RecomputePrsOnly(theIObj: MdGeAisObject, theToUpdateViewer: boolean, theAllModes: boolean): void;
|
|
7762
|
+
RecomputeSelectionOnly(anIObj: MdGeAisObject): void;
|
|
7763
|
+
Update(theIObj: MdGeAisObject, theUpdateViewer: boolean): void;
|
|
7764
|
+
}
|
|
7765
|
+
export declare class MdGeAisObject extends MdGeObject {
|
|
7766
|
+
constructor(p?: object);
|
|
7767
|
+
}
|
|
7768
|
+
export declare class MdGeAisShape extends MdGeAisObject {
|
|
7769
|
+
constructor(shap: MdGeShape | object);
|
|
7770
|
+
Signature(): number;
|
|
7771
|
+
Type(): MdGe.MxKindOfInteractive;
|
|
7772
|
+
Shape(): MdGeShape;
|
|
7773
|
+
SetShape(theShape: MdGeShape): void;
|
|
7774
|
+
SetTypeOfHLR(theTypeOfHLR: MdGe.MxPrs3dTypeOfHLR): void;
|
|
7775
|
+
TypeOfHLR(): MdGe.MxPrs3dTypeOfHLR;
|
|
7776
|
+
SetColor(theColor: MdGeColor): void;
|
|
7777
|
+
UnsetColor(): void;
|
|
7778
|
+
SetWidth(aValue: number): void;
|
|
7779
|
+
UnsetWidth(): number;
|
|
7780
|
+
SetMaterial(aName: MdGeMaterialAspect): void;
|
|
7781
|
+
UnsetMaterial(): void;
|
|
7782
|
+
SetTransparency(aValue: number): void;
|
|
7783
|
+
UnsetTransparency(): void;
|
|
7784
|
+
BoundingBox(): MdGeBndBox;
|
|
7785
|
+
GetColor(): MdGeColor;
|
|
7786
|
+
Material(): MdGe.MxNameOfMaterial;
|
|
7787
|
+
Transparency(): number;
|
|
7788
|
+
}
|
|
7789
|
+
export declare class MdGeBndBox extends MdGeObject {
|
|
7790
|
+
constructor(theMin?: MdGePoint | object, theMax?: MdGePoint);
|
|
7791
|
+
SetWhole(): void;
|
|
7792
|
+
SetVoid(): void;
|
|
7793
|
+
Set(P: MdGePoint, D: MdGeDir): void;
|
|
7794
|
+
Update(aXmin: number, aYmin: number, aZmin: number, aXmax: number, aYmax: number, aZmax: number): void;
|
|
7795
|
+
GetGap(): number;
|
|
7796
|
+
SetGap(Tol: number): void;
|
|
7797
|
+
Enlarge(Tol: number): void;
|
|
7798
|
+
CornerMin(): MdGePoint;
|
|
7799
|
+
CornerMax(): MdGePoint;
|
|
7800
|
+
OpenXmin(): void;
|
|
7801
|
+
OpenXmax(): void;
|
|
7802
|
+
OpenYmin(): void;
|
|
7803
|
+
OpenYmax(): void;
|
|
7804
|
+
OpenZmin(): void;
|
|
7805
|
+
OpenZmax(): void;
|
|
7806
|
+
IsOpen(): boolean;
|
|
7807
|
+
IsOpenXmin(): boolean;
|
|
7808
|
+
IsOpenXmax(): boolean;
|
|
7809
|
+
IsOpenYmin(): boolean;
|
|
7810
|
+
IsOpenYmax(): boolean;
|
|
7811
|
+
IsOpenZmin(): boolean;
|
|
7812
|
+
IsOpenZmax(): boolean;
|
|
7813
|
+
IsWhole(): boolean;
|
|
7814
|
+
IsVoid(): boolean;
|
|
7815
|
+
IsXThin(tol: number): boolean;
|
|
7816
|
+
IsYThin(tol: number): boolean;
|
|
7817
|
+
IsZThin(tol: number): boolean;
|
|
7818
|
+
IsThin(tol: number): boolean;
|
|
7819
|
+
Transformed(T: MdGeTrsf): MdGeBndBox;
|
|
7820
|
+
AddBndBox(Other: MdGeBndBox): void;
|
|
7821
|
+
AddPoint(P: MdGePoint): void;
|
|
7822
|
+
AddPointDir(P: MdGePoint, D: MdGeDir): void;
|
|
7823
|
+
AddDir(D: MdGeDir): void;
|
|
7824
|
+
IsOutPoint(P: MdGePoint): boolean;
|
|
7825
|
+
IsOutLine(L: MdGeLine): boolean;
|
|
7826
|
+
IsOutPlane(P: MdGePlane): boolean;
|
|
7827
|
+
IsOutBndBox(Other: MdGeBndBox, T?: MdGeTrsf): boolean;
|
|
7828
|
+
IsOutTBT(T1: MdGeTrsf, Other: MdGeBndBox, T2: MdGeTrsf): boolean;
|
|
7829
|
+
IsOutPPD(P1: MdGePoint, P2: MdGePoint, D: MdGeDir): boolean;
|
|
7830
|
+
Distance(Other: MdGeBndBox): number;
|
|
7831
|
+
SquareExtent(): number;
|
|
7832
|
+
FinitePart(): MdGeBndBox;
|
|
7833
|
+
HasFinitePart(): boolean;
|
|
7834
|
+
}
|
|
7835
|
+
export declare class MdGeAisTexturedShape extends MdGeAisObject {
|
|
7836
|
+
constructor(mshap: MdGeShape | object);
|
|
7837
|
+
SetTextureFileName(theTextureFileName: string): void;
|
|
7838
|
+
TextureMapState(): boolean;
|
|
7839
|
+
SetTextureMapOn(): void;
|
|
7840
|
+
SetTextureMapOff(): void;
|
|
7841
|
+
TextureFile(): string;
|
|
7842
|
+
UpdateAttributes(): void;
|
|
7843
|
+
SetColor(theColor: MdGeColor): void;
|
|
7844
|
+
UnsetColor(): void;
|
|
7845
|
+
SetMaterial(theAspect: MdGeMaterialAspect): void;
|
|
7846
|
+
UnsetMaterial(): void;
|
|
7847
|
+
EnableTextureModulate(): void;
|
|
7848
|
+
DisableTextureModulate(): void;
|
|
7849
|
+
TextureRepeat(): boolean;
|
|
7850
|
+
URepeat(): number;
|
|
7851
|
+
VRepeat(): number;
|
|
7852
|
+
SetTextureRepeat(theToRepeat: boolean, theURepeat: number, theVRepeat: number): void;
|
|
7853
|
+
TextureOrigin(): boolean;
|
|
7854
|
+
TextureUOrigin(): number;
|
|
7855
|
+
TextureVOrigin(): number;
|
|
7856
|
+
SetTextureOrigin(theToSetTextureOrigin: boolean, theUOrigin: number, theVOrigin: number): void;
|
|
7857
|
+
TextureScale(): boolean;
|
|
7858
|
+
TextureScaleU(): number;
|
|
7859
|
+
TextureScaleV(): number;
|
|
7860
|
+
SetTextureScale(theToSetTextureScale: boolean, theScaleU: number, theScaleV: number): void;
|
|
7861
|
+
IsShowTriangles(): boolean;
|
|
7862
|
+
SetShowTriangles(theToShowTriangles: boolean): void;
|
|
7863
|
+
TextureModulate(): boolean;
|
|
7864
|
+
}
|
|
7366
7865
|
export declare function loadMxCADassembly3d(config: MxDraw3dConfig, call?: (mxDraw3d: MxDraw3d) => void): Promise<MxDraw3d>;
|
|
7367
7866
|
|
|
7368
7867
|
export {};
|