EDF 1337 : Sketcher 3D define a point by angle

Small modification of dimension presentations
This commit is contained in:
rnc 2012-10-10 15:32:05 +00:00
parent d6b8a348a4
commit 7f29a32f50

View File

@ -418,7 +418,7 @@ void EntityGUI_3DSketcherDlg::ClickOnAddPoint()
myPrsType = prsType();
if(myMode == 1)
// if(myMode == 1)
displayDimensions( /*store = */true);
myPointsList.append(getCurrentPoint());
@ -457,8 +457,8 @@ void EntityGUI_3DSketcherDlg::UpdateButtonsState()
GroupType->RadioButton3->click();
}
GroupType->RadioButton2->setEnabled(myPointsList.count() > 0);
GroupType->RadioButton3->setEnabled(myPointsList.count() > 0);
GroupType->RadioButton4->setEnabled(myPointsList.count() > 0);
// GroupType->RadioButton3->setEnabled(myPointsList.count() > 0);
// GroupType->RadioButton4->setEnabled(myPointsList.count() > 0);
Group3Spin->buttonUndo->setEnabled(myPointsList.count() > 0);
Group3Spin->buttonRedo->setEnabled(myRedoList.count() > 0);
GroupAngles->buttonUndo->setEnabled(myPointsList.count() > 0);
@ -1317,8 +1317,10 @@ void EntityGUI_3DSketcherDlg::displayDimensions (bool store)
if (myCoordType == 0)
{
displayLength(Last_Pnt, Current_Pnt, aNormal, store);
// myPrsType = TYPE_LENGTH;
// displayLength(Last_Pnt, Current_Pnt, aNormal, store);
displayLength(gp_Pnt(Last.x,Current.y,Last.z), gp_Pnt(Current.x,Current.y,Last.z), gp::DZ().Reversed(), store);
displayLength(gp_Pnt(Current.x,Last.y,Last.z), gp_Pnt(Current.x,Current.y,Last.z), gp::DZ(), store);
displayLength(gp_Pnt(Current.x,Current.y,Last.z), Current_Pnt, gp::DY(), store);
}
if (myCoordType == 1) // ANGLES
{
@ -1358,6 +1360,7 @@ void EntityGUI_3DSketcherDlg::displayDimensions (bool store)
if(!cylindrical)
displayLength(Last_Pnt, Current_Pnt, aNormal, store);
if(myMode !=0 || !store)
displayAngle(anAngle1, Last_Pnt, P1, P2, store);
if(spherical)
@ -1367,7 +1370,11 @@ void EntityGUI_3DSketcherDlg::displayDimensions (bool store)
}
if(cylindrical)
{
displayLength(Last_Pnt, P2, aNormal, store); // Radius
gp_Vec aVec(P2, Current_Pnt);
if (myMode == 0)
displayLength(Last_Pnt.Translated(aVec), P2.Translated(aVec), aNormal, store); // Radius
else
displayLength(Last_Pnt, P2, aNormal, store);
displayLength(P2, Current_Pnt, aNormal.Reversed(), store); // Height
}
}