We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Can I merge my cprism_{4}'s?

JGoode
Expert
Hi,

I have created a hatch in 3D using for i=1 to and cprisms...

Is there anyway that I can get them to merge so that their lines in a project2 are continuous and don't create diamonds at each crossing point?
	for i=1 to 40
		cprism_{4} mat_hatching, mat_hatching, mat_hatching, 7,
				5,          line_height,
				          0,            0,            0,     15, mat_hatching,
					10,            0,            0,     15, mat_hatching,
					 10,          hatching_width,            0,     15, mat_hatching,
					   0,          hatching_width,            0,     15, mat_hatching,
				           0,            0,            0,     -1, mat_hatching

		addy hatching_space
		next i
						
		DEL 40
		DEL 2

		addy 10
		rotz -45

		for i=1 to 40
		cprism_{4} mat_hatching, mat_hatching, mat_hatching, 7,
				5,          line_height,
						  0,            0,            0,     15, mat_hatching,
						10,            0,            0,     15, mat_hatching,
						10,          hatching_width,            0,     15, mat_hatching,
						  0,          hatching_width,            0,     15, mat_hatching,
						  0,            0,            0,     -1, mat_hatching
		addy -hatching_space
		next i
Thanks
ArchiCAD 23

Windows 10
4 REPLIES 4
Lingwisyer
Guru
Could you take your cprism out of the loop and put it into a GROUP. Then within your loop, have:
shape[i+1] = ADDGROUP ( shape_cprism, shape )

Then after your loop have:
PLACEGROUP shape
FOR ii = 1 to 40
KILLGROUP shape[ii]
NEXT ii



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Barry Kelly
Moderator
Or instead of placing the prism slats, place one big slab and then cut holes from it using your loop.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
JGoode
Expert
Lingwisyer wrote:
Could you take your cprism out of the loop and put it into a GROUP. Then within your loop, have:
shape[i+1] = ADDGROUP ( shape_cprism, shape )

Then after your loop have:
PLACEGROUP shape
FOR ii = 1 to 40
KILLGROUP shape[ii]
NEXT ii
I tried this but I get a "Group name or group expression required at line..." error.

This is my code:
		group "shape_cprism1"
			cprism_{4} mat_hatching, mat_hatching, mat_hatching, 7,
					5,          line_height,
						   0,            0,            0,     15, mat_hatching,
						 10,            0,            0,     15, mat_hatching,
						 10,          hatching_width,            0,     15, mat_hatching,
						   0,          hatching_width,            0,     15, mat_hatching,
						   0,            0,            0,     -1, mat_hatching
		        endgroup

			dim shape[]
						
			for i=1 to 40
				shape[i+1] = ADDGROUP (shape_cprism1, shape)
				addy hatching_space
			next i
						
			DEL 40
			DEL 2

			PLACEGROUP shape
			for ii=1 to 40
			KILLGROUP shape[ii]
			next ii
ArchiCAD 23

Windows 10
Lingwisyer
Guru
Oh, that is due to bad syntax in the SOE. Groups need to be defined in "..." or be a variable. My bad... Not sure how to work that with an array though...



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660