mxcad 1.0.228 → 1.0.230

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 CHANGED
@@ -371,17 +371,6 @@ export declare class McObjectId {
371
371
  * ```
372
372
  */
373
373
  getMcDbDimension(): McDbDimension | null;
374
- /**
375
- * 同步自定义实体
376
- * @example
377
- * ```ts
378
- * import { McObjectId } from "mxcad";
379
- *
380
- * let objId = new McObjectId();
381
- * objId.syncMcDbCustomEntity();
382
- * ```
383
- */
384
- syncMcDbCustomEntity(): void;
385
374
  /**
386
375
  * 获取自定义实体
387
376
  * @example
@@ -468,8 +457,6 @@ export declare class McDbObject extends McRxObject {
468
457
  * @example
469
458
  * ```ts
470
459
  * import { McDbObject } from "mxcad";
471
- *
472
- * const obj = new McDbObject();
473
460
  * const id = obj.getObjectID();
474
461
  * ```
475
462
  */
@@ -603,15 +590,14 @@ export declare class McDbObject extends McRxObject {
603
590
  */
604
591
  getGripPoints(): McGePoint3dArray;
605
592
  /**
606
- * 与对象相关的临时关系数
607
- */
593
+ * @internal
594
+ * MxCAD辅助,内部使用
595
+ * ```
596
+ */
608
597
  tempRelationObject(): number;
609
598
  /**
610
- * 释放临时关系对象
611
- * @example
612
- * ```ts
613
- * //假设obj为一个数据库对象
614
- * obj.freeTempRelationObject();
599
+ * @internal
600
+ * MxCAD辅助,内部使用
615
601
  * ```
616
602
  */
617
603
  freeTempRelationObject(): void;
@@ -12901,7 +12887,17 @@ export declare abstract class McDbCustomEntity extends McDbEntity {
12901
12887
  clone(): McDbObject | null;
12902
12888
  /** js 对像的数据与McDbCustomEntity::m_mapData的同步。 */
12903
12889
  syncData(toCpp?: boolean): boolean;
12890
+ /**
12891
+ * @internal
12892
+ * MxCAD辅助,内部使用
12893
+ * ```
12894
+ */
12904
12895
  tempRelationObject(): number;
12896
+ /**
12897
+ * @internal
12898
+ * MxCAD辅助,内部使用
12899
+ * ```
12900
+ */
12905
12901
  freeTempRelationObject(): void;
12906
12902
  protected assertWrite(autoUndo?: boolean): void;
12907
12903
  /**
@@ -13157,6 +13153,8 @@ export interface MxCadConfig {
13157
13153
  enableIntelliSelect?: boolean;
13158
13154
  /**是否启用浏览模式,默认是编辑模式 */
13159
13155
  browse?: boolean;
13156
+ /**是否使用webgl1方式启动 */
13157
+ webgl1?: boolean;
13160
13158
  }
13161
13159
  /** 创建MxCad实例
13162
13160
  * @param config 参数配置
@@ -17068,6 +17066,17 @@ export declare class MxApp3DType extends PubSub<{
17068
17066
  cpp_app: any;
17069
17067
  tool: any;
17070
17068
  globalMethods: any;
17069
+ /**
17070
+ * 为当前应用程序创建一个视图
17071
+ * @param theCanvasSelector canvas的CSS选择器字符串
17072
+ * @returns 返回一个视图对象
17073
+ */
17074
+ createView(theCanvasSelector: string): Mx3dView;
17075
+ /**
17076
+ * 获取当前视图对象
17077
+ * @returns 返回当前的视图对象
17078
+ */
17079
+ getCurrentActiveView(): Mx3dView;
17071
17080
  }
17072
17081
  export declare let MxApp3D: MxApp3DType;
17073
17082
  export interface MxCAD3DConfig {
@@ -17102,6 +17111,9 @@ export declare class MxCAD3DObject {
17102
17111
  * @param theUpdateView 移除后是否立即更新视图
17103
17112
  */
17104
17113
  removeAll(theUpdateView?: boolean): void;
17114
+ /**
17115
+ * 移除选中
17116
+ */
17105
17117
  removeSelected(): void;
17106
17118
  /**
17107
17119
  * 更新显示
@@ -19003,35 +19015,154 @@ export declare class Mx3dDbObject extends Mx3dBaseObject {
19003
19015
  constructor(p?: object);
19004
19016
  }
19005
19017
  export declare class Mx3dView extends Mx3dBaseObject {
19018
+ /**
19019
+ * @internal
19020
+ */
19006
19021
  constructor(p: object);
19007
- getDoc(): Mx3dDbDocument;
19022
+ /**
19023
+ * 获取当前文档视图对象的文档
19024
+ * @returns 返回文档对象
19025
+ */
19026
+ getDocument(): Mx3dDbDocument;
19027
+ /**
19028
+ * 移除所有
19029
+ * @param theUpdateView 移除后是否立即更新视图
19030
+ */
19008
19031
  removeAll(theUpdateView?: boolean): void;
19032
+ /**
19033
+ * 移除选中
19034
+ */
19009
19035
  removeSelected(): void;
19010
- update(isUpAllData: boolean, isRemoveAll?: boolean): void;
19036
+ /**
19037
+ * 更新显示
19038
+ * @param isUpAllData 是否更新所有数据
19039
+ * @param isRemoveAll 是否首先移除所有数据
19040
+ */
19041
+ update(isUpAllData?: boolean, isRemoveAll?: boolean): void;
19042
+ /**
19043
+ * 设置视图投影模式
19044
+ * @param theProjection 投影模式
19045
+ */
19011
19046
  setProjectionType(theProjection: MdGe.MxCameraProjection): void;
19047
+ /**
19048
+ * 显示中心坐标轴
19049
+ * @param theToShow true显示,false不显示
19050
+ */
19012
19051
  showCenterTrihedron(theToShow: boolean): void;
19052
+ /**
19053
+ * 视图中的所有对象缩放至适应整个视图
19054
+ * @param theAuto 自动缩放
19055
+ */
19013
19056
  fitAllObjects(theAuto: boolean): void;
19057
+ /**
19058
+ * 开启/关闭X轴剖切面
19059
+ * @param theToEnabled 是否开启X轴剖切面
19060
+ */
19014
19061
  enableXClipPlane(theToEnabled: boolean): void;
19062
+ /**
19063
+ * 设置X轴剖切面的位置
19064
+ * @param thePosition 剖切平面相对于世界坐标系原点的位置
19065
+ */
19015
19066
  setXClipPlaneXPosition(thePosition: number): void;
19067
+ /**
19068
+ * 翻转X轴剖切面
19069
+ */
19016
19070
  setXClipPlaneReverse(): void;
19071
+ /**
19072
+ * 开启/关闭Y轴剖切面
19073
+ * @param theToEnabled 是否开启Y轴剖切面
19074
+ */
19017
19075
  enableYClipPlane(theToEnabled: boolean): void;
19076
+ /**
19077
+ * 设置Y轴剖切面的位置
19078
+ * @param thePosition 剖切平面相对于世界坐标系原点的位置
19079
+ */
19018
19080
  setYClipPlaneYPosition(thePosition: number): void;
19081
+ /**
19082
+ * 翻转Y轴剖切面
19083
+ */
19019
19084
  setYClipPlaneReverse(): void;
19085
+ /**
19086
+ * 开启/关闭Z轴剖切面
19087
+ * @param theToEnabled 是否开启Z轴剖切面
19088
+ */
19020
19089
  enableZClipPlane(theToEnabled: boolean): void;
19090
+ /**
19091
+ * 设置Z轴剖切面的位置
19092
+ * @param thePosition 剖切平面相对于世界坐标系原点的位置
19093
+ */
19021
19094
  setZClipPlaneZPosition(thePosition: number): void;
19095
+ /**
19096
+ * 翻转Z轴剖切面
19097
+ */
19022
19098
  setZClipPlaneReverse(): void;
19099
+ /**
19100
+ * 开启/关闭用户自定义剖切面
19101
+ * @param theToEnabled 是否开启用户自定义剖切面
19102
+ */
19023
19103
  enableCustomClipPlane(theToEnabled: boolean): void;
19104
+ /**
19105
+ * 设置用户自定义剖切面的位置
19106
+ * @param thePosition 剖切平面相对于世界坐标系原点的位置
19107
+ */
19024
19108
  setCustomClipPlanePosition(thePosition: number): void;
19109
+ /**
19110
+ * 翻转用户自定义剖切面
19111
+ */
19025
19112
  setCustomClipPlaneReverse(): void;
19113
+ /**
19114
+ * 设置用户自定义剖切面的法向
19115
+ * @param x 法向的x分量
19116
+ * @param y 法向的y分量
19117
+ * @param z 法向的z分量
19118
+ */
19026
19119
  setCustomClipPlaneDirection(x: number, y: number, z: number): void;
19120
+ /**
19121
+ * 显示文字符号
19122
+ * @param theSymbol 文字符号对象
19123
+ */
19027
19124
  displaySymbolText(theSymbol: Mx3dSymbolText): void;
19125
+ /**
19126
+ * 显示标注符号
19127
+ * @param theDimension 标注符号对象
19128
+ */
19028
19129
  displayDimension(theDimension: Mx3dDimObject): void;
19130
+ /**
19131
+ * 为当前选中对象设置纹理贴图
19132
+ * @param theFileName 图片在文件系统中的完整路径
19133
+ */
19029
19134
  addModelTexture(theFileName: string): void;
19135
+ /**
19136
+ * 移除当前选择对象的纹理贴图
19137
+ */
19030
19138
  removeModelTexture(): void;
19139
+ /**
19140
+ * 设置渐变背景色
19141
+ * @param theColor1 颜色对象1
19142
+ * @param theColor2 颜色对象2
19143
+ * @param theMethod 渐变方式
19144
+ */
19031
19145
  setGradientBgColor(theColor1: Mx3dGeColor, theColor2: Mx3dGeColor, theMethod: MdGe.MxGradientFillMethod): void;
19146
+ /**
19147
+ * 设置视图方向
19148
+ * @param theOrientation 视图方向
19149
+ * @param theIsYup 是否Y轴向上
19150
+ */
19032
19151
  setProj(theOrientation: MdGe.MxV3dTypeOfOrientation, theIsYup: boolean): void;
19152
+ /**
19153
+ * 设置当前选中对象的颜色
19154
+ * @param color 颜色
19155
+ */
19033
19156
  setSelectedColor(color: Mx3dGeColor): void;
19157
+ /**
19158
+ * 设置选中对象的材质
19159
+ * @param material 材质
19160
+ */
19034
19161
  setSelectedMaterial(material: Mx3dGeMaterial): void;
19162
+ /**
19163
+ * 设置当前的显示模式
19164
+ * @param theMode 显示模式
19165
+ */
19035
19166
  setDisplayMode(theMode: MdGe.MxGlobalDisplayMode): void;
19036
19167
  }
19037
19168
  /**
@@ -19744,6 +19875,7 @@ export declare class Mx3dDbDocument extends Mx3dDbObject {
19744
19875
  * @returns 返回一个 Promise,解析结果为布尔值,表示成功或失败。
19745
19876
  */
19746
19877
  read(theFile: File, theFormat: MdGe.MxFormat): Promise<boolean>;
19878
+ readFile(theFilePath: string, theFormat: MdGe.MxFormat): void;
19747
19879
  /**
19748
19880
  * 获取访问入口标签。
19749
19881
  * @returns 返回访问入口标签对象。