4
$\begingroup$

Flattening out base of object using geometry nodes.

I have an object.

img 1

And would like the base to be flattened out using geometry nodes without having to type in each face index manually.

I know I can extrude - scale - z - 0 but I'm having some trouble with geometry nodes since the shape is "awkward". (I would like a flat base since it will be 3D printed but I would like to flatten the base using geometry nodes)

img2

My thought was to select the bottom faces do the extrude and scale - z - 0 but I'm picking up other faces (see red arrows).

img3

img4

Any ideas how to select just the bottom faces and flatten them out?

I did look at Flattening out and dissolving faces using geometry nodes but the current shape I'm using has awkward angles that go back up.

Update: This is a continuation from this question. Calculating and aligning the angles needed to create different corner connectors to join / create various polyhedrons using geometry nodes

See attached Blend file.

Update 2: To answer Markus comment about providing multiple examples.

pin1

pin2

pin several

pin several 2

Blender file with the connectors.

$\endgroup$
9
  • $\begingroup$ One question: are there a lot of objects where you have to do this with an automated process? Otherwise, for 3D printing you have to get rid of all modifiers anyway and convert it all to a mesh object. So why not simply use the extrude + scale method? And if it's just for this one specific object, you can try to identify the faces by their IDs and use this selection to only flatten them. $\endgroup$ Commented Jul 14, 2023 at 10:04
  • $\begingroup$ @GordonBrinkmann yes lots. It's based from this question blender.stackexchange.com/questions/296525/… So it could be a lot, Different types of connectors along with different types of polyhedra. $\endgroup$
    – Rick T
    Commented Jul 14, 2023 at 11:11
  • 1
    $\begingroup$ Okay, but if they look very individually different, I would not even know exactly how to define what criteria have to be met to select a face that should be flattened versus the rest of the mesh. And if we don't know how different they can be, how should we blindly find some methods to distinguish them and be sure that they work for all objects? $\endgroup$ Commented Jul 14, 2023 at 11:16
  • 1
    $\begingroup$ Did you generate the object(s) with GN? If so, you could probably mark the faces to be flattened during construction? $\endgroup$
    – Robin Betts
    Commented Jul 14, 2023 at 11:22
  • $\begingroup$ @RobinBetts it wasn't created directly in GN but each connector starts off separated, maybe alter the bottom of the connector before they are joined.. Thanks I'll look into it. $\endgroup$
    – Rick T
    Commented Jul 14, 2023 at 11:29

1 Answer 1

5
$\begingroup$

Based on info provided: out of the vertices not more than $0.001$ away from $z$ axis, find the minimum $z$, then find the index of that vertex, put weight on that vertex, let it 'spill' onto faces using float interpolation, select those faces and extrude them, but with no offset (you may want to change that), scale them to 0 by setting Z component to the lowest (therefore another attribute stat), merge by distance (needed because of zero extrusion).

$\endgroup$
3
  • $\begingroup$ a slightly simpler setup would also work: i.imgur.com/6n0y3Pk.png $\endgroup$ Commented Jul 14, 2023 at 16:19
  • $\begingroup$ If the vertex is exactly in the center, I think that is a wonderful solution! $\endgroup$
    – quellenform
    Commented Jul 14, 2023 at 16:33
  • $\begingroup$ This is really a nice solution! $\endgroup$
    – Rick T
    Commented Jul 14, 2023 at 21:23

You must log in to answer this question.

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