1
$\begingroup$

I am trying to fill an object (in this case a sphere) with a lines pattern. So my naive way to do this is to restrict the lines with a boolean modifier by:

  1. Create some lines (here I just duplicated a single line and convert them to meshes and then join them)
  2. Make them a mesh
  3. Apply a boolean modifier to "cut" them so they are only display inside the sphere.

However none of the options of the modifier allow me to do this. All lines disappear. Why I am not able to do this with the boolean modifier?

The problem still holds if I try to do this with only 1 line.

Also, is there a better way to do this? By this I mean filling a mesh with a line pattern.

Example problem

$\endgroup$
4
  • 1
    $\begingroup$ Booleaning simple edges doesn't seem to work, if this is what you're trying to do... $\endgroup$
    – moonboots
    Sep 18, 2023 at 7:46
  • $\begingroup$ Ok @moonboots, so the answer to my question is that this is not possible. Do you have any link or resource then that I can use to obtain what I am trying to do? cheers. $\endgroup$
    – Iván
    Sep 18, 2023 at 7:54
  • $\begingroup$ Maybe with geometry nodes? Or use a mesh with faces instead and once you've applied the Boolean, delete the faces only? $\endgroup$
    – moonboots
    Sep 18, 2023 at 7:56
  • $\begingroup$ I would use GN. But just out of curiosity, what's the point of having a bunch of edges without faces? You can't render them at all, can you? $\endgroup$
    – Blunder
    Sep 18, 2023 at 13:56

2 Answers 2

2
$\begingroup$

Boolean Intersection

For boolean you need manifold geometry. After boolean you can reproduce the original edges (except for their changed length) by collapsing the geometry back to an edge. Below I'm removing the 'long' faces (I capture the caps and input geometry surface to reliably select the faces that are not original caps / current caps after cutting, delete them, and then scale the remaining faces (caps), which collapses the edges:

This is how it would look like if the beveling was 100 times thicker:

$\endgroup$
6
  • $\begingroup$ Cool, this worked! With which parameter are you controlling the beveling? Honestly, when you make this in geometry nodes I have the feeling that you guys are wizards. I am still really far of being able to think in terms of GN. Thanks! $\endgroup$
    – Iván
    Sep 20, 2023 at 23:00
  • $\begingroup$ With the "Scale Elements" node I can control the face size but the sides are only lines and don't are filled with faces. $\endgroup$
    – Iván
    Sep 20, 2023 at 23:08
  • $\begingroup$ I am almost there Markus, which parameter are you using? Cheers! $\endgroup$
    – Iván
    Sep 21, 2023 at 22:23
  • $\begingroup$ @Iván show your setup; literally all you need to do is to increase Size X and Size Y from $1$ to $2$ in both of my setups. See edits in both answers for .blend files. $\endgroup$ Sep 22, 2023 at 7:52
  • $\begingroup$ My question was related to the firsts frames of your gif, where all the lines are filled and not just the portion that interect the faces of the sphere. I am getting this ibb.co/1mVZSdY with your code, which only show faces filled where they intersect the sphere but they are not fully filled. Is there any parameter that controls that? I am not being able to reproduce that part of the GIF that is what I want. I want the the lines to have some thickness and not just the wires of the structure :) . THanks! $\endgroup$
    – Iván
    Sep 22, 2023 at 8:37
1
$\begingroup$

Raycasting

If you have convex geometry (otherwise you would need to do it iteratively, like Hulifier does here), you can raycast towards the normal and in the opposite direction, get the average of the two (center), and position a line there, scaling it up to fill the space between the two ray hits:

It's much more performant (and reliable, even if you decide to implement repeated raycasts for non-convex geo) than my other answer:

$\endgroup$
3
  • $\begingroup$ Hey Markus, thank you very much, but still I am not getting the final result. My sphere is not fully populated by the lines, but partially. I think I followed your explanation, not sure if I am missing something. I upload a picture of the result and my nodes ibb.co/6r8ctCx ibb.co/xFD6dv8 $\endgroup$
    – Iván
    Sep 20, 2023 at 5:05
  • $\begingroup$ Sorry, this was a comment to your other answer, but I am having the same problem as well with this some. Thanks! $\endgroup$
    – Iván
    Sep 20, 2023 at 5:40
  • 1
    $\begingroup$ @Iván increase your grid's size (or decrease your sphere's size) - you can see in my answer the lines also don't fill the sphere completely, which was done on purpose. $\endgroup$ Sep 20, 2023 at 9:19

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .