# How do I fit an array inside a shape without it cutting the edges?

How do I fit an array inside a shape so that it doesn’t truncate at the edges? See image below. I’ve tried with a bool, and it truncates. I don’t think fit to curve works for this?

• Did you try with geometry nodes? Should be pretty easy… Oct 22 at 18:19
• Ah no, hadn’t occurred to me! Will give it a go
– tomh
Oct 22 at 18:20
• Re geonodes: How do I evenly distribute across the geometry nodes, with nice separation? I can do "Point distribute random", but it's not array-like... And do I need to apply it to a cylinder to achieve the example above, as a circle doesn't seem to work? (sorry for dumb follow ups). Please add an example answer if you can!
– tomh
Oct 22 at 18:35
• the "trick" here is to use instance on points nodes (see my answer) Oct 23 at 1:55

Old school solution: You could use Instancing: Let's say you want to duplicate Suzanne. Create a tiny plane, array it on X and Y (Constant Offset mode), activate Object properties panel > Instancing > Faces, give it a Boolean (Intersect mode) with a cylinder as Object. Parent Suzanne to your plane. If there is a glitch when you scale the cylinder it's because the plane and the cylinder are intersecting, make sure that the plane is very small and it won't glitch.

• Whether I choose Fast or Exact on the Boolean, some of the Suzannes are rotated in he Z axis at the intersection with the Boolean, unlike in your example.
– tomh
Oct 23 at 15:30
• Actually with both the 2 solutions there may be a little "glitch" when the face is at the intersection of the boolean, I don't know if it's avoidable, but make sure the faces are very very small, and it looks like it becomes unnoticeable... Oct 23 at 15:31

update:

node setup for 2.93:

node setup for 3.0 alpha:

New school solution:

Add a plane, subdivided it as much as you need it.

Add a cylinder as cutter object.

Apply boolean modifier to plane with cylinder as object -> intersect.

So you got this:

Add another cylinder as Instance object (scale it in edit mode as much as you need it).

Add yet another cylinder (you can hide it later) in the middle of your plane (will be used for midpoint calculation, but could also just calculate the distance from the position if your plane is on 0/0/0 anyway). This cylinder is called Cylinder.001 in my example. Of course you could also use a sphere here...

Add a geometry nodes modifier to your plane with this node setup:

by changing the threshold you can cut off the ugly edge vertices:

result:

• Thanks for your answer! I can't find some of the nodes in your diagram, e.g. "Separate Geometry" and "Position". Am I doing something wrong? I'm using Blender 2.93.4. Am I missing an add-on? From your list: Position NO Object info YES Distance NO Less Than NO (attribute compare?) Separate Geometry (attribute separate XYZ?) Instance on Points (Point Instance?)
– tomh
Oct 23 at 10:44
• Oh ok, sorry, i used the newest 3.0 alpha version…didn’t know you are using 2.93 Oct 23 at 11:15
• Is it possible to do it with 2.93? Would rather not sit on the bleeding edge if possible!
– tomh
Oct 23 at 15:44
• yes it is, i update my answer. Oct 23 at 16:04
• Many thanks, it worked! I had to add an "Attribute Random - scale" node before the Point Instance node in order to shrink the repeating objects down - they were coming out massive for some reason.
– tomh
Oct 23 at 16:19