1、在Autocad中鼠标点一下  如何获得点的位置?
我说的这个位置是在Autocad里面的坐标位置 请问是用钩子获得吗?2、如何用代码画一个圆柱?3、入门资料看了几本,却根本不能解决什么实际问题,象上面的问题书上找不到。
有没有这方面的入门资料以上每个问题20分

解决方案 »

  1.   

    第一个问题的答案我自己已经找到了
    http://www.mjtd.com/bbs/dispbbs.asp?boardID=14&ID=28284&page=2第2 第3个问题  每个问题30分了
      

  2.   

    2、AcGeCylinder 
    Inherits FromAcGeSurfaceDescriptionRepresents a bounded cylinder surface.Include Filegecylndr.hSee AlsoAcGeTol   AcGeCylinder Creation Functions
       AcGeCylinder Query Functions
       AcGeCylinder Edit Functions
    AcGeCylinder();Constructs a valid infinite default cylinder.AcGeCylinder(    double radius,
        const AcGePoint3d& origin,    const AcGeVector3d& axisOfSymmetry);radius Input cylinder radius
    origin Input reference point on the cylinder axis
    axisOfSymmetry Input rotation axisConstructs an infinite cylinder defined by the input data.AcGeCylinder(    double radius,
        const AcGePoint3d& origin,
        const AcGeVector3d& axisOfSymmetry,
        const AcGeVector3d& refAxis,
        const AcGeInterval& height,
        double startAngle,    double endAngle);radius Input cylinder radius
    origin Input base point on the cylinder axis
    axisOfSymmetry Input axis of rotation
    refAxis Input reference vector on the base circle
    height Input interval on the axis referred by the origin
    startAngle Input start angle on the base circle
    endAngle Input end angle on the base circleConstructs a bounded cylinder defined by the input data.AcGeCylinder(    const AcGeCylinder& cylinder);cylinder Input cylinderConstructs a cylinder that is a copy of input cylinder.
    3、《AutoCAD ObjectArx 开发技术指南》
    我只看这本,有中文/英文2版
      

  3.   

    对于第二个问题:
    void DrawSolidCylinder(AcDbBlockTableRecord *pBlockTableRecord,double x1,double y1,double z1,double x2,double y2,double z2,double radius)
    {
    AcDb3dSolid *pSo=new AcDb3dSolid();
    AcDbRegion *pReg=new AcDbRegion();
    AcGePoint3d cnt(x1,y1,z1);
    AcGeVector3d nor(x2-x1,y2-y1,z2-z1);
    AcDbCircle *pC=new AcDbCircle(cnt,nor,radius);
    AcDbVoidPtrArray arr,out_arr;
    arr.append(pC);
    pReg->createFromCurves(arr,out_arr);
    if(out_arr.length()>0)
    {
    pSo->extrude((AcDbRegion *)(out_arr[0]) ,nor.length());
    pBlockTableRecord->appendAcDbEntity(pSo);
    }
    pSo->close();
    }
    x1,y1,z1是圆柱底中心坐标
    x2,y2,z2是圆柱体方向矢量
      

  4.   

    radius是圆柱体半径,另外上面我写的代码不规范,仅供参考。在ARX2004/Arx2005中已调试成功。
      

  5.   

    对于第三个问题:除了一些关于ARX的资料外,还应该了解一些计算机图形学知识。很有帮助。