On 25/02/2015 at 00:14, xxxxxxxx wrote:
Hi Robert,
I am so sorry for being late saying thank you for answering my question.
I am spending and thinking to understand about the code you presented last time.
I have couple question for you.
Q1) GetRange(i,&a,&b) does not work
when I use this function, I get compiler error and Compiler always say "too a few parameters". as far as I looked at C++ SDK, it seems that we need to use one more parameter, which is a maxElements. Do I need to use the parameter ?
And also I tried code below....
BaseObject* tg_obj= doc->GetActiveObject();
if(tg_obj||tg_obj->GetType()!=Opolygon) return FALSE;
PolygonObject\* tg_pobj= ToPoly(tg_obj);
BaseSelect\* bs= tg_pobj->GetPolygonS();
CPolygon\* polys= tg_pobj->GetPolygonW(); // create polygon array
Vector\* points= tg_pobj->GetPointW();
Int32 poly_cnt= tg_pobj->GetPolygonCount();
CPolygon\* p= NULL;
Vector vA, vB, vC, vD;
Int32 seg=0, i, a, b;
for(i= 0; bs->GetRange(i,poly_cnt,&a,&b); i++) // please note this code, I add one more parameter
{
for(i=a; i<=b; ++i)
{
p= &polys _;
vA= points[p->a];
vB= points[p->b];
vC= points[p->c];
if(p->c != p->d){
vD= points[p->d];
}
}
}
GePrint(String::VectorToString(vA));
GePrint(String::VectorToString(vB));
GePrint(String::VectorToString(vC));
GePrint(String::VectorToString(vD));
but, this code is not working at all, Are there anything wrong ?
Q2) How Can I make the condition to avoid storing point coordinates that was already stored ?
if you gave me hints, I would appreciate you.
I am sorry for asking too many things, I am just beginner of C++.
Thank you very much.
Shortail.