|
|
|
@ -25,8 +25,10 @@ import { SelectPick } from './SelectPick';
|
|
|
|
|
*/
|
|
|
|
|
export enum AxisSnapMode
|
|
|
|
|
{
|
|
|
|
|
None = 0,//禁用
|
|
|
|
|
Polar = 1,//极轴
|
|
|
|
|
Ortho = 2,//正交
|
|
|
|
|
Custom = 3,//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//捕捉轴
|
|
|
|
@ -73,19 +75,20 @@ export class SnapServices
|
|
|
|
|
SnapPoint: Vector3;//捕捉到的点
|
|
|
|
|
AxisSnapBasePoint: Vector3;//当捕捉模式为轴线捕捉时,返回轴线的基点
|
|
|
|
|
SnapModeEnable: ObjectSnapMode = ObjectSnapMode.All;
|
|
|
|
|
private m_SnapMode: ObjectSnapMode = ObjectSnapMode.None;
|
|
|
|
|
private m_DynPrompt: PromptBlock;
|
|
|
|
|
private m_HasBasePoint: boolean = false;
|
|
|
|
|
private m_IsZAxis = false;
|
|
|
|
|
private m_SupportSnapPoints: SupportSnapPoint[] = [];//辅助捕捉点WCS
|
|
|
|
|
private m_UCS: Matrix4;
|
|
|
|
|
CustomAxis: Vector3[] = [];//自定义捕捉轴
|
|
|
|
|
private _SnapMode: ObjectSnapMode = ObjectSnapMode.None;
|
|
|
|
|
private _DynPrompt: PromptBlock;
|
|
|
|
|
private _HasBasePoint: boolean = false;
|
|
|
|
|
private _IsZAxis = false;
|
|
|
|
|
private _SupportSnapPoints: SupportSnapPoint[] = [];//辅助捕捉点WCS
|
|
|
|
|
private _UCS: Matrix4;
|
|
|
|
|
|
|
|
|
|
/** 切线捕捉时使用的基点 */
|
|
|
|
|
TanBasePoint: Vector3;
|
|
|
|
|
//开始捕捉
|
|
|
|
|
Start(prompt: GetPointPrompt)
|
|
|
|
|
{
|
|
|
|
|
this.m_UCS = app.Editor.UCSMatrix;
|
|
|
|
|
this._UCS = app.Editor.UCSMatrix;
|
|
|
|
|
|
|
|
|
|
this.InitDynPrompt();
|
|
|
|
|
this.InitCrossCursor();
|
|
|
|
@ -96,7 +99,7 @@ export class SnapServices
|
|
|
|
|
|
|
|
|
|
if (prompt.BasePoint && !prompt.DisabledBasePointSupportSnap)
|
|
|
|
|
{
|
|
|
|
|
this.m_SupportSnapPoints.push({
|
|
|
|
|
this._SupportSnapPoints.push({
|
|
|
|
|
Point: prompt.BasePoint.clone(),
|
|
|
|
|
Entitys: [],
|
|
|
|
|
});
|
|
|
|
@ -116,49 +119,49 @@ export class SnapServices
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ents.length > 0)
|
|
|
|
|
this.m_SupportSnapPoints.push({
|
|
|
|
|
this._SupportSnapPoints.push({
|
|
|
|
|
Point: prompt.BasePoint.clone(),
|
|
|
|
|
Entitys: ents,
|
|
|
|
|
});
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
this.UpdateCrossCursor();
|
|
|
|
|
this.m_HasBasePoint = true;
|
|
|
|
|
this._HasBasePoint = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
this.m_HasBasePoint = false;
|
|
|
|
|
this._HasBasePoint = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//结束捕捉服务
|
|
|
|
|
Stop()
|
|
|
|
|
{
|
|
|
|
|
//如果重新捕捉,那么清除添加捕捉点的计时器(放弃添加捕捉点)
|
|
|
|
|
if (this.m_DelaySupportSnapId)
|
|
|
|
|
if (this._DelaySupportSnapId)
|
|
|
|
|
{
|
|
|
|
|
clearTimeout(this.m_DelaySupportSnapId);
|
|
|
|
|
this.m_DelaySupportSnapId = undefined;
|
|
|
|
|
clearTimeout(this._DelaySupportSnapId);
|
|
|
|
|
this._DelaySupportSnapId = undefined;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.TanBasePoint = undefined;
|
|
|
|
|
this.m_SupportSnapPoints.length = 0;
|
|
|
|
|
this._SupportSnapPoints.length = 0;
|
|
|
|
|
this.SnapPoint = undefined;
|
|
|
|
|
this.m_SupportExtLinePts.length = 0;
|
|
|
|
|
this._SupportExtLinePts.length = 0;
|
|
|
|
|
|
|
|
|
|
this.m_DynPrompt.Visible = false;
|
|
|
|
|
this._DynPrompt.Visible = false;
|
|
|
|
|
|
|
|
|
|
this.UpdateCursort();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get SnapMode()
|
|
|
|
|
{
|
|
|
|
|
return this.m_SnapMode;
|
|
|
|
|
return this._SnapMode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set SnapMode(mode)
|
|
|
|
|
{
|
|
|
|
|
if (mode !== this.m_SnapMode)
|
|
|
|
|
if (mode !== this._SnapMode)
|
|
|
|
|
{
|
|
|
|
|
this.m_SnapMode = mode;
|
|
|
|
|
this._SnapMode = mode;
|
|
|
|
|
this.UpdateSquareCursorMode(mode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -188,7 +191,7 @@ export class SnapServices
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//延迟添加辅助的捕捉点
|
|
|
|
|
private m_DelaySupportSnapId;
|
|
|
|
|
private _DelaySupportSnapId;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获得实体捕捉点.
|
|
|
|
@ -204,8 +207,8 @@ export class SnapServices
|
|
|
|
|
*/
|
|
|
|
|
private GetEntitySnapPoint()
|
|
|
|
|
{
|
|
|
|
|
this.m_SupportExtLinePts.length = 0;
|
|
|
|
|
this.m_SnapMode = ObjectSnapMode.None;
|
|
|
|
|
this._SupportExtLinePts.length = 0;
|
|
|
|
|
this._SnapMode = ObjectSnapMode.None;
|
|
|
|
|
|
|
|
|
|
if (this.Disabled)
|
|
|
|
|
return;
|
|
|
|
@ -215,13 +218,13 @@ export class SnapServices
|
|
|
|
|
let vcsP = app.Editor.MouseCtrl._CurMousePointVCS.setZ(0);
|
|
|
|
|
let wcsP = app.Editor.MouseCtrl._CurMousePointWCS;
|
|
|
|
|
|
|
|
|
|
let baseP = this.m_HasBasePoint ? this.m_SupportSnapPoints[0].Point : undefined;
|
|
|
|
|
let baseP = this._HasBasePoint ? this._SupportSnapPoints[0].Point : undefined;
|
|
|
|
|
|
|
|
|
|
//如果重新捕捉,那么清除添加捕捉点的计时器(放弃添加捕捉点)
|
|
|
|
|
if (this.m_DelaySupportSnapId)
|
|
|
|
|
if (this._DelaySupportSnapId)
|
|
|
|
|
{
|
|
|
|
|
clearTimeout(this.m_DelaySupportSnapId);
|
|
|
|
|
this.m_DelaySupportSnapId = undefined;
|
|
|
|
|
clearTimeout(this._DelaySupportSnapId);
|
|
|
|
|
this._DelaySupportSnapId = undefined;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获得显示图形和圆心列表
|
|
|
|
@ -244,7 +247,7 @@ export class SnapServices
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let sel = new SelectPick(app.Viewer, vcsP, this.SnapSize);//直接用这个,不需要用box,射线追踪没有性能损耗
|
|
|
|
|
let selectEns: Entity[] = [];
|
|
|
|
|
// let selectEns: Entity[] = [];
|
|
|
|
|
|
|
|
|
|
// 由于绘制的实体可能有多个分裂,所以代码会重复的去选择,当前注释的代码已经避免这种情况,不过性能并不会提高.所以取消这个代码
|
|
|
|
|
// console.time("all");
|
|
|
|
@ -275,12 +278,12 @@ export class SnapServices
|
|
|
|
|
});
|
|
|
|
|
// console.timeEnd("all");
|
|
|
|
|
|
|
|
|
|
selectEns.push(...sel.SelectEntityList);
|
|
|
|
|
let selectEns = sel.SelectEntityList;
|
|
|
|
|
|
|
|
|
|
let viewXform = new Matrix3().setFromMatrix4(app.Viewer.Camera.matrix);
|
|
|
|
|
|
|
|
|
|
//如果只有切线捕捉
|
|
|
|
|
if (this.SnapModeEnable === ObjectSnapMode.Tan && !this.m_HasBasePoint)
|
|
|
|
|
if (this.SnapModeEnable === ObjectSnapMode.Tan && !this._HasBasePoint)
|
|
|
|
|
for (let e of selectEns)
|
|
|
|
|
{
|
|
|
|
|
if (e instanceof Circle || e instanceof Arc)
|
|
|
|
@ -322,24 +325,24 @@ export class SnapServices
|
|
|
|
|
if (snapData.Point)
|
|
|
|
|
{
|
|
|
|
|
//辅助捕捉点控制
|
|
|
|
|
this.m_DelaySupportSnapId = setTimeout(
|
|
|
|
|
this._DelaySupportSnapId = setTimeout(
|
|
|
|
|
() =>
|
|
|
|
|
{
|
|
|
|
|
let fIndex = this.m_SupportSnapPoints.findIndex(p => equalv3(p.Point, snapData.Point));
|
|
|
|
|
let fIndex = this._SupportSnapPoints.findIndex(p => equalv3(p.Point, snapData.Point));
|
|
|
|
|
if (fIndex !== -1)
|
|
|
|
|
{
|
|
|
|
|
if (!(fIndex === 0 && this.m_HasBasePoint))//基点不移除
|
|
|
|
|
this.m_SupportSnapPoints.splice(fIndex, 1);
|
|
|
|
|
if (!(fIndex === 0 && this._HasBasePoint))//基点不移除
|
|
|
|
|
this._SupportSnapPoints.splice(fIndex, 1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
this.m_SupportSnapPoints.push(snapData);
|
|
|
|
|
if (this.m_SupportSnapPoints.length > 7)
|
|
|
|
|
this._SupportSnapPoints.push(snapData);
|
|
|
|
|
if (this._SupportSnapPoints.length > 7)
|
|
|
|
|
{
|
|
|
|
|
if (this.m_HasBasePoint)
|
|
|
|
|
this.m_SupportSnapPoints.splice(1, 1);
|
|
|
|
|
if (this._HasBasePoint)
|
|
|
|
|
this._SupportSnapPoints.splice(1, 1);
|
|
|
|
|
else
|
|
|
|
|
this.m_SupportSnapPoints.shift();
|
|
|
|
|
this._SupportSnapPoints.shift();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.UpdateCrossCursor();
|
|
|
|
@ -471,6 +474,7 @@ export class SnapServices
|
|
|
|
|
*/
|
|
|
|
|
private AxisSnap(supportSnapPt: SupportSnapPoint, isFirst = false): SnapAxis
|
|
|
|
|
{
|
|
|
|
|
if (this.AxisSnapMode === AxisSnapMode.None) return;
|
|
|
|
|
if (equalv3(supportSnapPt.Point, app.Editor.MouseCtrl._CurMousePointWCS))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
@ -482,6 +486,11 @@ export class SnapServices
|
|
|
|
|
if (isFirst)
|
|
|
|
|
allowMouseDistSq = Infinity;
|
|
|
|
|
}
|
|
|
|
|
else if (this.AxisSnapMode === AxisSnapMode.Custom)
|
|
|
|
|
{
|
|
|
|
|
axisVecs = this.CustomAxis;
|
|
|
|
|
allowMouseDistSq = Infinity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let nowVCS = app.Editor.MouseCtrl._CurMousePointVCS;
|
|
|
|
|
|
|
|
|
@ -491,7 +500,7 @@ export class SnapServices
|
|
|
|
|
let type: ObjectSnapMode = ObjectSnapMode.Axis;
|
|
|
|
|
let isZAxis = false;
|
|
|
|
|
|
|
|
|
|
let roM = new Matrix4().extractRotation(this.m_UCS);
|
|
|
|
|
let roM = new Matrix4().extractRotation(this._UCS);
|
|
|
|
|
|
|
|
|
|
//切线和垂线的辅助点不需要极轴捕捉
|
|
|
|
|
if (supportSnapPt.Entitys.length === 1
|
|
|
|
@ -550,7 +559,7 @@ export class SnapServices
|
|
|
|
|
{
|
|
|
|
|
let p = app.Viewer.ScreenToWorld(
|
|
|
|
|
nowVCS.clone(),
|
|
|
|
|
new Vector3().setFromMatrixColumn(es.Entity.OCS, 2),
|
|
|
|
|
new Vector3().setFromMatrixColumn(es.Entity.OCSNoClone, 2),
|
|
|
|
|
es.Entity.Center
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
@ -586,12 +595,12 @@ export class SnapServices
|
|
|
|
|
//轴线列表
|
|
|
|
|
let snapAxisList: SnapAxis[] = [];
|
|
|
|
|
|
|
|
|
|
for (let i = 0, l = this.m_SupportSnapPoints.length; i < l; i++)
|
|
|
|
|
for (let i = 0, l = this._SupportSnapPoints.length; i < l; i++)
|
|
|
|
|
{
|
|
|
|
|
let snap = this.AxisSnap(this.m_SupportSnapPoints[i], i === 0);
|
|
|
|
|
let snap = this.AxisSnap(this._SupportSnapPoints[i], i === 0);
|
|
|
|
|
if (snap)
|
|
|
|
|
{
|
|
|
|
|
snap.BasePoint = this.m_SupportSnapPoints[i].Point;
|
|
|
|
|
snap.BasePoint = this._SupportSnapPoints[i].Point;
|
|
|
|
|
snapAxisList.push(snap);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -723,7 +732,7 @@ export class SnapServices
|
|
|
|
|
|
|
|
|
|
if (this.SnapMode === ObjectSnapMode.Axis)
|
|
|
|
|
{
|
|
|
|
|
this.m_IsZAxis = snapAxis.IsZAxis;
|
|
|
|
|
this._IsZAxis = snapAxis.IsZAxis;
|
|
|
|
|
this.AxisSnapBasePoint = snapAxisList[0].BasePoint;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -768,9 +777,9 @@ export class SnapServices
|
|
|
|
|
for (let i = 0; i < 7; i++)
|
|
|
|
|
{
|
|
|
|
|
let l = this.m_CrossCursor[i];
|
|
|
|
|
if (this.m_SupportSnapPoints[i])
|
|
|
|
|
if (this._SupportSnapPoints[i])
|
|
|
|
|
{
|
|
|
|
|
l.position.copy(this.m_SupportSnapPoints[i].Point);
|
|
|
|
|
l.position.copy(this._SupportSnapPoints[i].Point);
|
|
|
|
|
preView.WorldToViewPoint(l.position);
|
|
|
|
|
l.updateMatrix();
|
|
|
|
|
l.visible = true;
|
|
|
|
@ -797,7 +806,7 @@ export class SnapServices
|
|
|
|
|
{
|
|
|
|
|
this.UpdateObjectPosition(
|
|
|
|
|
this.m_SquareCursor,
|
|
|
|
|
this.SnapPoint && this.m_SupportExtLinePts.length === 0
|
|
|
|
|
this.SnapPoint && this._SupportExtLinePts.length === 0
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -858,7 +867,7 @@ export class SnapServices
|
|
|
|
|
{
|
|
|
|
|
this.UpdateObjectPosition(
|
|
|
|
|
this.m_ObliqueCrossCursor,
|
|
|
|
|
this.m_SupportExtLinePts.length > 0
|
|
|
|
|
this._SupportExtLinePts.length > 0
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -879,7 +888,7 @@ export class SnapServices
|
|
|
|
|
{
|
|
|
|
|
this.UpdateObjectPosition(
|
|
|
|
|
this.m_ObliqueOutline,
|
|
|
|
|
this.m_SupportExtLinePts.length > 2
|
|
|
|
|
this._SupportExtLinePts.length > 2
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -896,7 +905,7 @@ export class SnapServices
|
|
|
|
|
|
|
|
|
|
//延伸线辅助显示
|
|
|
|
|
private m_SupportExtLine: Line;
|
|
|
|
|
m_SupportExtLinePts: Vector3[] = [];
|
|
|
|
|
_SupportExtLinePts: Vector3[] = [];
|
|
|
|
|
private InitSupportExtLine()
|
|
|
|
|
{
|
|
|
|
|
if (!this.m_SupportExtLine)
|
|
|
|
@ -912,12 +921,12 @@ export class SnapServices
|
|
|
|
|
}
|
|
|
|
|
private UpdateSupportExtLine()
|
|
|
|
|
{
|
|
|
|
|
if (this.m_SupportExtLinePts.length > 0)
|
|
|
|
|
if (this._SupportExtLinePts.length > 0)
|
|
|
|
|
{
|
|
|
|
|
this.m_SupportExtLine.visible = true;
|
|
|
|
|
let geo = this.m_SupportExtLine.geometry as BufferGeometry;
|
|
|
|
|
BufferGeometryUtils.UpdatePts(geo, this.m_SupportExtLinePts, true);
|
|
|
|
|
geo.drawRange.count = this.m_SupportExtLinePts.length;
|
|
|
|
|
BufferGeometryUtils.UpdatePts(geo, this._SupportExtLinePts, true);
|
|
|
|
|
geo.drawRange.count = this._SupportExtLinePts.length;
|
|
|
|
|
|
|
|
|
|
this.m_SupportExtLine.computeLineDistances();
|
|
|
|
|
}
|
|
|
|
@ -958,77 +967,77 @@ export class SnapServices
|
|
|
|
|
if (reverse)
|
|
|
|
|
pts.reverse();
|
|
|
|
|
|
|
|
|
|
this.m_SupportExtLinePts.push(...pts);
|
|
|
|
|
this._SupportExtLinePts.push(...pts);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InitDynPrompt()
|
|
|
|
|
{
|
|
|
|
|
if (!this.m_DynPrompt)
|
|
|
|
|
if (!this._DynPrompt)
|
|
|
|
|
{
|
|
|
|
|
this.m_DynPrompt = new PromptBlock(DynamicInputManage.GetManage());
|
|
|
|
|
this.m_DynPrompt.Visible = false;
|
|
|
|
|
this._DynPrompt = new PromptBlock(DynamicInputManage.GetManage());
|
|
|
|
|
this._DynPrompt.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
UpdateDynPrompt()
|
|
|
|
|
{
|
|
|
|
|
if (this.SnapMode === ObjectSnapMode.Axis && this.m_SupportExtLinePts.length > 1)
|
|
|
|
|
if (this.SnapMode === ObjectSnapMode.Axis && this._SupportExtLinePts.length > 1)
|
|
|
|
|
{
|
|
|
|
|
this.m_DynPrompt.Visible = true;
|
|
|
|
|
if (this.m_IsZAxis)
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("Z轴");
|
|
|
|
|
this._DynPrompt.Visible = true;
|
|
|
|
|
if (this._IsZAxis)
|
|
|
|
|
this._DynPrompt.UpdatePrompt("Z轴");
|
|
|
|
|
else
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("极轴");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("极轴");
|
|
|
|
|
|
|
|
|
|
let vps = this.m_SupportExtLinePts.map(p => app.Viewer.PreViewer.ViewerPointToScreenPoint(p.clone()));
|
|
|
|
|
let vps = this._SupportExtLinePts.map(p => app.Viewer.PreViewer.ViewerPointToScreenPoint(p.clone()));
|
|
|
|
|
|
|
|
|
|
this.m_DynPrompt.SetPostion(midPoint(vps[0], vps[1]));
|
|
|
|
|
this._DynPrompt.SetPostion(midPoint(vps[0], vps[1]));
|
|
|
|
|
}
|
|
|
|
|
else if (this.m_SupportExtLinePts.length === 4)
|
|
|
|
|
else if (this._SupportExtLinePts.length === 4)
|
|
|
|
|
{
|
|
|
|
|
this.m_DynPrompt.Visible = true;
|
|
|
|
|
this.m_DynPrompt.SetPostion(app.Viewer.WorldToScreen(this.SnapPoint.clone()).add(new Vector3(0, 100)));
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("轴线交点");
|
|
|
|
|
this._DynPrompt.Visible = true;
|
|
|
|
|
this._DynPrompt.SetPostion(app.Viewer.WorldToScreen(this.SnapPoint.clone()).add(new Vector3(0, 100)));
|
|
|
|
|
this._DynPrompt.UpdatePrompt("轴线交点");
|
|
|
|
|
}
|
|
|
|
|
else if (this.SnapMode !== ObjectSnapMode.Node && this.SnapPoint)
|
|
|
|
|
{
|
|
|
|
|
this.m_DynPrompt.Visible = true;
|
|
|
|
|
this.m_DynPrompt.SetPostion(
|
|
|
|
|
this._DynPrompt.Visible = true;
|
|
|
|
|
this._DynPrompt.SetPostion(
|
|
|
|
|
app.Viewer.WorldToScreen(this.SnapPoint.clone())
|
|
|
|
|
.add(new Vector3(0, 100))
|
|
|
|
|
);
|
|
|
|
|
switch (this.SnapMode)
|
|
|
|
|
{
|
|
|
|
|
case ObjectSnapMode.End:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("端点");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("端点");
|
|
|
|
|
break;
|
|
|
|
|
case ObjectSnapMode.Per:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("垂足");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("垂足");
|
|
|
|
|
break;
|
|
|
|
|
case ObjectSnapMode.Mid:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("中点");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("中点");
|
|
|
|
|
break;
|
|
|
|
|
case ObjectSnapMode.Cen:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("圆心");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("圆心");
|
|
|
|
|
break;
|
|
|
|
|
case ObjectSnapMode.Nea:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("最近点");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("最近点");
|
|
|
|
|
break;
|
|
|
|
|
case ObjectSnapMode.Ext:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("延伸");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("延伸");
|
|
|
|
|
break;
|
|
|
|
|
case ObjectSnapMode.Tan:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("切线");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("切线");
|
|
|
|
|
break;
|
|
|
|
|
case ObjectSnapMode.Int:
|
|
|
|
|
this.m_DynPrompt.UpdatePrompt("交点");
|
|
|
|
|
this._DynPrompt.UpdatePrompt("交点");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
this.m_DynPrompt.Visible = false;
|
|
|
|
|
this._DynPrompt.Visible = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
this.m_DynPrompt.Visible = false;
|
|
|
|
|
this._DynPrompt.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|