I have the code below trying to detect the intersection points between 2 curves in a drawing document:
//this return the selection point of one curve but could be related to the error
CComPtr
CComPtr
hr=swSketch->get_ModelToSketchTransform(&swMathTransform);
CComPtr
iSwApp->GetMathUtility(&pDispatch);
hr = pDispatch->QueryInterface(__uuidof(IMathUtility), reinterpret_cast
pDispatch=NULL;
hr=swMathUtility->CreatePoint(m_Point1, &pDispatch);
CComPtr
hr = pDispatch->QueryInterface(__uuidof(IMathPoint), reinterpret_cast
pDispatch=NULL;
hr=swMathPoint->MultiplyTransform(swMathTransform,&pDispatch);
swMathPoint=NULL;
hr = pDispatch->QueryInterface(__uuidof(IMathPoint), reinterpret_cast
// ok up to this!
..............
hr=pCurve2->ApplyTransform(swMathTransform);
hr=pCurve1->ApplyTransform(swMathTransform);
hr=pCurve1->IIntersectCurveSize(pCurve2,pStartPointIntersectionArray,pEndPointIntersectionArray,pOtherStartPointIntersectionArray,pOtherEndPointIntersectionArray,&retval);
hr return S_FALSE for ApplyTransform for curve 1 and curve 2. What is wrong?
SolidworksApi macros