Esempio n. 1
0
//===================================================================
double userToLocalAngle(const AcGeVector3d& normal,
                        const AcGeVector3d& ucsXdir)
{
    AcGeMatrix3d wcsToLcs = AcGeMatrix3d::worldToPlane(normal);
    AcGeVector3d xDir = ucsXdir;
    xDir.transformBy(wcsToLcs);
    double angle = atan2(xDir.y, xDir.x);
    return angle;
    //return fixAngle(angle);
} 
AcGeVector3d
ArxDbgUtils::wcsToUcs(const AcGeVector3d& vec)
{
	AcDbDatabase* db = acdbHostApplicationServices()->workingDatabase();
	ASSERT(db != NULL);

    AcGeMatrix3d m;

    getWcsToUcsMatrix(m, db);

    AcGeVector3d newv = vec;
    newv.transformBy(m);

    return newv;
}