|
楼主 |
发表于 2009-1-15 11:30:20
|
显示全部楼层
回复: PR 249027 MYCRONA: FCF Symmetry from two lines to a reference line give
V42\DIMENS\DIM_SYMM.CPP
CPCDcommand* CPCDdim_symmetry::create_DRF_alignment(CPoint3 *ret_dirVec, CPoint3 *ret_latVec,CPoint3 *ret_longVec, CPCDcommand * pMidFeat/*=NULL*/) // PR249641
else // PR249027 - no secondary datum
{
if( datumref.m_iType[PRIMARY] == DAT_AXIS )
{
CPoint3 vector;
switch( global_workplane )
{
case TOP:
vector = CPoint3(0.,0.,1.);
break;
case RIGHT:
vector = CPoint3(1.,0.,0.);
break;
case BACK:
vector = CPoint3(0.,1.,0.);
break;
case BOTTOM:
vector = CPoint3(0.,0.,-1.);
break;
case LEFT:
vector = CPoint3(-1.,0.,0.);
break;
case FRONT:
vector = CPoint3(0.,-1.,0.);
break;
}
global_align->aaforw(ROTONLY, MACHINETOPARTS, vector, vector);
dirVec = dirVec.cross(vector);
latVec = CPoint3(0,0,1);
longVec = latVec.cross(dirVec);
}
} |
|