mxcad 1.0.114 → 1.0.115

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
@@ -3177,6 +3177,14 @@ export declare class McObject {
3177
3177
  * 当前程序是否是试用版本.
3178
3178
  */
3179
3179
  isTryVersion(): boolean;
3180
+ /**
3181
+ * 设置视区的背景色.
3182
+ */
3183
+ setViewBackgroundColor(red: number, green: number, blue: number): void;
3184
+ /**
3185
+ * 返回当前数据库中设置的绘制颜色,它会自动依据背景色,把黑白色转换。
3186
+ */
3187
+ getCurrentDatabaseDrawColor(): THREE.Color;
3180
3188
  }
3181
3189
  /**
3182
3190
  * McAppType 类,提供了 MxCAD 的一些基本操作。
@@ -3220,6 +3228,10 @@ export declare class McAppType {
3220
3228
  */
3221
3229
  mcedRGB2Index(red: number, green: number, blue: number, bAutoNearest?: boolean): number;
3222
3230
  /**
3231
+ * 设置默认的视区的背景色.
3232
+ */
3233
+ setDefaultViewBackgroundColor(red: number, green: number, blue: number): void;
3234
+ /**
3223
3235
  * 判断一个对象id是否指类类型名对象
3224
3236
  */
3225
3237
  objectIdIsKindOf(lIdIndex: number, className: string): boolean;
@@ -3360,6 +3372,12 @@ export interface MxCadConfig {
3360
3372
  registdata?: string;
3361
3373
  /**注册文件 */
3362
3374
  registfile?: string;
3375
+ /**视区背景颜色 */
3376
+ viewBackgroundColor?: {
3377
+ red: number;
3378
+ green: number;
3379
+ blue: number;
3380
+ };
3363
3381
  }
3364
3382
  /** 创建MxCad实例
3365
3383
  * @example
@@ -3566,6 +3584,18 @@ export interface MxDraw3d extends WasmConfig {
3566
3584
  * @param fileUrl 文件路径
3567
3585
  * */
3568
3586
  openFromUrl: (name: string, fileUrl: string) => void;
3587
+ /** 获取视图宽度 */
3588
+ getViewWidth: () => number;
3589
+ /** 获取视图高度 */
3590
+ getViewHeight: () => number;
3591
+ /** 获取视图缩放比例 */
3592
+ getViewScale: () => number;
3593
+ /** 获取视图中鼠标X位置 */
3594
+ getViewCursorX: () => number;
3595
+ /** 获取视图中鼠标Y位置 */
3596
+ getViewCursorY: () => number;
3597
+ /** 删除选中实体 */
3598
+ removeSelectedObjects: () => void;
3569
3599
  /** 加载贴图图片 */
3570
3600
  loadTextureImg: (fileUrl: string, fileName: string) => void;
3571
3601
  /** 适应选中的对象 */
@@ -6247,6 +6277,7 @@ export declare class MdGeBRep {
6247
6277
  openObjFromUrl(theModelPath: string): MdGeShape;
6248
6278
  openGltfFromUrl(theModelPath: string): MdGeShape;
6249
6279
  openVrmlFromUrl(theModelPath: string): MdGeShape;
6280
+ openStepFromUrlByOCAF(theModelPath: string): void;
6250
6281
  RemoveAllLights(): void;
6251
6282
  AddLight(theLight: MdGeLight): void;
6252
6283
  EnableAllLights(): void;
@@ -6262,6 +6293,10 @@ export declare class MdGeBRep {
6262
6293
  SetLightOff(theName: string): boolean;
6263
6294
  SetProjectionType(theProjection: MdGe.MxCameraProjection): void;
6264
6295
  SetProj(theOrientation: MdGe.MxV3dTypeOfOrientation, theIsYup: boolean): void;
6296
+ ChangeSelectedColor(color: MdGeColor): void;
6297
+ AddModelTexture(theFileName: string): void;
6298
+ RemoveModelTexture(): void;
6299
+ ChangeSelectedMaterial(material: MdGeMaterialAspect): void;
6265
6300
  }
6266
6301
  /**
6267
6302
  * 表示颜色