BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Set vectorial fill origin within object

Anonymous
Not applicable
I have a simple block in my 3D object which contains a surface with a vectorial fill.
The fill seems to relate to the global origin. Is there a way to link the fill to the objects origin point.
I want the fill to move with the object.

I tried looking at the COOR command without luck.

Cheers
Tom
3 REPLIES 3
Barry Kelly
Moderator
COOR is used to align 3D textures.
In 2D you can use the POLY2_b{2}

This is a bit of my code for a tiled bath hob in 2D.

I just noticed the code blocks have scroll bars in this new forum.
I thought part of it was missing at first - just scroll.
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

And the same hob in 3D

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

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
JGoode
Advocate
Hi Barry,

For the 3D, is there any way that I can set the angle too?

Thanks
ArchiCAD 23

Windows 10
JGoode
Advocate
I worked out how to change the angle by doing the following:
	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
ArchiCAD 23

Windows 10
Learn and get certified!