<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Always readable text when rotated 270 degrees in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291880#M2866</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I am trying to get a GDL object with a "always readable text" in it. To this, I have found a tutorial, which seemed like the thing I want to do, but unfortunately, it does not work for me. &lt;BR /&gt;
&lt;BR /&gt;
The text is just not displayed correctly when the object is rotated 270 degrees, even though in the screen shot from the tutorial, it seems to work. What is displayed in my case, is a text rotation for 180 degrees, not 270.&lt;BR /&gt;
&lt;BR /&gt;
Here is the code / tutorial I used: &lt;A href="http://gdl.graphisoft.com/tips-and-tricks/how-to-make-an-always-readable-text-cs" target="_blank"&gt;&lt;LINK_TEXT text="http://gdl.graphisoft.com/tips-and-tric ... le-text-cs"&gt;http://gdl.graphisoft.com/tips-and-tricks/how-to-make-an-always-readable-text-cs&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Am I doing something wrong?&lt;BR /&gt;
(Trying to get this work in Archicad 20/22 SWE)&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 15 Mar 2019 12:36:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-03-15T12:36:16Z</dc:date>
    <item>
      <title>Always readable text when rotated 270 degrees</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291880#M2866</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I am trying to get a GDL object with a "always readable text" in it. To this, I have found a tutorial, which seemed like the thing I want to do, but unfortunately, it does not work for me. &lt;BR /&gt;
&lt;BR /&gt;
The text is just not displayed correctly when the object is rotated 270 degrees, even though in the screen shot from the tutorial, it seems to work. What is displayed in my case, is a text rotation for 180 degrees, not 270.&lt;BR /&gt;
&lt;BR /&gt;
Here is the code / tutorial I used: &lt;A href="http://gdl.graphisoft.com/tips-and-tricks/how-to-make-an-always-readable-text-cs" target="_blank"&gt;&lt;LINK_TEXT text="http://gdl.graphisoft.com/tips-and-tric ... le-text-cs"&gt;http://gdl.graphisoft.com/tips-and-tricks/how-to-make-an-always-readable-text-cs&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Am I doing something wrong?&lt;BR /&gt;
(Trying to get this work in Archicad 20/22 SWE)&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Mar 2019 12:36:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291880#M2866</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-15T12:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Always readable text when rotated 270 degrees</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291881#M2867</link>
      <description>Any ideas? Anyone?&lt;BR /&gt;
&lt;BR /&gt;
After playing with the code a little bit, I found out that the object totally ignores the "readable" part of the script. &lt;BR /&gt;
&lt;BR /&gt;
This was the original part of the script:&lt;BR /&gt;
&lt;BR /&gt;
if iTypeTextRotation = 2 then					! Readable&lt;BR /&gt;
    if (_totalRotate &amp;gt; (90 + EPS) &amp;amp; _totalRotate &amp;lt; (270 + EPS)) then&lt;BR /&gt;
        rot2 180&lt;BR /&gt;
        _nTrans = _nTrans + 1&lt;BR /&gt;
    endif&lt;BR /&gt;
&lt;BR /&gt;
And when I took away the "EPS" from the conditions, the object seems to work as it should.&lt;BR /&gt;
Okay, but then what does the "EPS" do in the script? Other than making it dysfunctional...&lt;BR /&gt;
&lt;BR /&gt;
Maybe someone more experienced can answer? Or maybe someone from Graphisoft can explain what's going on?&lt;BR /&gt;
&lt;BR /&gt;
As someone new to the GDL, it can be very frustrating that there is very little help online on the topic and even when there is, it seems to give misleading solutions.</description>
      <pubDate>Wed, 20 Mar 2019 19:13:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291881#M2867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-20T19:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Always readable text when rotated 270 degrees</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291882#M2868</link>
      <description>Did you download the example code via the link? You will find in the Master script the definition:&lt;BR /&gt;
EPS = 0.0001&lt;BR /&gt;
&lt;BR /&gt;
This is used when comparing real numbers as in the equation in the 2D script:&lt;BR /&gt;
&lt;BR /&gt;
if (_totalRotate &amp;gt; (90 + EPS) &amp;amp; _totalRotate &amp;lt; (270 + EPS)) then&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I agree GDL is not easy to learn, but the best way to start is with the old GDL Cookbook by David Nicholson-Cole (PDF available on internet). It is old but still useful for learning the basics.</description>
      <pubDate>Wed, 20 Mar 2019 21:06:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291882#M2868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-20T21:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Always readable text when rotated 270 degrees</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291883#M2869</link>
      <description>Thanks Graeme. No, I didn't download the files at first. I started with copying the code and defining parameters in my own object. And since there was no mention of any "EPS" variable in the tutorial, I have obviously missed it.&lt;BR /&gt;
&lt;BR /&gt;
I can see where it is used, that's where I've deleted it from to make my original code function. But it is still unclear to me what does it do in the "if" statement. Why would I need to add a 1/10000 degree rotation in that "if" condition?</description>
      <pubDate>Thu, 21 Mar 2019 10:49:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291883#M2869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-21T10:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Always readable text when rotated 270 degrees</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291884#M2870</link>
      <description>&lt;BLOCKQUOTE&gt;mbl wrote:&lt;BR /&gt;
But it is still unclear to me what does it do in the "if" statement. Why would I need to add a 1/10000 degree rotation in that "if" condition?
&lt;/BLOCKQUOTE&gt;

When you rotate an element by say 90° it should in theory be exactly 90°.&lt;BR /&gt;
But in reality it might be 90.000012° - either because of bad user input or rounding errors internally in the program (I think they call it floating point errors?).&lt;BR /&gt;
&lt;BR /&gt;
So the EPS value is a way of checking for rounding errors.&lt;BR /&gt;
The smaller the value for EPS the more accurate it will be - but you don't want it too small that it doesn't filter small rotation errors.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Fri, 22 Mar 2019 01:18:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291884#M2870</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2019-03-22T01:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Always readable text when rotated 270 degrees</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291885#M2871</link>
      <description>Thanks Barry, that makes sense.</description>
      <pubDate>Fri, 22 Mar 2019 11:20:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Always-readable-text-when-rotated-270-degrees/m-p/291885#M2871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-22T11:20:22Z</dc:date>
    </item>
  </channel>
</rss>

