0 Replies Latest reply on Sep 16, 2013 12:44 AM by Water Cube

    How to get the control points of a B-Curve(C++)

    Water Cube

      I'm trying to get the control points of a B-Curve using codes as follows:


      //an IEdge* pEdge is getted.


      ICurve* pCurve;

      pEdge -> IGetCurve(&pCurve);

      pCurve ->Identity(&typeOfCurve);   //  BCurve type is determined




      ISplineParamData* pSplineParamData;

      spCurve ->GetBCurveParams5(TRUE, FALSE, FALSE, FALSE, &pSplineParamData);


      pSplineParamData -> get_Dimension(&dimension);

      pSplineParamData -> get_ControlPointsCount(&controlPointsNum);


      double* controlPoints = new double[controlPointsNum*demension];


      HRESULT isOK;

      pSplineParamData -> IGetControlPoints(controlPointsNum*demension,controlPoints,&isOK);


      BUT I FAILED... Anyone help,please?


      P.S.  Solidworks 2011, Visual Studio 2008.