TextEntity scale and height weird behaviour

I found a very strange behaviour of a TextEntity object. Not sure if it’s a bug or a feature :slight_smile:

Say, you create a TextEntity object base on a standart Rhino “Millimeter Architectural” Dimention Style . It has a scale of 100 and a size of 3mm. If I try to overirde the height with the value of 10mm it would work as expected - the resulted text size would be 10mm x 100 = 1000mm. But if I try to set height to 1mm it would use the default style font size (3mm) instead! If I set height to 0mm it would use 1mm for height.

Same with scale. I can’t set 1:1 scale because TextEntity would use style scale of 100 instead of 1.

I’ve assemled a simple script to try and test.

var text = new TextEntity();

text.PlainText = plainText;
text.Plane = plane;

var dimensionStyle = RhinoDocument.DimStyles.FindName(style);
text.DimensionStyleId = dimensionStyle.Id;

text.TextHeight = height;
text.DimensionScale = scale;

if (bake)
{
  RhinoDocument.Objects.AddText(text);
}

TextProbleme.gh (4.2 KB)

1 Like

it’s a huge bug