I am trying to find a way to create procedural extrusions of an object. Assume our base object is a manifold object with a curved surface, such as a sphere (Fig 1). I would like to use a Curve object or similar to create an outline which is snapped to the object's surface (Fig 2). Is there any procedural way or workflow, to use this outline to create an extrusion of the base object? (Fig 3 for approximate result). I would like to have a procedural/reversible workflow so I can adjust the outline afterwards if necessary.
Any proposed workflow is allowed (Geometry Nodes, Modifiers, coding, ...).
EDIT: Alex's answer provides a working solution - most of the time. Some important additions to his answer:
- Make sure to add the Geometry Nodes Modifier to the base object (the object you want the extrusion to land on) and not the actual Curve object;
- Use Relative in the Object Info Node instead of Original since the two objects don't necessarily have the same transformations;
- The cutter shape should be a Curve object; in Edit Mode, use the Draw function to draw the desired shape. Make sure the drawing is 1) projected to the surface of the base object, 2) done anti-clockwise, and 3) forms a closed loop, otherwise the Booleans won't work;
- Don't forget to assign the Curve object and set the Extrusion scale in the Modifiers menu of the base object;
- This should be obvious, but if you want to retain the extrusion only (excluding the original base object), remove the Join Geometry Node at the end;
- As already mentioned, use Blender 4.1 to have the Set Curve Normals node work as intended.
Even with all these precautions in mind, this method does not always work. The Boolean Mesh Node seems to choke easily as the geometry gets more complex. I found that checking Self Intersection in that node improves the results. But still, the method behaves unpredictable sometimes on objects with complex geometry.