AcDbBlockReference* TWBlockRefenceTool::CreateBlockRefence( IN const CString& strBlockName, IN const AcGePoint3d& PtIns, IN double dScale, IN double dRat, AcDbDatabase* pDb /*= NULL */ ) { AcDbObjectId IdBd; if( !TWArxBlokTableFun::HasBlockTableRecord(strBlockName, IdBd, pDb) ) return NULL; AcDbBlockReference* pBrf = new AcDbBlockReference( PtIns, IdBd ); pBrf->setScaleFactors( AcGeScale3d(dScale, dScale, dScale) ); pBrf->setRotation( dRat ); return pBrf; }
Adesk::Boolean MaterialJig::update() { AcGeMatrix3d translateMat; translateMat.setToTranslation(mpMaterialEnt->center().asVector()); double scale = mWidth ? mWidth : 1.0; AcGeMatrix3d scaleMat; AcGeScale3d(scale, scale, 1.0).getMatrix(scaleMat); mpMaterialEnt->setTransform(translateMat * scaleMat); return Adesk::kTrue; }