CAD parameters draw an arc (com interface)

In the CAD design, the need to draw an arc, the user can point the arc plane of the drawing start point and end point of the arc on the arc and, thus drawing the arc.


The main use of Function:


_DMxDrawX::DrawArc2


Draw a circle on the three-point arc. Details are as follows:


parameter Explanation

DOUBLE dStartPointX

X coordinate of the starting point

DOUBLE dStartPointY

Y coordinates of the starting point

DOUBLE dMidPointX

X-coordinate point on the arc

DOUBLE dMidPointY

Y coordinate point on the arc

DOUBLE dEndPointX

X coordinate of the end point

DOUBLE dEndPointY

Y coordinate of the end point


Implemented in C # code description:


private void DrawArc()
{
    // Clear the current display
    axMxDrawX1.NewFile();
    // the color back to black and white
    axMxDrawX1.DrawCADColorIndex = 0;
    // the line into a solid line
    axMxDrawX1.LineType = "";
    // set the line width 4
    axMxDrawX1.LineWidth = 0;
    // Create a new layer, called "ArcLayer"
    axMxDrawX1.AddLayer("ArcLayer");
    // Set the current layer to "ArcLayer"
    axMxDrawX1.LayerName = ("ArcLayer");
    //------------------------------------------------------------------------------------------------------------
    // draw a line of solid black arc
    axMxDrawX1.DrawArc1(0, 1000, 100, 30, 200);
    //--------------------------------------------------------------------------------------------------------------
    // draw a broken line arc line
    axMxDrawX1.AddLinetype("ArcLineType", "30,-5,7,-7");
    // current line designed to "ArcLineType"
    axMxDrawX1.LineType = "ArcLineType";
    axMxDrawX1.DrawCADColor = 435322;
    axMxDrawX1.DrawArc1(300, 1000, 100, 30, 200);
    //---------------------------------------------------------------------------------------------------------------
    // draw a dotted line width of the arcuate
    axMxDrawX1.LineWidth = 15;
    axMxDrawX1.DrawCADColor = 6335;
    axMxDrawX1.DrawArc1(600, 1000, 100, 30, 200);
    //-----------------------------------------------------------------------------------------------------------------
    // three points on an arc drawn by arc
    axMxDrawX1.DrawArc2(800, 1000, 900, 1200, 1000, 900);
    //---------------------------------------------------------------------------------------------------------------
    // start point on the arc, the end of the arc and convexity will
    axMxDrawX1.LineType = "";
    axMxDrawX1.LineWidth = 40;
    axMxDrawX1.DrawCADColor = 65280;
    axMxDrawX1.DrawArc3(1200, 1000, 1400, 1000, 0.6);
    // put all the entities into the currently displayed viewport
    axMxDrawX1.ZoomAll();
    // update the viewport display
    axMxDrawX1.UpdateDisplay();
}

Guess you like

Origin www.cnblogs.com/yzy0224/p/11057238.html