From: aba Date: Mon, 10 Aug 2015 18:26:38 +0000 (+0300) Subject: Small correction X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=0e01187e945c4c7dd29082f4a888eca7efd28d65;p=occt-copy.git Small correction --- diff --git a/src/AIS/AIS_Dimension.cxx b/src/AIS/AIS_Dimension.cxx index bc3b8ade50..899132b58b 100755 --- a/src/AIS/AIS_Dimension.cxx +++ b/src/AIS/AIS_Dimension.cxx @@ -529,7 +529,7 @@ void AIS_Dimension::DrawText (const Handle(Prs3d_Presentation)& thePresentation, const Standard_Real aFontHeight = aTextAspect->Height(); Font_FTFont aFont; - aFont.Init (aFontName, anAspectText3d->GetTextFontAspect(), myDrawer->TextAspect()->Height(), 96); + aFont.Init (aFontName, anAspectText3d->GetTextFontAspect(), aFontHeight, 96); const Standard_Real aHeightOfLine = aFont.LineSpacing(); @@ -797,9 +797,11 @@ void AIS_Dimension::DrawExtension (const Handle(Prs3d_Presentation)& thePresenta Standard_Boolean isShortLine = !myDrawer->DimensionAspect()->IsText3d() || theLabelPosition & LabelPosition_VCenter; + + // Compute graphical primitives and sensitives for extension line gp_Pnt anExtStart = theExtensionStart; - gp_Pnt anExtEnd = !hasLabel || isShortLine + gp_Pnt anExtEnd = !hasLabel || !(theLabelPosition & LabelPosition_Above || theLabelPosition & LabelPosition_Below) ? ElCLib::Value (theExtensionSize, anExtensionLine) : ElCLib::Value (theExtensionSize + theLabelWidth, anExtensionLine); diff --git a/tests/bugs/vis/bug26507_4 b/tests/bugs/vis/bug26507_4 index d3df0614a0..1a82836c47 100644 --- a/tests/bugs/vis/bug26507_4 +++ b/tests/bugs/vis/bug26507_4 @@ -20,6 +20,7 @@ vdimension aDim1 -radius -shapes aCircle -circleparam 10 -text 3d -label right - vdimension aDim2 -diameter -shapes aCircle -circleparam 5 -text 3d -label left -arrow external -hidedimline -valuetext "+4.0\n -6.0" -aligntext 1.0 0.0 0.0 -segment 15 -label left firstline vdimension aDim3 -radius -shapes aCircle -circleparam 20 -text 3d -plane zox -label right -arrow external -hidedimline vdimension aDim4 -radius -shapes aCircle -circleparam 40 -text 3d -plane zox -label vcenter -arrow internal -hidedimline +vdimparam aDim1 -text 6 vdimparam aDim3 -text 6 vfit diff --git a/tests/bugs/vis/bug26507_5 b/tests/bugs/vis/bug26507_5 index 755c25e645..ab823f3408 100644 --- a/tests/bugs/vis/bug26507_5 +++ b/tests/bugs/vis/bug26507_5 @@ -25,7 +25,7 @@ vdimension dim2 -length -plane xoy -shapes lengthP1 lengthP3 -text 3d -aligntext vdimension dim3 -length -plane xoy -shapes lengthP2 lengthP3 -text 3d -flyout -10 -aligntext 1.0 0.0 0.0 -segment 5 -label left # Text on the left side - it is aligned -vdimension dim4 -length -plane xoy -shapes lengthP4 lengthP1 -text 3d -valuetext "0.6\n1.58\nTHICKNESS" -flyout -10 -aligntext 1.0 0.0 0.0 -segment 10 -label right firstline +vdimension dim4 -length -plane xoy -shapes lengthP4 lengthP1 -text 3d -valuetext "0.6\n1.58\nTHICKNESS" -flyout -10 -aligntext 1.0 0.0 0.0 -segment 10 -label right vcenter # Text on the left side - it is aligned vdimension dim5 -length -plane xoy -shapes lengthP4 lengthP3 -text 3d -flyout -10 -aligntext 1.0 0.0 0.0 -label left above -segment 10