@manycore/custom-sdk 1.0.1-rc.8 → 1.0.1-rc.9

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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ELineType as ELineType_2 } from '@manycore/custom-miniapp-sdk';
2
2
  import { IExportModelData } from '@manycore/custom-miniapp-sdk';
3
+ import { IParamModelPhotoResponse } from '@manycore/custom-miniapp-sdk';
3
4
  import { Number3 } from '@manycore/custom-miniapp-sdk';
4
5
 
5
6
  /**
@@ -572,6 +573,67 @@ export declare class FittingDesignService extends BaseService {
572
573
  lines: ILineData[];
573
574
  }
574
575
 
576
+ /**
577
+ * 颜色配置信息
578
+ *
579
+ * @example
580
+ * ```json
581
+ * {
582
+ * "color": "#234432",
583
+ * "opacity": 0.8
584
+ * }
585
+ * ```
586
+ */
587
+ export declare interface IHintBase {
588
+ /**
589
+ * 颜色,以#开头,16进制
590
+ *
591
+ * @example
592
+ * ```
593
+ * #FFB6C1
594
+ * ```
595
+ */
596
+ color: string;
597
+ /**
598
+ * 透明度,范围为 0~1 ;当为1时,表示不透明;为0时,表示为全透明
599
+ */
600
+ opacity: number;
601
+ }
602
+
603
+ /**
604
+ * 配置默认的高亮配置信息
605
+ */
606
+ export declare interface IHintPlank {
607
+ /**
608
+ * 边框高亮颜色
609
+ */
610
+ hintOutline?: boolean | IHintBase;
611
+ /**
612
+ * 高亮的板面信息
613
+ */
614
+ hintPlankFace?: Array<IHintPlankFace | Omit<IHintPlankFace, keyof IHintBase>>;
615
+ }
616
+
617
+ /**
618
+ * 板面配置信息
619
+ *
620
+ * @example
621
+ * ```json
622
+ * {
623
+ * "color": "#234432",
624
+ * "opacity": 0.8,
625
+ * "plankFaceId": 1
626
+ * }
627
+ * ```
628
+ */
629
+ export declare interface IHintPlankFace extends IHintBase {
630
+ /**
631
+ * 需要展示的该信息的板面
632
+ * 支持多个板面ID或单个
633
+ */
634
+ plankFaceId: number | number[];
635
+ }
636
+
575
637
  export declare interface IHoleData extends IBaseHoleGrooveData {
576
638
  /**
577
639
  * 孔直径
@@ -635,6 +697,73 @@ export declare class FittingDesignService extends BaseService {
635
697
  radius: number;
636
698
  }
637
699
 
700
+ /**
701
+ * 模型高亮默认配置信息
702
+ * @example
703
+ * ```json
704
+ * {
705
+ * "outline": {
706
+ * "color": "#234432",
707
+ * "opacity": 0.8,
708
+ * },
709
+ * "plankFace":{
710
+ * "color": "#234432",
711
+ * "opacity": 0.8,
712
+ * }
713
+ * }
714
+ * ```
715
+ */
716
+ export declare interface IModelDefaultHintOption {
717
+ /**
718
+ * 模型轮廓高亮信息
719
+ */
720
+ outline?: IHintBase;
721
+ /**
722
+ * 板面高亮配置信息
723
+ */
724
+ plankFace?: IHintBase;
725
+ }
726
+
727
+ /**
728
+ * 设置模型高亮时的配置信息
729
+ * @example
730
+ * ```typescript
731
+ * {
732
+ * "89D2793C-2B23-41A9-BA6E-4E3908490057": {
733
+ * // 使用默认的高亮配置信息
734
+ * "hintBorder": true,
735
+ * // 板件高亮
736
+ * "hintPlankFace": [
737
+ * {
738
+ * "color": "#234432",
739
+ * "opacity": 0.8,
740
+ * // 仅单个板面
741
+ * "plankFaceId": 1
742
+ * },
743
+ * {
744
+ * "color": "#233242",
745
+ * "opacity": 0.8,
746
+ * // 多个板面
747
+ * "plankFaceId": [2, 4]
748
+ * },
749
+ * // 使用默认颜色
750
+ * {
751
+ * "plankFaceId": 3
752
+ * }
753
+ * ]
754
+ * },
755
+ * "89D2793C-2B23-41A9-BA6E-4E3FS8490057": {
756
+ * // 自定议高亮配置信息
757
+ * "hintBorder": {
758
+ * "color": "#234432",
759
+ * "opacity": 0.8
760
+ * }
761
+ * }
762
+ * }
763
+ * ```
764
+ */
765
+ export declare type IModelHintOption = Record<string, IHintPlank>;
766
+
638
767
  /**
639
768
  * 获取交接信息
640
769
  *
@@ -671,6 +800,8 @@ export declare class FittingDesignService extends BaseService {
671
800
  toggleModelViewedIntersected(option?: IToggleIntersectedViewOption): void;
672
801
  }
673
802
 
803
+ export { IParamModelPhotoResponse }
804
+
674
805
  /**
675
806
  * 点的基本类型
676
807
  */
@@ -921,6 +1052,85 @@ export declare class FittingDesignService extends BaseService {
921
1052
  pageNum?: number;
922
1053
  }
923
1054
 
1055
+ /**
1056
+ * 配置板件特殊标识
1057
+ *
1058
+ * @example
1059
+ * ```typescript
1060
+ * const modelHintService = application.getService(ModelHintService);
1061
+ * ```
1062
+ */
1063
+ export declare class ModelHintService extends BaseService {
1064
+ /**
1065
+ * 设置板件标识的特殊颜色
1066
+ * @example
1067
+ * modelHintService.setDefaultHint({
1068
+ * "outline": {
1069
+ * "color": "#234432",
1070
+ * "opacity": 0.8,
1071
+ * },
1072
+ * "plankFace":{
1073
+ * "color": "#234432",
1074
+ * "opacity": 0.8,
1075
+ * }
1076
+ * });
1077
+ */
1078
+ setDefaultHint(option: IModelDefaultHintOption): void;
1079
+ /**
1080
+ * 设置模型高亮
1081
+ *
1082
+ * @example
1083
+ * ```typescript
1084
+ * modelHintService.setModelHint({
1085
+ * "89D2793C-2B23-41A9-BA6E-4E3908490057": {
1086
+ * // 使用默认的标识信息
1087
+ * "hintBorder": true,
1088
+ * // 板件高亮
1089
+ * "hintPlankFace": [
1090
+ * {
1091
+ * "color": "#234432",
1092
+ * "opacity": 0.8,
1093
+ * // 仅单个板面
1094
+ * "plankFaceId": 1
1095
+ * },
1096
+ * {
1097
+ * "color": "#233242",
1098
+ * "opacity": 0.8,
1099
+ * // 多个板面
1100
+ * "plankFaceId": [2, 4]
1101
+ * },
1102
+ * // 使用默认颜色配置
1103
+ * {
1104
+ * "plankFaceId": 1
1105
+ * },
1106
+ * ]
1107
+ * },
1108
+ * "89D2793C-2B23-41A9-BA6E-4E3FS8490057": {
1109
+ * // 自定议标识颜色
1110
+ * "hintBorder": {
1111
+ * "color": "#234432",
1112
+ * "opacity": 0.8
1113
+ * }
1114
+ * }
1115
+ * })
1116
+ * ```
1117
+ */
1118
+ setModelHint(config: IModelHintOption): void;
1119
+ /**
1120
+ * 清空当前已经配置的标识信息
1121
+ *
1122
+ * 当id不传时,清空所有,当id传入部分时,则清除对应的内容
1123
+ *
1124
+ * @example
1125
+ * ```typescript
1126
+ * modelHintService.clearModelHint()
1127
+ * ```
1128
+ *
1129
+ * @param id 待删除标识信息的ID
1130
+ */
1131
+ clearModelHint(id?: string[]): void;
1132
+ }
1133
+
924
1134
  /**
925
1135
  * 主要提供了获取当前模型的 JSON 输出数据,以及当前模型的交接信息的功能。
926
1136
  *
@@ -975,6 +1185,12 @@ export declare class FittingDesignService extends BaseService {
975
1185
  * @param options
976
1186
  */
977
1187
  getTopParamModels(options?: ITopParamModelListOption): Promise<ITopParamModelDataResponse>;
1188
+ /**
1189
+ * 获取模型缩略图信息
1190
+ * @param modelId
1191
+ * @returns 模型缩略图信息
1192
+ */
1193
+ getParamModelPhotoById(modelId: string | string[]): Promise<IParamModelPhotoResponse[]>;
978
1194
  }
979
1195
 
980
1196
  /**