zoukankan      html  css  js  c++  java
  • 2021年1月1日 AutoCAD.Net/C#.Net QQ群:193522571按表走呵呵!(延时死循环)

    static void zffObjectARX_MyCommand6(void)
    {

    AcDbObjectId secondId;
    AcDbObjectId minutId;
    AcDbObjectId HourId;
    AcDbEntity* pSecond=NULL;
    AcDbEntity* pMinute=NULL;
    AcDbEntity* pHour=NULL;
    AcDbHandle haSecond(_T("209"));
    AcDbHandle haMinut(_T("1FC"));
    AcDbHandle haHour(_T("1FB"));
    AcDbDatabase* pDb=acdbHostApplicationServices()->workingDatabase();
    pDb->getAcDbObjectId(secondId,false,haSecond);
    pDb->getAcDbObjectId(minutId,false,haMinut);
    pDb->getAcDbObjectId(HourId,false,haHour);

    double ang=pi()/30;
    AcGeMatrix3d rotate,minut,hour;
    rotate.setToRotation(-ang,AcGeVector3d::kZAxis,AcGePoint3d(100,100,0));
    minut.setToRotation(-ang/60,AcGeVector3d::kZAxis,AcGePoint3d(100,100,0));
    hour.setToRotation(-ang/720,AcGeVector3d::kZAxis,AcGePoint3d(100,100,0));
    while (1)
    {
    clock_t start=clock();
    clock_t time=CLOCKS_PER_SEC;
    while (clock()-start<time)
    ;
    acdbOpenObject(pSecond,secondId,AcDb::kForWrite);
    acdbOpenObject(pMinute,minutId,AcDb::kForWrite);
    acdbOpenObject(pHour,HourId,AcDb::kForWrite);
    pSecond->transformBy(rotate);
    pMinute->transformBy(minut);
    pHour->transformBy(hour);
    pSecond->close();
    pMinute->close();
    pHour->close();
    pSecond=NULL;
    pMinute=NULL;
    pHour=NULL;
    actrTransactionManager->queueForGraphicsFlush();
    actrTransactionManager->flushGraphics();
    acedUpdateDisplay();
    }
    }

  • 相关阅读:
    go test 下篇
    go test 上篇
    利用Docker Compose快速搭建本地测试环境
    phinx:php数据库迁移
    tp5 r3 一个简单的SQL语句调试实例
    TP开发小技巧
    优酷真实视频地址解析——2014年10月7日
    霍夫变换
    Google Earth影像数据破解之旅
    线程理论:(四)锁优化
  • 原文地址:https://www.cnblogs.com/NewAutoMan/p/6398407.html
Copyright © 2011-2022 走看看