更新版本
This commit is contained in:
18
types/GraphicsSystem/OffsetPolyline.d.ts
vendored
18
types/GraphicsSystem/OffsetPolyline.d.ts
vendored
@@ -3,6 +3,7 @@ import { Contour } from "../DatabaseServices/Contour";
|
||||
import { Arc } from "../DatabaseServices/Entity/Arc";
|
||||
import { Circle } from "../DatabaseServices/Entity/Circle";
|
||||
import { Curve } from "../DatabaseServices/Entity/Curve";
|
||||
import { Line } from "../DatabaseServices/Entity/Line";
|
||||
import { Polyline } from "../DatabaseServices/Entity/Polyline";
|
||||
interface IOffsetResult {
|
||||
index: number;
|
||||
@@ -25,11 +26,16 @@ export declare class CurveTreeNode {
|
||||
TrimBy(contour: Contour, box: Box3): void;
|
||||
get Nodes(): this[];
|
||||
}
|
||||
export declare enum PolylineJoinType {
|
||||
Square = 0,
|
||||
Round = 1
|
||||
}
|
||||
export declare class OffsetPolyline {
|
||||
_Polyline: Polyline;
|
||||
_OffsetDist: number;
|
||||
_ToolPath: boolean;
|
||||
private _OffsetDistSq;
|
||||
private _JoinType;
|
||||
_CacheOCS: Matrix4;
|
||||
_Vertexs: Vector3[];
|
||||
_SubCurves: Curve[];
|
||||
@@ -44,7 +50,16 @@ export declare class OffsetPolyline {
|
||||
_IsClose: boolean;
|
||||
_OffsetDistSign: number;
|
||||
_IsTopoOffset: boolean;
|
||||
constructor(_Polyline: Polyline, _OffsetDist: number, _ToolPath?: boolean, _OffsetDistSq?: number);
|
||||
/**
|
||||
*
|
||||
* @param _Polyline
|
||||
* @param _OffsetDist
|
||||
* @param [_ToolPath=false] 走刀模式(在这个模式下,我们会进行圆弧过渡(或者直线过渡)避免尖角过大)
|
||||
* @param [_OffsetDistSq=(_OffsetDist ** 2) * 2.1] 允许的最大尖角长度 默认值差不多是矩形的尖角大一点
|
||||
* @param [_JoinType=PolylineJoinType.Round] 尖角的处理方式,默认是圆弧过渡,可以切换成直线过渡
|
||||
*/
|
||||
constructor(_Polyline: Polyline, _OffsetDist: number, _ToolPath?: boolean, _OffsetDistSq?: number, //对直角走刀不进行圆弧过度
|
||||
_JoinType?: PolylineJoinType);
|
||||
Do(): Polyline[];
|
||||
InitSubCurves(): this;
|
||||
protected GeneralCirclesAndVertexs(): void;
|
||||
@@ -68,6 +83,7 @@ export declare class OffsetPolyline {
|
||||
CheckPointDir(pt: Vector3): boolean;
|
||||
GetPointAtCurveDir(pt: Vector3): number;
|
||||
protected CreateArc(center: Vector3, startP: Vector3, endP?: Vector3): Arc;
|
||||
protected CreateSquare(center: Vector3, curveNow: IOffsetResult, curveNext: IOffsetResult, entTypeCode: number): Line;
|
||||
}
|
||||
export declare function EntityEncode2(c1: Curve, c2: Curve): number;
|
||||
export declare function CurveIsFine(curve: Curve): boolean;
|
||||
|
Reference in New Issue
Block a user