2
$\begingroup$

I want to extrude a set of (unfilled) vertices along one major axis.

I somewhat managed to do that converting it to a curve and using that curve as the profile curve for "Curve to mesh" node, the principal curve being a curve line for which I can control the resolution.

To extrude in the Z axis I don't need to rotate anything (contro-intuitively if you ask me), but if I want to extrude along X or Y I need to to rotate the profile curve. I do that in an hackish way, found by attempts and errors...

What is the sane, elegant, beautiful way of doing this? Thanks

Screenshot of what I managed to accomplish

PS: I wanted to attach the example file depicted above, but I am still trying to understand how to do it

Edit: Here is the file, but I hope the screenshot is clear enough

Example file

$\endgroup$

1 Answer 1

1
$\begingroup$

This is how I'd do it, though it's not clear if you want to e.g. support multiple axes extrusion, and if you want the profile to be rotated then, or maybe you would like the extrusion direction to be automatic based on the normal of the profile (though not filled profile has no normal, so it would be a guess about the direction...)

$\endgroup$
4
  • $\begingroup$ Thanks for taking the time to help me. Your solution works perfectly. It supports multiple axes extrusion as well, something I did not expect, which is very useful. You mentioned, 'maybe you would like the extrusion direction to be automatic based on the normal of the profile.' Yes, that would be very good, but as you mentioned, in a profile without faces, there is no way to calculate a normal... or is there? $\endgroup$
    – crucchi
    Commented Oct 21, 2023 at 16:31
  • 1
    $\begingroup$ @crucchi you can fill the verts as I do with the convex hull, merge by distance to ensure just one face, read the normal of the face. However, the normal could point in the wrong direction. You could maybe get the direction from the order of indices… In such case you could also calculate the normal as a cross product of offset v0→v1 × offset v1→v2. $\endgroup$ Commented Oct 21, 2023 at 17:13
  • 1
    $\begingroup$ So, this was your intention regarding making a guess about the direction... It makes sense. I suppose I can assume the default direction is the positive X (or Y, or Z), and if I want to go the other way, I will fill the (now) single "Extrusion amount" input with a negative number. Many thanks, I greatly appreciate your help $\endgroup$
    – crucchi
    Commented Oct 21, 2023 at 17:27
  • $\begingroup$ it seems there is a problem that escaped our attention. The top object, the one extruded along the X-axis, is also rotated around the X-axis by some amount $\endgroup$
    – crucchi
    Commented Oct 22, 2023 at 15:05

You must log in to answer this question.

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