- UID
- 266260
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2005-5-25
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2006-4-7 17:20:04
|
显示全部楼层
AcEdInputPointMonitor跟AcEdInputPointFilter配合起来使用就实现了
bool bSnap = false;
Acad::ErrorStatus
AsdkInputPointMonitor::monitorInputPoint(
bool& appendToTooltipStr,
char*& additionalTooltipString,
AcGiViewportDraw* pDrawContext,
AcApDocument* document,
bool pointComputed,
int history,
const AcGePoint3d& lastPoint,
const AcGePoint3d& rawPoint,
const AcGePoint3d& grippedPoint,
const AcGePoint3d& cartesianSnappedPoint,
const AcGePoint3d& osnappedPoint,
AcDb::OsnapMask osnapMasks,
const AcArray<AcDbCustomOsnapMode*>& customOsnapModes,
AcDb::OsnapMask osnapOverrides,
const AcArray<AcDbCustomOsnapMode*>& customOsnapOverrides,
const AcArray<AcDbObjectId>& apertureEntities,
const AcArray< AcDbObjectIdArray, AcArrayObjectCopyReallocator< AcDbObjectIdArray > >&
nestedPickedEntities,
const AcArray<int>& gsSelectionMark,
const AcArray<AcDbObjectId>& keyPointEntities,
const AcArray< AcDbObjectIdArray, AcArrayObjectCopyReallocator< AcDbObjectIdArray > >&
nestedKeyPointEntities,
const AcArray<int>& keyPointGsSelectionMark,
const AcArray<AcGeCurve3d*>& alignmentPaths,
const AcGePoint3d& computedPoint,
const char* tooltipString)
{
if ( history & Acad::eCartSnapped )
{
bSnap = true;
}
else
{
bSnap = false;
}
}
Acad::ErrorStatus
AsdkInputPointFilter::processInputPoint(
bool& changedPoint,
AcGePoint3d& newPoint,
bool& displayOsnapGlyph,
bool& changedTooltipStr,
char*& newTooltipString,
bool& retry,
AcGiViewportDraw* pDrawContext,
AcApDocument* document,
bool pointComputed,
int history,
const AcGePoint3d& lastPoint,
const AcGePoint3d& rawPoint,
const AcGePoint3d& grippedPoint,
const AcGePoint3d& cartesianSnappedPoint,
const AcGePoint3d& osnappedPoint,
AcDb::OsnapMask osnapMasks,
const AcArray<AcDbCustomOsnapMode*>& customOsnapModes,
AcDb::OsnapMask osnapOverrides,
const AcArray<AcDbCustomOsnapMode*>& customOsnapOverrides,
const AcArray<AcDbObjectId>& pickedEntities,
const AcArray< AcDbObjectIdArray, AcArrayObjectCopyReallocator< AcDbObjectIdArray > >&
nestedPickedEntities,
const AcArray<int>& gsSelectionMark, // of 0th element in
// pickedEntities
// AutoSnap Info:
const AcArray<AcDbObjectId>& keyPointEntities,
const AcArray< AcDbObjectIdArray, AcArrayObjectCopyReallocator< AcDbObjectIdArray > >&
nestedKeyPointEntities,
const AcArray<int>& keyPointGsSelectionMark,
const AcArray<AcGeCurve3d*>& alignmentPaths,
const AcGePoint3d& computedPoint,
const char* tooltipString )
{
if (!pointComputed)
return Acad::eOk;
if (!bSnap)
{
retry = true;
}
return Acad::eOk;
} |
|