<?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 Re: SYMB_MIRRORED in X or Y direction in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185786#M13189</link>
    <description>&lt;BLOCKQUOTE&gt;sinceV6 wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ila2 wrote:&lt;BR /&gt;and for the shorter and faster code you can use this (without IF conditions):&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
   MUL2 1 - 2 * symb_mirrored, 1 &lt;BR /&gt;
   ROT2 -symb_rotangle &lt;B&gt;* (symb_rotangle &amp;lt;&amp;gt; 0)&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
&lt;BR /&gt;
   DEL 2&lt;/BLOCKQUOTE&gt;

That's nice!&lt;BR /&gt;
The bold part is evaluating as a boolean right?, so in this case the parenthesis work as an IF statement? Maybe I have missed that use in the documentation... or is it not documented? Never picked up that syntax before... pretty efficient!&lt;/BLOCKQUOTE&gt;

Yes, it is. The value of the bold part is 1 if the statement is true and 0 if is is not true. I don't know that it is documented or not. I don't remember where/when I learned it.</description>
    <pubDate>Tue, 20 Aug 2013 16:24:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-20T16:24:37Z</dc:date>
    <item>
      <title>SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185777#M13180</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I have a bit of a problem. I have an object that I need to look the same, no matter whether I mirror it in the X or Y direction&lt;BR /&gt;
&lt;BR /&gt;
In my 2D script I have added the following script, which works well when mirrored over the X axis.&lt;BR /&gt;
&lt;BR /&gt;
IF SYMB_MIRRORED THEN&lt;BR /&gt;
MUL2 1,-1&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
However this will not work if the same object is mirrored in the Y axis instead&lt;BR /&gt;
&lt;BR /&gt;
Is this a limitation of ArchiCAD, or just my ability&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 Aug 2013 08:07:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185777#M13180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-19T08:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185778#M13181</link>
      <description>Hi Tom&lt;BR /&gt;
&lt;BR /&gt;
Best bet by far mate is to do it via rotation not through mul.&lt;BR /&gt;
Say if it's rotated 90 degrees in the symb_rotangle then rotate it back.&lt;BR /&gt;
Then if it's mirrored in any way rotate it back also.&lt;BR /&gt;
Something like&lt;BR /&gt;
If symb_mirrored then&lt;BR /&gt;
    rot2 symb_rotangle&lt;BR /&gt;
else rot2 -symb_rotangle</description>
      <pubDate>Mon, 19 Aug 2013 08:41:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185778#M13181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-19T08:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185779#M13182</link>
      <description>Thanks Kristian,&lt;BR /&gt;
I think I will try your solution with future objects, but I ended up doing a combination of both, which worked well with the text in this object&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
if symb_rotangle &amp;gt;= 0 and symb_rotangle &amp;lt; 90 then&lt;BR /&gt;
	rot2 0&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
if symb_rotangle &amp;gt;= 90 and symb_rotangle &amp;lt; 180 then&lt;BR /&gt;
	rot2 -90&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
if symb_rotangle &amp;gt;= 180 and symb_rotangle &amp;lt; 270 then&lt;BR /&gt;
	rot2 -180&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
if symb_rotangle &amp;gt;= 270 and symb_rotangle &amp;lt; 360 then&lt;BR /&gt;
	rot2 -270&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
IF SYMB_MIRRORED THEN&lt;BR /&gt;
	MUL2 1,-1&lt;BR /&gt;
	else&lt;BR /&gt;
	mul2 1,1&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
pen outlinepen&lt;BR /&gt;
poly2_b 5,3,0,0,&lt;BR /&gt;
-0.3,-0.3,1,&lt;BR /&gt;
0.3,-0.3,1,&lt;BR /&gt;
0.3,0.3,1,&lt;BR /&gt;
-0.3,0.3,1,&lt;BR /&gt;
-0.3,-0.3,1&lt;BR /&gt;
pen innerline&lt;BR /&gt;
line2 -0.3,-0.3,0.3,0.3&lt;BR /&gt;
&lt;BR /&gt;
del 1&lt;BR /&gt;
If symb_mirrored then &lt;BR /&gt;
	rot2 symb_rotangle &lt;BR /&gt;
	mul2 -1,1&lt;BR /&gt;
else&lt;BR /&gt;
	rot2 -symb_rotangle&lt;BR /&gt;
endif&lt;BR /&gt;
rot2 symb_rotangle&lt;BR /&gt;
&lt;BR /&gt;
pen waa_text_pen&lt;BR /&gt;
text2 -0.135,0.1, "A"&lt;BR /&gt;
text2 0.155,-0.125, "P"</description>
      <pubDate>Mon, 19 Aug 2013 23:28:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185779#M13182</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-19T23:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185780#M13183</link>
      <description>Tom,&lt;BR /&gt;
You actually had it almost right in your first post except you are un-mirroring it by MULing the Y-axis instead of the X-axis.&lt;BR /&gt;
&lt;BR /&gt;
I have a hotplate object that I never want to be mirrored so I have added this at the beginning of the 2D script (similar is needed for the 3D as well).&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#ff0024"&gt;IF symb_mirrored = 1 THEN&lt;BR /&gt;
ADD2 a,0&lt;BR /&gt;
MUL2 -1, 1&lt;BR /&gt;
ENDIF&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
The only reason I have the ADD2 in there is because to object is not centred on the origin - it is modelled with the leftside of the object on the origin.&lt;BR /&gt;
If your object is centred on the origin then you could delete that line.&lt;BR /&gt;
&lt;BR /&gt;
This will allow the object to be rotated at any angle but it can never be mirrored.&lt;BR /&gt;
If you don't want it to rotate either then you will need to start using your SYMB_ROTANGLE.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Tue, 20 Aug 2013 01:54:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185780#M13183</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2013-08-20T01:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185781#M13184</link>
      <description>Thanks Barry,&lt;BR /&gt;
But I actually needed my object not to be mirrored in either x or y directions.&lt;BR /&gt;
The code is a tad long, but works quite well&lt;BR /&gt;
&lt;BR /&gt;
The image below shows 4 versions of the old object before I added the MUL2 and ROT2 commands. The top right image is the non mirrored object, where the other 3 are mirrored in various ways</description>
      <pubDate>Tue, 20 Aug 2013 03:12:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185781#M13184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-20T03:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185782#M13185</link>
      <description>Try this for a simpler code.&lt;BR /&gt;

&lt;PRE&gt;if symb_mirrored = 1 then 
	MUL2 -1, 1 
endif 

if symb_rotangle &amp;lt;&amp;gt; 0 then
	ROT2 -symb_rotangle
endif

 pen outlinepen 
 poly2_b 5,3,0,0, 
 -0.3,-0.3,1, 
 0.3,-0.3,1, 
 0.3,0.3,1, 
 -0.3,0.3,1, 
 -0.3,-0.3,1 
 pen innerline 
 line2 -0.3,-0.3,0.3,0.3 

 pen waa_text_pen 
 text2 -0.135,0.1, "A" 
 text2 0.155,-0.125, "P"  

if symb_mirrored = 1 then 
	DEL 1 
endif 

if symb_rotangle &amp;lt;&amp;gt; 0 then
	DEL 1
endif&lt;/PRE&gt;

This won't allow you to rotate it any angle at all where as yours only un-rotates if at 0, 90, 180 or 270.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Tue, 20 Aug 2013 03:39:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185782#M13185</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2013-08-20T03:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185783#M13186</link>
      <description>That's good, that's a nice way of rotating it correctly all the time. I will use that in the future.&lt;BR /&gt;
For this case though I only want mine at 90 degree intervals just encase we need to rotate an access panel on an angle</description>
      <pubDate>Tue, 20 Aug 2013 03:53:04 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185783#M13186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-20T03:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185784#M13187</link>
      <description>and for the shorter and faster code you can use this (without IF conditions):&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
   MUL2 1 - 2 * symb_mirrored, 1 &lt;BR /&gt;
   ROT2 -symb_rotangle * (symb_rotangle &amp;lt;&amp;gt; 0)&lt;BR /&gt;
&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
&lt;BR /&gt;
   DEL 2</description>
      <pubDate>Tue, 20 Aug 2013 12:51:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185784#M13187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-20T12:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185785#M13188</link>
      <description>&lt;BLOCKQUOTE&gt;ila2 wrote:&lt;BR /&gt;and for the shorter and faster code you can use this (without IF conditions):&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
   MUL2 1 - 2 * symb_mirrored, 1 &lt;BR /&gt;
   ROT2 -symb_rotangle &lt;B&gt;* (symb_rotangle &amp;lt;&amp;gt; 0)&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
&lt;BR /&gt;
   DEL 2&lt;/BLOCKQUOTE&gt;

That's nice!&lt;BR /&gt;
The bold part is evaluating as a boolean right?, so in this case the parenthesis work as an IF statement? Maybe I have missed that use in the documentation... or is it not documented? Never picked up that syntax before... pretty efficient!</description>
      <pubDate>Tue, 20 Aug 2013 14:36:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185785#M13188</guid>
      <dc:creator>sinceV6</dc:creator>
      <dc:date>2013-08-20T14:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185786#M13189</link>
      <description>&lt;BLOCKQUOTE&gt;sinceV6 wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;ila2 wrote:&lt;BR /&gt;and for the shorter and faster code you can use this (without IF conditions):&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
   MUL2 1 - 2 * symb_mirrored, 1 &lt;BR /&gt;
   ROT2 -symb_rotangle &lt;B&gt;* (symb_rotangle &amp;lt;&amp;gt; 0)&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
           ...........................&lt;BR /&gt;
&lt;BR /&gt;
   DEL 2&lt;/BLOCKQUOTE&gt;

That's nice!&lt;BR /&gt;
The bold part is evaluating as a boolean right?, so in this case the parenthesis work as an IF statement? Maybe I have missed that use in the documentation... or is it not documented? Never picked up that syntax before... pretty efficient!&lt;/BLOCKQUOTE&gt;

Yes, it is. The value of the bold part is 1 if the statement is true and 0 if is is not true. I don't know that it is documented or not. I don't remember where/when I learned it.</description>
      <pubDate>Tue, 20 Aug 2013 16:24:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185786#M13189</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-20T16:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185787#M13190</link>
      <description>I seem to remember reading this somewhere in GDL documentation.&lt;BR /&gt;
Basically you create an equation which evaluates to TRUE (1) or FALSE (0). I think it is also possible to create a numeric expression the result of which can be 1 (which will be TRUE) or some other value (which will be FALSE) - I am not totally sure about this part, that a non-1 value will be considered FALSE, so please test this if you use it.&lt;BR /&gt;
But a simple use of this would be something like&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;If SYMB_MIRRORED THEN
....
Endif
&lt;/PRE&gt;

So you would not have to write &lt;BR /&gt;

&lt;PRE&gt;If SYMB_MIRRORED = 1 THEN
....
Endif&lt;/PRE&gt;

This of course works best if the variable is a Boolean Type because its value is then always either TRUE (1) or FALSE (0).</description>
      <pubDate>Wed, 21 Aug 2013 14:32:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185787#M13190</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2013-08-21T14:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185788#M13191</link>
      <description>&lt;BLOCKQUOTE&gt;laszlonagy wrote:&lt;BR /&gt;I seem to remember reading this somewhere in GDL documentation.&lt;BR /&gt;
Basically you create an equation which evaluates to TRUE (1) or FALSE (0). I think it is also possible to create a numeric expression the result of which can be 1 (which will be TRUE) or some other value (which will be FALSE) - I am not totally sure about this part, that a non-1 value will be considered FALSE, so please test this if you use it.&lt;BR /&gt;
But a simple use of this would be something like&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;If SYMB_MIRRORED THEN
....
Endif
&lt;/PRE&gt;

So you would not have to write &lt;BR /&gt;

&lt;PRE&gt;If SYMB_MIRRORED = 1 THEN
....
Endif&lt;/PRE&gt;

This of course works best if the variable is a Boolean Type because its value is then always either TRUE (1) or FALSE (0).&lt;/BLOCKQUOTE&gt;

You are right László.&lt;BR /&gt;
And generally we don't use for boolen type parameter eg:&lt;BR /&gt;
   SYMB_MIRRORED &amp;lt;&amp;gt; 1   or SYMB_MIRRORED = 0&lt;BR /&gt;
we used to use:&lt;BR /&gt;
   not(SYMB_MIRRORED)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
So the code is more understandable if you use eg SYMB_MIRRORED or not(SYMB_MIRRORED) for boolen type parameters.</description>
      <pubDate>Wed, 21 Aug 2013 14:45:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185788#M13191</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-21T14:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185789#M13192</link>
      <description>&lt;BLOCKQUOTE&gt;laszlonagy wrote:&lt;BR /&gt; I am not totally sure about this part, that a non-1 value will be considered FALSE, &lt;/BLOCKQUOTE&gt;
In fact, all non-zero values are TRUE.&lt;BR /&gt;
It will return a True value for any positive or negative value other than 0.</description>
      <pubDate>Tue, 27 Aug 2013 09:58:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185789#M13192</guid>
      <dc:creator>rocorona</dc:creator>
      <dc:date>2013-08-27T09:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: SYMB_MIRRORED in X or Y direction</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185790#M13193</link>
      <description>Thanks for the clarification, Roberto.&lt;BR /&gt;
I was not sure about that, as I mentioned.&lt;BR /&gt;
So 0 is FALSE, any other value is TRUE.</description>
      <pubDate>Tue, 27 Aug 2013 10:43:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/SYMB-MIRRORED-in-X-or-Y-direction/m-p/185790#M13193</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2013-08-27T10:43:52Z</dc:date>
    </item>
  </channel>
</rss>

