Is it possible to choose which mesh edges to crease for a SubD object?

When we send a mesh into the new SubD component in Grasshopper, is there a way to tell it to crease certain edges?

I know there is a crease input on the component, and you can right click it, but does it take any further inputs?

Hi -

You can set it to either None or At Mesh Edges. When using the latter, unwelded edges of the input mesh will be creased. Welded edges will be uncreased.
-wim

Thank you. In my scenario, I would need to pick out specific edges on the mesh to unweld in order to set the creases where I want them to be. Do you know a method to picking specific edges to unweld?

Hi @TheCyclist

An unwelded edge is just an edge with two pairs of stacked vertices at the same place.

To unweld an edge, all is required is to know which vertices it connects, and make sure that the vertices are duplicates. I don’t see a method for doing this automatically at the moment in the SDK or Grasshopper. It would be relatively easy to duplicate the vertex manually, though. There’s also an _UnweldEdge command in Rhino doing this, though.

Thanks,

Giulio


for Robert McNeel & Associates
giulio@mcneel.com

1 Like

@dalelear @stevebaer @piac

Hi All,

we are looking at the same GH SubD crease problem.

Our current GH workflow is to make two sets of meshes, one with all welded edges, and another one with all unwelded edges. Then we join them. Along the joined edges we also get unwelded edges. This works well, except for the cases where we need welded and unwelded edges around the same face. Which for our current model is around 50% of the edges.

Is there any other solution than manually fixing the mesh? (In our case an absolute no-go, time wise and due to the risk of human error). Are there any plans to improve crease control with GH?

Edit: A solution through the RhinoCommon SDK would also work for us.

Thanks - S

Hi @silvano

If you bake the SubD, do the Rhino Crease and RemoveCrease commands make the SubD geometry changes you are looking for? If so, then @DavidRutten can look at those Rhino commands and make a GH component that modifies the SubD edge tag attributes. Within the scope of a SubD, edges are persistently identified by their id. Edge “tag” values from the perspective of a GH user would be limited to smooth and crease.

Hi @dalelear, @DavidRutten

thanks for your quick answer. Yes, baking and using Rhino commands works, it is just not applicable to our use case.

I saw that the SubD edge tag attribute is exposed in RhinoCommon now. I assume with this and the corresponding vertex tags we could make a GH Python component to get to what we need?

Thanks for pointing us in the right direction.

It’s not quite that easy. There are complex constraints between vertex tags, edge tags, sector coefficients, and cached evaluations. You need to call SubD SDK tools to change edge tags correctly. This is all in the C++ ON_SubD SDK but none to very little is in the .NET SDK (the .NET SDK for all geometry just calls into the C++ SDK). Knowing that baking + Crease/RemoveCrease works tells me what C++ SDK functions to suggest. I’ll provide technical details here in the next day or so and create a bug for David.

Thanks for posting some more technical details. We are very interested in those. In the long run, it would be great if the tools to manage edge tags would be accessible from RhinoCommon and GH.

I’ve created an issue for @DavidRutten to add SubD edge crease/smooth support to Grasshopper. RH-63863

2 Likes

I have a script which was put together with the help of a few users of this forum. Totally forgot @Baris helped me fix the problems in the scripts a while ago.

The script accepts index inputs or points to identify edges need to be unwelded.

unweld_mesh_edge.gh (19.5 KB)

6 Likes

Bazel.gh (149.2 KB)
please help me. how to add edges. ?

The problem with your geometry is that it wasn’t welded at first.
I added a Combine and Clean component from Kangaroo. It does the job.

Keep in mind that Mesh Topology edges are numbered in a different way than SubD or Mesh edges.

If you want to see the creased SubD edges, you can use a Match Text component to filter the edges based on their edge tag.

Bazel.gh (155.4 KB)

4 Likes

Hi Martin. Could you explain how you’re determining which edges are unwelded? Thanks.

In the example above, I chose the indices manually.

Hi All, in another thread I made a C# component that allows to crease SubDs via EdgeTags. New functionality provided by the latest RH 7.7 update. Currently you have to use the release candidate for this to work. Thought this might be interesting for some of you.

A word of warning, some issues still persist. Any feedback is welcome.

1 Like

sorry, but where is the new tool to add edges. ?

It is in the last GH definition in the above linked thread.

your python method doesn’t work.
xfc1.gh (6.2 KB)

Add Crease Martin Siegrist.gh (15.5 KB)


thanks for the tool. Martin Siegrist
added icons and signed. password: 01