加载中...
Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Preventing duplicate curve in Geometry Nodes using Separate Geometry + Set position curve

I'm trying to separate the middle-section of a curve (points 3 and 4 in my example), apply some transformations to it, and then merge it back with the original curve. I've gotten to the point where I'm happy with the result, except that after joining the curves back, the original curve is still present because it's connecting the wrong sections of the curve (points 2 and 5 get connected, selected points 3 and 4 are connected with each other but not the main curve). I'm not sure how I can avoid this, does anyone have any suggestions?

Node setup (minimal example, I'm instancing cubes on the curve points for visualization purposes). What I would like is to generate the blue line as a curve.

Node setup

Current behaviour:

Current behaviour

Desired behavior:

Desired curve behaviour

Answer*

Cancel
10
  • $\begingroup$ Thank you, this is close, but it's exploiting the fact that I simplified my example too much. The selected points in my setup are using a raycast node that checks if the points are inside a different object. See this node example: LINK which has this (incorrect) curve output: LINK. Is there a way that your method can work for this setup? I removed the instances on points and switched to your viewer node method. $\endgroup$ Commented Sep 28, 2024 at 16:40
  • $\begingroup$ @PvB can be done, but why are you even separating here? "Set Position" has "Selection" input that you're even using. $\endgroup$ Commented Sep 28, 2024 at 17:07
  • $\begingroup$ It's still a minimal example. I have an elaborate node setup (with a 2nd raycast node, amongst other things) that allows me to evenly wrap around the target object. I'm splitting the curve so that I can resample, get the number of points inside the mesh, and combine this with the indices to evenly spread out the ray directions over a 180 degree arc. This works, but when combining it back with the other section of the curve, I get both the projected curve and the original curve. Here's a screenshot of the problem (using a sphere not a cylinder) link $\endgroup$ Commented Sep 28, 2024 at 18:06
  • $\begingroup$ " I'm splitting the curve so that I can resample" - ah, so I guessed right! OK I'll update the setup then. $\endgroup$ Commented Sep 28, 2024 at 18:40
  • $\begingroup$ @PvB see edit.. $\endgroup$ Commented Sep 29, 2024 at 12:58