Skip to content

Instantly share code, notes, and snippets.

@TNick
Created March 20, 2013 17:59
Show Gist options
  • Save TNick/5206927 to your computer and use it in GitHub Desktop.
Save TNick/5206927 to your computer and use it in GitHub Desktop.
dwgBuffer::getExtrusion
void dwgBuffer::getExtrusion(DRW_Coord *ext)
{
/*
Bit Extrusion
For R13-R14 this is 3BD.
We are asserting that the version is not R13-R14; this values should
be read by the user
*/
/*
For R2000, this is a single bit, followed optionally
by 3BD.*/
duint8 def_val = getBit();
if ( def_val )
{ /* If the single bit is 1, the extrusion value is assumed to be 0,0,1 and
no explicit extrusion is stored. */
ext->x = 0;
ext->y = 0;
ext->z = 1;
}
else
{ /* If the single bit is 0, then it will be followed by 3BD. */
ext->x = getBitDouble();
ext->y = getBitDouble();
ext->z = getBitDouble();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment