toro
08-15-2003, 10:35 AM
Hello!
I'm beginning to use LScript in these days.
I'm writing an lscript("chamfer vertex" ) that need to get the PointID
from the selected points directly.
The point IDs of the composition elements can be obtained from a selected polygon
Using "Mesh Object Agents and vertex() method" or "polygon/polygon() method ".
But These methods requires more time and effort to only get the PointID from
the selected points directly. It would be not elegant in my case.
So I tried to use editbegin() function... but I could not use it well.
//-- <An example : display selected pointID > -------------//
main
{
pnt=editbegin();
for(i=1;i<=pnt;i++)
info("Selected Point ID : ", points[i]);
editend();
}
//-----------------------------------------//
When two points (ID:#9 and #27) are sedelcted, I run upper Lscript.
I suposed the information displayed are
<Selected Point ID : 9> and <Selected Point ID : 27>.
However, the information displayed are
<Selected Point ID : 1> and <Selected Point ID : 2> !
Where did I mistake? :-(
any help is appreciated.
Thanx
I'm beginning to use LScript in these days.
I'm writing an lscript("chamfer vertex" ) that need to get the PointID
from the selected points directly.
The point IDs of the composition elements can be obtained from a selected polygon
Using "Mesh Object Agents and vertex() method" or "polygon/polygon() method ".
But These methods requires more time and effort to only get the PointID from
the selected points directly. It would be not elegant in my case.
So I tried to use editbegin() function... but I could not use it well.
//-- <An example : display selected pointID > -------------//
main
{
pnt=editbegin();
for(i=1;i<=pnt;i++)
info("Selected Point ID : ", points[i]);
editend();
}
//-----------------------------------------//
When two points (ID:#9 and #27) are sedelcted, I run upper Lscript.
I suposed the information displayed are
<Selected Point ID : 9> and <Selected Point ID : 27>.
However, the information displayed are
<Selected Point ID : 1> and <Selected Point ID : 2> !
Where did I mistake? :-(
any help is appreciated.
Thanx