coolwind81
New member
Hi,everybody,I am facing a problem about "pro_compute_clearance".
I want to use function "pro_compute_clearance" to check the distancefully programmatically between two component in a assembly without using function"ProSelect().
Here is my code, maybe the assignment "sel[0].part_ptr=NULL;" or "sel[1].part_ptr=NULL;" is not right. the distance I get is always 0.
if(strcmp(name,"TEST_1")==0)
{
sel[0].part_ptr=NULL;
sel[0].assembly_ptr=NULL;
sel[0].memb_num=1;
sel[0].memb_id_tab[0]=40;
sel[0].memb_id_tab[1]=-1;
}
if(strcmp(name,"TEST_2")==0)
{
sel[1].part_ptr=NULL;
sel[1].assembly_ptr=NULL;
sel[1].memb_num=1;
sel[1].memb_id_tab[0]=39;
sel[1].memb_id_tab[1]=-1;
}
status = pro_compute_clearance(sel, PRO_PART_CLEARANCE, &distance,
&interf, coord);
fprintf(fp,"USER Distance is %f\n",distance);
I want to use function "pro_compute_clearance" to check the distancefully programmatically between two component in a assembly without using function"ProSelect().
Here is my code, maybe the assignment "sel[0].part_ptr=NULL;" or "sel[1].part_ptr=NULL;" is not right. the distance I get is always 0.
if(strcmp(name,"TEST_1")==0)
{
sel[0].part_ptr=NULL;
sel[0].assembly_ptr=NULL;
sel[0].memb_num=1;
sel[0].memb_id_tab[0]=40;
sel[0].memb_id_tab[1]=-1;
}
if(strcmp(name,"TEST_2")==0)
{
sel[1].part_ptr=NULL;
sel[1].assembly_ptr=NULL;
sel[1].memb_num=1;
sel[1].memb_id_tab[0]=39;
sel[1].memb_id_tab[1]=-1;
}
status = pro_compute_clearance(sel, PRO_PART_CLEARANCE, &distance,
&interf, coord);
fprintf(fp,"USER Distance is %f\n",distance);