vjcad 1.0.10 → 1.0.12
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/types.d.ts +24 -19
- package/dist/vjcad-lib.umd.js +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -6310,31 +6310,35 @@ declare class LineDrawer {
|
|
|
6310
6310
|
*/
|
|
6311
6311
|
getMaxSegmentLimit(): number;
|
|
6312
6312
|
/**
|
|
6313
|
-
*
|
|
6314
|
-
*
|
|
6315
|
-
*
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
*
|
|
6322
|
-
*
|
|
6323
|
-
*
|
|
6313
|
+
* 按"沿路径累计相位"绘制自定义线型(dash / 间隙 / 点 / 文字 / 形状)。
|
|
6314
|
+
*
|
|
6315
|
+
* 关键修复:旧实现按单条线段独立计算相位,且当线段短于一个完整线型周期时
|
|
6316
|
+
* 整段回退为实线(completeCycles === 0 → cadLineTo_Continuous),导致被细分为
|
|
6317
|
+
* 大量短段的曲线(如 bulge 多段线)虚线被画成实线、线型中的符号(▲/文字)几乎
|
|
6318
|
+
* 全部丢失。这里改为读取/写回 this.gr.linetypePhase 让相位跨段连续累计,
|
|
6319
|
+
* 只绘制落在当前线段内的那部分图案,且不再因单段过短而回退实线。
|
|
6320
|
+
*
|
|
6321
|
+
* 简单线型与复杂线型统一在此处理:DASH/GAP 推进相位,DOT/像素点/文字/形状
|
|
6322
|
+
* 为 0 长度符号、绘制在当前累计位置且不推进相位。
|
|
6323
|
+
*
|
|
6324
|
+
* @param definition - 线型定义(含 elements)
|
|
6325
|
+
* @param endPoint - 当前线段终点(起点为 this.gr.currentPoint)
|
|
6324
6326
|
*/
|
|
6325
|
-
|
|
6327
|
+
drawLinetypePatternTo(definition: {
|
|
6326
6328
|
elements: Array<{
|
|
6327
6329
|
type: string;
|
|
6328
6330
|
length: number;
|
|
6329
|
-
scale?: number;
|
|
6330
|
-
xOffset?: number;
|
|
6331
|
-
yOffset?: number;
|
|
6332
|
-
rotation?: number;
|
|
6333
|
-
rotationMode?: string;
|
|
6334
|
-
text?: string;
|
|
6335
|
-
style?: string;
|
|
6336
6331
|
}>;
|
|
6337
6332
|
}, endPoint: Point2D$1): void;
|
|
6333
|
+
/**
|
|
6334
|
+
* 绘制线型中的 0 长度符号元素(点 / 像素点 / 文字 / 形状)。
|
|
6335
|
+
* @param element - 符号元素
|
|
6336
|
+
* @param lineStart - 线段起点
|
|
6337
|
+
* @param lineAngle - 线段角度(弧度)
|
|
6338
|
+
* @param distanceAlong - 符号在线段上距起点的距离
|
|
6339
|
+
* @param ltscale - 线型比例
|
|
6340
|
+
*/
|
|
6341
|
+
emitLinetypeSymbol(element: any, lineStart: Point2D$1, lineAngle: number, distanceAlong: number, ltscale: number): void;
|
|
6338
6342
|
/**
|
|
6339
6343
|
* 计算文字旋转角度
|
|
6340
6344
|
* @param {string} rotationMode - 旋转模式 (U=正立, R=相对, A=绝对)
|
|
@@ -6564,6 +6568,7 @@ declare class CadGraphics extends Graphics {
|
|
|
6564
6568
|
currentPoint: Point2D$1;
|
|
6565
6569
|
ltscale: number;
|
|
6566
6570
|
lineType: string;
|
|
6571
|
+
linetypePhase: number;
|
|
6567
6572
|
DIST1: number;
|
|
6568
6573
|
DIST2: number;
|
|
6569
6574
|
skipRenderOriginOffset: boolean;
|