Mesh script unweld problem

I created a SubD Radial Symmetry example in Grasshopper after looking at this topic.

The goal is to be able to work a a single segment, rotate this segment and weld everything into one SubD. Unfortunately after welding and aligning the vertices, all edges are smooth and creases are lost. There is an option to keep creases at Mesh Edges, but it’s impossible to distinguish between interior edges and naked edges. The solution is to weld everything and unweld based on edge indeces.

The problem right now is that the unweld script doesn’t work anymore. For whatever reason?

The initial segment has three edge tags:

  • smooth, interior
  • crease, naked
  • crease, interior

Let’s say I want to keep interior naked edges creased. The edges can be filtered and unwelded.

Some time ago in an old topic I had a similar problem, but the script from a year ago does not work anymore. (40.5 KB)

What’s wrong with this:

private void RunScript(Mesh M, List<int> edgeindeces, ref object A)
    MyClass edge = new MyClass();
    List<int> edgeindeces = new List<int>();
    foreach (var val in edge)
      A = Rhino.Geometry.Mesh.UnweldEdge(edge, false);
1 Like

Can anyone help on this script problem please?

  1. Error (CS0246): Der Typ- oder Namespacename ‘MyClass’ konnte nicht gefunden werden. (Fehlt eine Using-Direktive oder ein Assemblyverweis?) (line 57)

Hi @martinsiegrist,

Did you create a class called MyClass? You are trying to create an object of this class and it seems not to exist.
If you want the naked edges you can do something like this:

 var MEV = mesh.TopologyEdges;
    var nakedEdgeIndices = new List<int>();
    var nakedEdges = new List<Line>();
    for (int i = 0; i < MEV.Count; i++)
      var fE = MEV.GetConnectedFaces(i);
      if(fE.Length == 1)
    NakedEdges = nakedEdges;
    NakedIndices = nakedEdgeIndices; (3.3 KB)

Hi Baris,

this is an old script someone else postet a while ago. I haven’t created the c# scripts myself and I’m not looking for naked edges.

I need to unweld the mesh at the edge indices provided.

Add this lines:

I have not Rhino 7 installed to further try stuff, but there is some strange things going on in the c# scripts:
Besides the really confusing naming it is redundant:

This could be done like that: (17.5 KB)

Thanks for your help! The unweld problem has been solved.

As for the midpoints and the next script, that simplification doesn’t work yet.

hmm, if they are unwelded correctly it should work.

OK, needed another MeshJoin… (37.8 KB)

1 Like

The definition can now handle both interior and / or naked creased edges. (54.3 KB)


Hi Martin
I am testing your definition.
Works very well, but there are small issues.
I cannot sort some folds where there is a dot with a crease at the corners.
In the original model, the point is a sharp crease, but the definition creates a smooth crease. Could you work it out please?

I attach your definition with creases sorted for my model

There is also a general question about the Grasshopper.
A preview of the resulting geometry is always shown in the DisplayMode by default. I mean light scheme.
For comfortable modeling and familiar perception in the process of work, I want to get a preview with the settings of my display mode. For example my Shaded or my Rendered. How to do it?

Thanx (28.8 KB)

There’s the corner setting on the ‘SubDFromMesh’ component which should be set to ‘At Mesh Corners’ but other than that I don’t know what the problem is. Somehow it depends on the choice of creased edges. I’m usually trying to avoid sharpe edges on SubD geometry unless it is really required. Instead I would add another loop or ring or bevel an edge.

If you want a different display mode there is a ‘Create Material’ component which allows transparency and or shine to some extend.

Do you mean that?
Maybe I don’t understand, nothing is happening

Yes that one but again I’m not really sure what the problem is with corners.

I’ve extended my test file for rotational symmetry with a flow along curve feature.

It allows rotational stretching of an segment.

1 Like

This is a multicomponent model Subd + Nurbs
In the empty cavity I will inscribe the geometry from planes that have sharp corners, so I need a sharp corner of Subd. Well, among other things the inconsistency of the obtained geometry from GH makes me confused.

I have set a new component for corners, change values ​​but nothing happens. I can’t understand why.

I also created a material, but the edges are white. How do I set the edges to black? This the single Displaymode method?
Why can’t GH use the current Rhino settings?

If possible, post the file with the NURBS star

Apologies but I haven’t the power.
anyone else’s property

I do not have rights!
Does it look strange or so unfriendly?
Thanks a lot anyway dear Martin!
Not finished but our work will benefit many other users.
Radial symmetry has not yet been realized.

No problem.

Regarding your problem of sharp edges… T-Splines had an option to match a curve or surface and add a refinement for closer matching. In case of your star shape, the edge is still not perfectly pointy

If I were you I would build the star as SubD too.