<?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: Set vectorial fill origin within object in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265241#M4253</link>
    <description>COOR is used to align 3D textures.&lt;BR /&gt;
In 2D you can use the POLY2_b{2}&lt;BR /&gt;
&lt;BR /&gt;
This is a bit of my code for a tiled bath hob in 2D.&lt;BR /&gt;
&lt;BR /&gt;
I just noticed the code blocks have scroll bars in this new forum.&lt;BR /&gt;
I thought part of it was missing at first - just scroll.&lt;BR /&gt;

&lt;PRE&gt;if adjust_tile_plan_origin = 1 then
	!Stretchy x - plan tile origin
	HOTSPOT2 0, tile_fill_origin_y, 22+HSID_add*(10^macro_level), tile_fill_origin_x, 1+128		!base
	HOTSPOT2 -0.0001, tile_fill_origin_y, 23+HSID_add*(10^macro_level), tile_fill_origin_x, 3			!reference
	HOTSPOT2 tile_fill_origin_x, tile_fill_origin_y, 24+HSID_add*(10^macro_level), tile_fill_origin_x, 2	!moveable

	!Stretchy y - plan tile origin
	HOTSPOT2 tile_fill_origin_x, 0, 25+HSID_add*(10^macro_level), tile_fill_origin_y, 1+128		!base
	HOTSPOT2 tile_fill_origin_x, -0.0001, 26+HSID_add*(10^macro_level), tile_fill_origin_y, 3			!reference
	HOTSPOT2 tile_fill_origin_x, tile_fill_origin_y, 27+HSID_add*(10^macro_level), tile_fill_origin_y, 2	!moveable
endif

SET FILL tile_fill_plan
	
POLY2_B{2} 5, 1*1 + 2*1 + 4*1 + 8*1 + 16*0 + 32*0 +64*0,
	tile_fill_hatch_pen, tile_fill_back_pen,
	tile_fill_origin_x, tile_fill_origin_y, 0,
		0,0,33,
		0,b,33,
		a,b,33,
		a,0,33,
		0,0,-1&lt;/PRE&gt;

&lt;BR /&gt;
And the same hob in 3D&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;prism_ 5, hob_height,
	0,0,15,
	0,b,15,
	a,b,15,
	a,0,15,
	0,0,-1!,

VERT 0+tile_fill_origin_x,0+tile_fill_origin_y,0 !Origin
VERT 1+tile_fill_origin_x,0+tile_fill_origin_y,0 !X direction
VERT 0+tile_fill_origin_x,1+tile_fill_origin_y,0 !Y direction
VERT 0+tile_fill_origin_x,0+tile_fill_origin_y,1 !Z direction
COOR 2+256,1,2,3,4
body -1
&lt;/PRE&gt;

&lt;BR /&gt;
Barry.</description>
    <pubDate>Wed, 07 Feb 2018 06:13:33 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2018-02-07T06:13:33Z</dc:date>
    <item>
      <title>Set vectorial fill origin within object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265240#M4252</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I have a simple block in my 3D object which contains a surface with a vectorial fill.&lt;BR /&gt;
The fill seems to relate to the global origin. Is there a way to link the fill to the objects origin point.&lt;BR /&gt;
I want the fill to move with the object.&lt;BR /&gt;
&lt;BR /&gt;
I tried looking at the COOR command without luck.&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;BR /&gt;
Tom&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Feb 2018 04:34:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265240#M4252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-07T04:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set vectorial fill origin within object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265241#M4253</link>
      <description>COOR is used to align 3D textures.&lt;BR /&gt;
In 2D you can use the POLY2_b{2}&lt;BR /&gt;
&lt;BR /&gt;
This is a bit of my code for a tiled bath hob in 2D.&lt;BR /&gt;
&lt;BR /&gt;
I just noticed the code blocks have scroll bars in this new forum.&lt;BR /&gt;
I thought part of it was missing at first - just scroll.&lt;BR /&gt;

&lt;PRE&gt;if adjust_tile_plan_origin = 1 then
	!Stretchy x - plan tile origin
	HOTSPOT2 0, tile_fill_origin_y, 22+HSID_add*(10^macro_level), tile_fill_origin_x, 1+128		!base
	HOTSPOT2 -0.0001, tile_fill_origin_y, 23+HSID_add*(10^macro_level), tile_fill_origin_x, 3			!reference
	HOTSPOT2 tile_fill_origin_x, tile_fill_origin_y, 24+HSID_add*(10^macro_level), tile_fill_origin_x, 2	!moveable

	!Stretchy y - plan tile origin
	HOTSPOT2 tile_fill_origin_x, 0, 25+HSID_add*(10^macro_level), tile_fill_origin_y, 1+128		!base
	HOTSPOT2 tile_fill_origin_x, -0.0001, 26+HSID_add*(10^macro_level), tile_fill_origin_y, 3			!reference
	HOTSPOT2 tile_fill_origin_x, tile_fill_origin_y, 27+HSID_add*(10^macro_level), tile_fill_origin_y, 2	!moveable
endif

SET FILL tile_fill_plan
	
POLY2_B{2} 5, 1*1 + 2*1 + 4*1 + 8*1 + 16*0 + 32*0 +64*0,
	tile_fill_hatch_pen, tile_fill_back_pen,
	tile_fill_origin_x, tile_fill_origin_y, 0,
		0,0,33,
		0,b,33,
		a,b,33,
		a,0,33,
		0,0,-1&lt;/PRE&gt;

&lt;BR /&gt;
And the same hob in 3D&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;prism_ 5, hob_height,
	0,0,15,
	0,b,15,
	a,b,15,
	a,0,15,
	0,0,-1!,

VERT 0+tile_fill_origin_x,0+tile_fill_origin_y,0 !Origin
VERT 1+tile_fill_origin_x,0+tile_fill_origin_y,0 !X direction
VERT 0+tile_fill_origin_x,1+tile_fill_origin_y,0 !Y direction
VERT 0+tile_fill_origin_x,0+tile_fill_origin_y,1 !Z direction
COOR 2+256,1,2,3,4
body -1
&lt;/PRE&gt;

&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 07 Feb 2018 06:13:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265241#M4253</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2018-02-07T06:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set vectorial fill origin within object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265242#M4254</link>
      <description>Hi Barry,&lt;BR /&gt;
&lt;BR /&gt;
For the 3D, is there any way that I can set the angle too?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Tue, 23 Apr 2019 11:58:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265242#M4254</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2019-04-23T11:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set vectorial fill origin within object</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265243#M4255</link>
      <description>I worked out how to change the angle by doing the following:&lt;BR /&gt;

&lt;PRE&gt;	if (origin = "Manual Origin") then
		addx fill_ori_x
		addy fill_ori_y
		ROTz ang
		VERT 0,0,0 !Origin
		VERT 1,0,0 !X direction
		VERT 0,1,0 !Y direction
		VERT 0,0,1 !Z direction
		COOR 2+256,1,2,3,4
		body -1
		DEL 3
	endif&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Apr 2019 13:16:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Set-vectorial-fill-origin-within-object/m-p/265243#M4255</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2019-04-23T13:16:16Z</dc:date>
    </item>
  </channel>
</rss>

