mxcad 1.0.97 → 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 CHANGED
@@ -3286,7 +3286,7 @@ export interface MxDraw3d extends WasmConfig {
3286
3286
  * */
3287
3287
  openFromUrl: (name: string, fileUrl: string) => void;
3288
3288
  /** 加载贴图图片 */
3289
- loadTextureImg: (fileUrl: string) => void;
3289
+ loadTextureImg: (fileUrl: string, fileName: string) => void;
3290
3290
  /** 设置多维数据集贴图背景 */
3291
3291
  setCubemapBackground(url: string): void;
3292
3292
  /** 完成初始化 */
@@ -3318,7 +3318,7 @@ export interface MxDraw3d extends WasmConfig {
3318
3318
  /** 表示一个点 */
3319
3319
  MdGePoint: typeof MdGePoint;
3320
3320
  /** 表示一个向量 */
3321
- MdGeVect: typeof MdGeVec;
3321
+ MdGeVec: typeof MdGeVec;
3322
3322
  /** 表示一个Wire形状 */
3323
3323
  MdGeWire: typeof MdGeWire;
3324
3324
  /** 表示一个Edge形状 */
@@ -3466,6 +3466,18 @@ export interface MxDraw3d extends WasmConfig {
3466
3466
  MdGeColor: typeof MdGeColor;
3467
3467
  /** 表示材质 */
3468
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;
3469
3481
  }
3470
3482
  /**
3471
3483
  * 所有类的父类, 除去MdGeTopo以及MdGeBrep
@@ -3489,9 +3501,37 @@ export declare class MdGeShape extends MdGeObject {
3489
3501
  Common(other: MdGeShape): MdGeShape;
3490
3502
  Section(other: MdGeShape): MdGeShape;
3491
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;
3492
3520
  SetTextureFileName(path: string): void;
3493
3521
  SetMaterialAspect(material: MdGeMaterialAspect): void;
3494
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;
3495
3535
  IsNull(): boolean;
3496
3536
  Draw(): void;
3497
3537
  }
@@ -3500,7 +3540,6 @@ export declare class MdGeShape extends MdGeObject {
3500
3540
  */
3501
3541
  export declare class MdGeVertex extends MdGeShape {
3502
3542
  constructor(p1?: object | number, p2?: number, p3?: number);
3503
- Draw(): void;
3504
3543
  }
3505
3544
  /**
3506
3545
  * 表示一个Edge形状
@@ -3510,7 +3549,6 @@ export declare class MdGeEdge extends MdGeShape {
3510
3549
  Wire(): MdGeWire;
3511
3550
  AddedEdge(edge: MdGeEdge): MdGeWire;
3512
3551
  AddedWire(wire: MdGeWire): MdGeWire;
3513
- Draw(): void;
3514
3552
  }
3515
3553
  /**
3516
3554
  * 表示一个Wire形状
@@ -3519,42 +3557,36 @@ export declare class MdGeWire extends MdGeShape {
3519
3557
  constructor(p?: object);
3520
3558
  AddedEdge(edge: MdGeEdge): MdGeWire;
3521
3559
  AddedWire(wire: MdGeWire): MdGeWire;
3522
- Draw(): void;
3523
3560
  }
3524
3561
  /**
3525
3562
  * 表示一个Face形状
3526
3563
  */
3527
3564
  export declare class MdGeFace extends MdGeShape {
3528
3565
  constructor(p?: object);
3529
- Draw(): void;
3530
3566
  }
3531
3567
  /**
3532
3568
  * 表示一个Shell形状
3533
3569
  */
3534
3570
  export declare class MdGeShell extends MdGeShape {
3535
3571
  constructor(p?: object);
3536
- Draw(): void;
3537
3572
  }
3538
3573
  /**
3539
3574
  * 表示一个Solid形状
3540
3575
  */
3541
3576
  export declare class MdGeSolid extends MdGeShape {
3542
3577
  constructor(p?: object);
3543
- Draw(): void;
3544
3578
  }
3545
3579
  /**
3546
3580
  * 表示一个CompSolid形状
3547
3581
  */
3548
3582
  export declare class MdGeCompSolid extends MdGeShape {
3549
3583
  constructor(p?: object);
3550
- Draw(): void;
3551
3584
  }
3552
3585
  /**
3553
3586
  * 表示一个Compound形状
3554
3587
  */
3555
3588
  export declare class MdGeCompound extends MdGeShape {
3556
3589
  constructor(p?: object);
3557
- Draw(): void;
3558
3590
  }
3559
3591
  /**
3560
3592
  * 表示一个矩阵。
@@ -5073,6 +5105,12 @@ export declare namespace MdGe {
5073
5105
  DM_WireFrame = 0,
5074
5106
  DM_Shaded = 1
5075
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
+ }
5076
5114
  }
5077
5115
  /**
5078
5116
  * 表示拓扑元素遍历
@@ -5867,6 +5905,9 @@ export declare class MdGeBRep {
5867
5905
  Pnt(V: MdGeVertex): MdGePoint;
5868
5906
  Parameter(V: MdGeVertex, E: MdGeEdge, F?: MdGeFace): number;
5869
5907
  MaxTolerance(theShape: MdGeShape, theSubShape: MdGe.MxShapeEnum): number;
5908
+ openBrepFromUrl(theModelPath: string): MdGeShape;
5909
+ RemoveAllLights(): void;
5910
+ AddLight(theLight: MdGeLight): void;
5870
5911
  }
5871
5912
  /**
5872
5913
  * 表示颜色
@@ -5933,6 +5974,103 @@ export declare class MdGeMaterialAspect extends MdGeObject {
5933
5974
  IsDifferent(theOther: MdGeMaterialAspect): boolean;
5934
5975
  IsEqual(theOther: MdGeMaterialAspect): boolean;
5935
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
+ }
5936
6074
  export declare function loadMxCADassembly3d(config: MxDraw3dConfig, call?: (mxDraw3d: MxDraw3d) => void): Promise<MxDraw3d>;
5937
6075
 
5938
6076
  export {};