jig下画直线为何不能使用正交模式
jig下画直线为何不能使用正交模式.我在sampler ()
{
//- Setup the user input controls for each sample
setUserInputControls ((AcEdJig::UserInputControls) (kNoZeroResponseAccepted| kNoNegativeResponseAccepted | kGovernedByOrthoMode)) ;
//setSpecialCursorType (kCrosshair) ;
AcEdJig::DragStatus status ;
static AcGePoint3d axisPointTemp;
status = acquirePoint(m_ptEnd);
if (axisPointTemp != m_ptEnd)
axisPointTemp = m_ptEnd;
else if (status == AcEdJig::kNormal)
return AcEdJig::kNoChange;
return status;
}
中添加了kGovernedByOrthoMode,可是模式不是正交,而都是斜的。
请高手帮忙解答。
使用带基点的acquirePoint 感谢楼上的,问题解决了。 jingjingme 发表于 2012-12-9 09:49
感谢楼上的,问题解决了。
怎么解决的,楼主!! zhangqi1991 发表于 2019-8-26 17:33
怎么解决的,楼主!!
比如一个直线的jig。
#include "StdAfx.h"
#include "zhflinejig.h"
CZhfLineJig::CZhfLineJig()
{
}
CZhfLineJig::~CZhfLineJig(void)
{
}
// -----------------------------------------------------------------------------
AcEdJig::DragStatus CZhfLineJig::sampler(void)
{
DragStatus stat;
setUserInputControls((UserInputControls)
(AcEdJig::kAccept3dCoordinates
|AcEdJig::kGovernedByOrthoMode
| AcEdJig::kNoNegativeResponseAccepted
|AcEdJig::kAnyBlankTerminatesInput
| AcEdJig::kNullResponseAccepted
| AcEdJig::kNoZeroResponseAccepted));
static AcGePoint3d axisPointTemp;
stat = acquirePoint(m_pt3dCur, m_pt3dPre);
if (axisPointTemp != m_pt3dCur)
axisPointTemp = m_pt3dCur;
else if (stat == AcEdJig::kNormal)
return AcEdJig::kNoChange;
return stat;
}
// -----------------------------------------------------------------------------
Adesk::Boolean CZhfLineJig::update(void)
{
// m_pZhfLine->put_m_pt3dEnd(m_pt3dCur) ;
return Adesk::kTrue ;
}
// -----------------------------------------------------------------------------
AcDbObjectId CZhfLineJig::append(void)
{
AcDbObjectId retCode =AcEdJig::append () ;
return (retCode) ;
}
// -----------------------------------------------------------------------------
AcDbEntity * CZhfLineJig::entity(void) const
{
return m_pZhfLine ;
}
void CZhfLineJig::DoIt(void)
{
ads_point pt1 ;
if (RTNORM==acedGetPoint(NULL, _T("\n指定起点:"), pt1))
{
AcGePoint3d pt_3d_start(pt1, pt1, pt1) ;
m_pZhfLine = new ZhfLine(pt_3d_start, pt_3d_start) ;
m_pt3dPre = pt_3d_start ;
setDispPrompt(_T("指定终点:"));
DragStatus es = drag();
if (es==DragStatus::kNormal)
{
m_pZhfLine->put_m_pt3dEnd(m_pt3dCur) ;
append();
}
else if (m_pZhfLine!=NULL)
{
delete m_pZhfLine ;
}
}
}
页:
[1]