2
$\begingroup$

I want the points of the left half of the circle to copy the coordinates from the right.

My setup: I reflect the curve and transfer its position to the left half.

enter image description here

But since I transfer the nearest points position this works only in a certain radius.

enter image description here

So I need to use indexes, but I don't understand how to do it correctly.

EDIT

I want my circle to have a constant number of sides, and to have its center at the world origin.

For example, let's create a circle with 10 sides. If I remove half of it and then mirror the other half, I get the following result. Now I need to connect points 2 and 7, 8 and 3 with edges.

enter image description here

Desired result.

enter image description here

$\endgroup$
3
  • $\begingroup$ Would you be okay with a solution that doesn't use indexes (similarly to ugorek's answer), or would you like to stick to indexes only? $\endgroup$
    – Invizio
    Jan 23, 2023 at 21:13
  • $\begingroup$ @Invizio Well, it seems like a logical solution to me. I've just created a node setup with indexes (the last gif is an example) but it doesn't always work well. $\endgroup$
    – kealange
    Jan 24, 2023 at 10:32
  • $\begingroup$ Just to confirm: your original geometry is a half-circle, you'd like to mirror it on some axis at the origin, but the points do not necessarily touch the origin, and you'd like the two corresponding pairs of endpoints to be connected by an edge? $\endgroup$
    – Invizio
    Jan 24, 2023 at 16:08

2 Answers 2

3
$\begingroup$

Join Geometry with a scale of $-1$ on one of the axes.

demo

$\endgroup$
1
  • $\begingroup$ I thought about this solution first and it doesn't suit me. I should have mentioned this, sorry. My curve is a circle that can be rotated such that its center points are not on the y-axis. And if I delete half of the circle, I will have to somehow connect these points. $\endgroup$
    – kealange
    Jan 23, 2023 at 15:22
1
$\begingroup$

Here's my node setup:

Geometry Nodes diagram

Example curve, off-centered and mirrorring properly

Similarly to ugorek's answer, it 's basically a matter of keeping only a single half and scaling by -1 on one axis. But you said that:

  1. You'd like the endpoints of each half to be merged with the corresponding point of the other half.
  2. Your curve is not necessarily in the middle of the object, and

The former is the easiest to fix: simply use a Merge by Distance node, and make sure to convert your curve to a mesh for it to work. If you are already working with a mesh, you can omit the Curve to Mesh node. (The rest of the nodes will work fine).

For the latter, we can fix this by offsetting the mirrored half by twice the distance from the center of the original curve. You can pick this value manually if it's convenient for you, but if not (or if it might change often), you can use an Attribute Statistic node to find which point of the curve is closest to the middle, and mirror based on that.

Note: This requires you to work on the "correct" side of the axis. If it appears wrong, you can try switching from Min to Max on the Attribute Statistic node.


Please let me know if you'd like me to develop my answer further.

$\endgroup$
1
  • $\begingroup$ I unintentionally misled you. I'll edit and expand my question. $\endgroup$
    – kealange
    Jan 24, 2023 at 9:32

You must log in to answer this question.

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