- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The problem begin with recreating a surface with cylinder inside an Edge loop boundary.
If you remark, this edge loop have not proper start to respect a sweeping philosophy (min to max) and this edge loop was not really symetric (we have 2 missing point on other side of edge)... To correct the problem I've decide to rebuild params array with only one parameter (U) and re-ordered it (in unique data array)... When I Apply GetParamAtPoint, I get that... (everything working fine at this point).
Now I try to reverse function to reach each bottom of each U Parameter (SORTED UNIQUE U VALUE)... I push any value of E1, A1, D1 and i'm still get B point in anyway.
CComPtr<SurfaceEvaluator> pSurfEval;
Face->get_Evaluator(&pSurfEval);
CComSafeArray<double> *GuessParams = new CComSafeArray<double>;
CComSafeArray<double> *MaxDeviations = new CComSafeArray<double>;
CComSafeArray<double> *Params = new CComSafeArray<double>;
CComSafeArray<double> *SolutionNatures = new CComSafeArray<double>;
CComSafeArray<double> *Point = new CComSafeArray<double>;
for (long i = 0; i < CurveLoop->GetNbLoop(); i++)
{
for (long j = 0; j < CurveLoop->GetNbPointAtLoop(i); j++)
{
CRDVertex* SPoint = CurveLoop->GetPoint(CurveLoop->GetPointAtLoop(i, j));
Point->Add(SPoint->x);
Point->Add(SPoint->y);
Point->Add(SPoint->z);
//This Part Working Well
pSurfEval->GetParamAtPoint(Point->GetSafeArrayPtr(), (*GuessParams).GetSafeArrayPtr(), (*MaxDeviations).GetSafeArrayPtr(), (*Params).GetSafeArrayPtr(), (*SolutionNatures).GetSafeArrayPtr());
wprintf_s(L"Point (%lf, %lf, %lf) @ UV LIST (%lf, %lf)\n", (*Point)[0], (*Point)[1], (*Point)[2], (*Params)[1], (*Params)[0]);
GuessParams->Destroy();
MaxDeviations->Destroy();
Params->Destroy();
SolutionNatures->Destroy();
Point->Destroy();
}
}
Params->Add(-3.1416);
Params->Add(2.0);
pSurfEval->GetPointAtParam(Params->GetSafeArrayPtr(), (*Point).GetSafeArrayPtr());
wprintf_s(L"Test %lf, %lf, %lf\n", (*Point)[0], (*Point)[1], (*Point)[2]);
FOR EACH U
create line (U, V min) - (U, V max)
FOR EACH segement in EdgeLoop
Detect Intersection
if Intersection Detect add in array
Q. Why I still have always the same TEST point?
Q. If I enter outer value like (E1) does E gonna be on surface or out surface?
Q. I will create virtual line thru V cylinder limit and put in a unique vlaue vector to retreive peer-point. Does SDK have "two line intersection" function or have you an idea to reach V limit (min max) for a U Value. Because when i'm gonna rebuild U Array I'm not know V value for missing point.
FOR EACH U
create line (U, V min) - (U, V max)
FOR EACH segement in EdgeLoop
Detect Intersection
if Intersection Detect add in array
Thanks....
Solved! Go to Solution.