I'm having trouble understanding the Hinge Points component in Kangaroo 2

unhandled

#1

Link to component

I can’t quite understand how the four output nodes are structured in regard to the input mesh. When wishing to execute a fold force, how do you know which outputs to plug into the hinge component in Kangaroo 2? I’ve looked at the example origami file, but this aspect of it isn’t that clear for me.

JM


(Riccardo Majewski) #2

HingePoints_expl.gh (18.2 KB)

Hi!
An hinge, as in kangaroo2, is defined by 4 points: 2 point for the start/end of the fold line, and 2 point for the tips.
As so, in a mesh you can’t fold a naked edge, but only an interior edge.
Now, it’s unlikely you want to fold ALL the interior edge of a mesh in the same way, so you need firstly to find WHICH edge to fold, and then “extract” the 4 point “handles” for every one of them.

To do this you can use the “HingePoints” element.
As you can see it create 4 lists that have the same lenght of the “E2” output of “MeshEdges” component.
The 1,2,3,4 outputs of “HingePoints” element are the same and in the same sequence of “Hinge” component:
FoldStart, FoldEnd, Tip1, Tip2.
(This can be useful even to measure the angle around a specific edge of a mesh, using “FoldAngle”.)

In attached definition will see the “rule” i made: i want to fold only internal edges that have their midpoint inside the curves, with that true/false pattern i took only the HingePoints i needed, and used them.

Tell me if it is still unclear.

Cya!


#3

Thank you! This makes things much clearer! If I’m understanding the component correctly,would it be best to use it on triangulated meshes? I’m assuming the way it finds Tip1, and Tip 2 is to find the point at which the two lines from FoldStart and FoldEnd converge?


(Riccardo Majewski) #4

HingePoints_expl2.gh (26.5 KB)
I think the component just work with points, it’s not like it “know” it is a “mesh with a hinge”
(you don’t have to “feed” a mesh object to the component to make it work).

You feed it 4 points, and it uses them applying forces to them.
If you have a mesh (or many) having vertexes at the same location of those points, kangaroo will merge those points and move them as a single one.

Attached you can see how i made the 4 points: propousely not-symmetrical, so the forces actually twist the mesh.
You can partially solve this by having the tips 1 and 2 symmetrical each-other around the fold line.
But the best solution would be to having tips 1 and 2 symmetrical each-other around the fold line AND both equidistant from start and end of the fold line… but this only happen with 2 Isosceles triangles (if a mesh)…


#5

Hinge goal works for triangle meshes only