mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024425: Improve usage ergonomics of new dimension presentations
- Added format for value string. - Construction and validness. - Revise modification of properties and update of presentations. - Units moved to Drawer; code revisions. - Length and angle initialization was changed. Type of geometry filed was added to AIS_Dimension. - Method for test case bugs/vis/buc60915 was corrected. Description of the dimension classes was corrected. - Fixed initialization of angle and length.
This commit is contained in:
@@ -98,14 +98,12 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
||||
Handle(AIS_Dimension) aDim;
|
||||
if (myIsDiameterDimension)
|
||||
{
|
||||
aDim = isAttachPoint ? new AIS_DiameterDimension (aCircle, ElCLib::Value ((aFirstPar + aLastPar) / 2.0, aCircle))
|
||||
: new AIS_DiameterDimension (aCircle);
|
||||
aDim = new AIS_DiameterDimension (aCircle);
|
||||
Handle(AIS_DiameterDimension)::DownCast(aDim)->SetFlyout (aDimDlg->GetFlyout());
|
||||
}
|
||||
else
|
||||
{
|
||||
aDim = isAttachPoint ? new AIS_RadiusDimension (aCircle, ElCLib::Value ((aFirstPar + aLastPar) / 2.0, aCircle))
|
||||
: new AIS_RadiusDimension (aCircle);
|
||||
aDim = new AIS_RadiusDimension (aCircle);
|
||||
Handle(AIS_RadiusDimension)::DownCast(aDim)->SetFlyout (aDimDlg->GetFlyout());
|
||||
}
|
||||
|
||||
@@ -115,8 +113,8 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
aDim->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDim->IsUnitsDisplayed())
|
||||
aDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
{
|
||||
aDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
Reference in New Issue
Block a user