Values from printfs...

Status
Not open for further replies.

Crigui

Usenet Archive
Joined
Sep 28, 2001
Messages
39
Reaction score
0
hi,

What do the values, when i execute a "printf", means? When a execute a printf to see the value of an algle, for example, it doesn't look like the correct value looking in MicroStation...

That happens with coordinates too. They don't look like the values in microstation...

Thanks again...

Crigui.
 
"Crigui ...

What do the values, when i execute a "printf", means? When a execute a printf to see the value of an algle, for example, it doesn't look like the correct value looking in MicroStation...

Remember that angles are expressed in radians, not degrees. double angle = // get angle from MDL function

printf ("angle in radians=%.2lf\n", angle);
printf ("angle in degrees=%.2lf\n", angle * fc_180overpi);

That happens with coordinates too. They don't look like the values in microstation...
In MDL all DPoint3d coordinates are in units of resolution (UOR). To convert to master units (the units that you see as a user), you must divide by the number of UORs per master unit.

In V7, the UORs are in the tcb:
double masterUnits = UORs * tcb->subpermast * tcb->uorpersub;

V8 supplies an API function:
mdlModelRef_getMasterUnit ;
 
Status
Not open for further replies.

Latest threads

Back
Top