Bug Cap command making bad meshes?

I do a sweep1 to create a valid Rhino polysurface object that renders correctly.

But when I try to cap this shape it creates a valid polysurface but the solid does not render correctly - the mesh looks crinkled and appears to cave in.

If I use two Surface from planar curves instead of cap then the solid’s mesh looks great.

See the attached file. Rhino5capBug.3dm (282.7 KB)

I have a layer for: the rail, the curve, the swept shape, the buggy capped shape, and the OK solid made using surface from planar curves twice.

I do a freeform sweep and use refit rail.

This bug is also in the WIP.

I hadn’t joined the surfaces together into a solid.

As soon as I did: the mesh broke. So neither approach works. :frowning:

I’m guessing it’s just your mesh settings aren’t dense enough, see http://wiki.mcneel.com/rhino/meshfaq

I’ve tried messing with mesh settings. It helps but not completely.

If I do showrendermesh then I can see the problem. I expect to see many quad facets running vertically down the vertical surfaces. This is what I see before I join the lower surface to the rest of the shape.

At the tip of the pointy part of the shape, the top and bottom flat surfaces are a fan of thin triangles radiating from a single point set back a fair distance from the tip.

Before I join the bottom surface - the triangle fans, top and bottom. are “joined” by lots of thin quads running down the vertical sides of the shape. (Technically they aren’t actually joined yet but, by eye, the quads that run down from the upper fan match up with the vertices of the lower triangle. This is the geometry that you would expect to see in the joined up object and would render well.)

But when I finally do the join - the mesh generating algorithm doesn’t join the two fans with quads - instead it seems to pick a vertical line at the very point of the shape then it joins the bases of the fan triangles to about 7, equally spaced, points on that line. This is what gives me the crinkled appearance.

The line that it picks also seems to be set inwards from the tip of the object and this is what gives the rendered shape its concave appearance.

I have found a dialog called, “Polygon Detailed Mesh Operations” and have played about with pretty much all of the options but nothing fixes the problem.

I’m going to try cutting the initial rail in two to see if I can increase the X axis symmetry of the model to see if this helps the mesh creating algorithm match vertices.Maybe it will then generate quads instead of triangle fans on the vertical surfaces.

I suppose that this isn’t really a bug, although it is very suboptimal. As I see it you have a NURBS representation of some joined surfaces and an algorithm has to convert that into polygons. There may not be any way of saying, “this surface is vertical and should be made of quads”. It’s obvious to a human but I don’t see a way in the UI to tell the software what I want.

Am I missing something?

Does the file format just store curves, surfaces, and control points or is there a way to say how the surfaces were generated and what the creators’ intentions were?

The mesh settings aren’t very intuitive, you really want to use as few of the settings as possible, because the way they interact isn’t obvious.

For easiest control of getting mostly square quads, zero out all the mesh settings, and then set max edge length to the size of the mesh quad you want. Then set max distance edge to surface to a very small number (say .001") for a higher precision mesh.

If you don’t care about maintaining similar size meshes and just want to eliminate the appearance of gaps, zero out everything except for max distance edge to surface to a very small number that is your minimum acceptable gap. Then you can add in maximum aspect ratio (say 2.0) and/or max edge length to get a more even mesh.

Hope that helps, see image:

I had to set the global options - that dialog doesn’t seem to have any effect once closed.

I had to set the max length to 0.1 before the visible artefacts were gone.

Rhino 5 seems to struggle with such a dense mesh whilst WIP fares better. Nevertheless this object is only a small part of my model so I’m not going to go with this solution.

I’m going to leave the bottom of the object unclosed. It abuts against another object with the same cross section so as long I don’t join the two I should get reasonable results. You only see stitching when you are very close.

Thanks for your help.

You’re welcome!

The Property panel custom mesh works here. Select object, set custom mesh settings and hit OK. Use ShowRendermesh and HideRendermesh commands to toggle view of the mesh.

Did you try inputting a max distance along with the max edge length? Going down to .1 for edge length makes a very dense mesh for what is a simple object.

I found the dialog via the properties tab and it worked.

Previously I was getting to it via the Surface Tools / Curvature analysis dialog. I clicked Adjust mesh and got the Polygon Detailed Mesh Operations dialog that way. It has no effect when you OK. It doesn’t work in WIP and I think it doesn’t work in Rhino 5. <- that must be a bug.

Anyway, I reset my global mesh options, retried from the properties tab using 0.25 and it worked.

My initial thought was that the problems happened after I joined the bottom surface to the rest. This was wrong.

I tried again by making a half model then I mirrored that. I didn’t bother with the top and bottom surfaces - I just did the sides. Things looked great even with low res meshes until I tried to join the two halves.

The green image on the left shows the two halves before joining. The right hand version shows the render mesh after joining. So the triangle problem is there at this stage but it only becomes apparent when the bottom surface is joined.

The Rhino mesher adds triangles along joined or trimmed seams. That’s a seam as a result of how you made the form. The mesher hopefully will handle cases like this better in V6.

Also, as far as modeling, there’s an unnecessary number of control points on your curve, and you built the fillet into the sweep cross section. The mesh is better if there’s no seam or kink at the point, just extrude your simplified curve to make the sides of the form. Cap, and then run FilletEdge along your seams at .1 or the desired fillet radius. The render mesh will look nicer then.

The denser the mesh, the slower the display will be, so you can set denser meshes per item via the properties tab. You can probably use a much larger number than .25 for max edge length if you set a very small max distance to edge to capture the tiny fillet well.

My original shape was pointed and fillet edge didn’t work for it.

But now that the shape is rounded - I did an extrude and a fillet edge and it worked! I don’t even need custom mesh settings.

Thanks Greg. :smile:

1 Like

Hi John- it is definitely better to fillet after the fact here but on your original, the meshig will clean up if you split the fillet from the vertical surfaces - split with an isocurve snapping to the intersection (Int OSnap) of the iso at the bottom of the fillety part.