]> OCCT Git - occt-copy.git/commitdiff
Small correction
authoraba <aba@opencascade.com>
Mon, 10 Aug 2015 18:26:38 +0000 (21:26 +0300)
committeraba <aba@opencascade.com>
Mon, 10 Aug 2015 18:26:38 +0000 (21:26 +0300)
src/AIS/AIS_Dimension.cxx
tests/bugs/vis/bug26507_4
tests/bugs/vis/bug26507_5

index bc3b8ade5092753aecbbd4e1c74893a2cf5e610a..899132b58b4f40334af94fa82f44cff7daedcecc 100755 (executable)
@@ -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);
 
index d3df0614a05a06f88996751822490f8e8551caa8..1a82836c47e02647b47d86def0734bc1d4fcc040 100644 (file)
@@ -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
 
index 755c25e645f3eb3bba5aec8c21b0aa1e8b4fcea6..ab823f340866cf308d9f0801df1854f1c21a2a37 100644 (file)
@@ -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