乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 73|回复: 4

jig下画直线为何不能使用正交模式

[复制链接]

2

主题

3

帖子

1

银币

初来乍到

Rank: 1

铜币
11
发表于 2012-11-26 20:39:00 | 显示全部楼层 |阅读模式
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,可是模式不是正交,而都是斜的。
请高手帮忙解答。
回复

使用道具 举报

1

主题

87

帖子

2

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
91
发表于 2012-11-28 13:09:00 | 显示全部楼层
使用带基点的acquirePoint
回复

使用道具 举报

2

主题

3

帖子

1

银币

初来乍到

Rank: 1

铜币
11
发表于 2012-12-9 09:49:00 | 显示全部楼层
感谢楼上的,问题解决了。
回复

使用道具 举报

1

主题

6

帖子

3

银币

初来乍到

Rank: 1

铜币
10
发表于 2019-8-26 17:33:00 | 显示全部楼层

怎么解决的,楼主!!
回复

使用道具 举报

0

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
1
发表于 2019-9-5 21:34:00 | 显示全部楼层

比如一个直线的jig。
#include "StdAfx.h"
#include "zhflinejig.h"
CZhfLineJig::CZhfLineJig()
{
}
CZhfLineJig::~CZhfLineJig(void)
{
}
// -----------------------------------------------------------------------------
AcEdJig:ragStatus 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:oIt(void)
{
        ads_point pt1 ;
        if (RTNORM==acedGetPoint(NULL, _T("\n指定起点:"), pt1))
        {
                AcGePoint3d pt_3d_start(pt1[0], pt1[1], pt1[2]) ;
                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 ;
                }
        }
}
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-2-4 06:02 , Processed in 0.202547 second(s), 73 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表