Meshing Parameters

I am trying to access all of the parameters listed in the attached image using the ‘MeshingParameters’ but can only find ‘MinimumEdgeLength’ and ‘MaximumEdgeLength’. Are there properties listed elsewhere that coincide with all of the values listed in the image, or are some of those values not relevant once certain parameters are defined? I am converting a Brep into a Mesh in my code and want to match the mesh settings in the image below.


1 Like

Hi @Me_Dave, below python script lists document’s nurbs meshing parameters in order:

import Rhino
import scriptcontext

def DocumentMeshingParameters():
    mp = Rhino.Geometry.MeshingParameters.DocumentCurrentSetting(scriptcontext.doc)
    # NURBS meshing parameters
    print "Density:", mp.RelativeTolerance
    print "Maximum angle:", Rhino.RhinoMath.ToDegrees(mp.GridAngle)
    print "Maximum aspect ratio:", mp.GridAspectRatio 
    print "Minimum edge length:", mp.MinimumEdgeLength
    print "Maximum edge length:", mp.MaximumEdgeLength
    print "Maximum distance edge to surface:", mp.Tolerance
    print "Minimum initial grid quads:", mp.GridMinCount
    print "Refine mesh:", mp.RefineGrid
    print "Jagged seams:", mp.JaggedSeams
    print "Simple planes:", mp.SimplePlanes

You can find all nurbs meshing parameters here

Yes, if Refine checkbox is not enabled, some settings have no effect.


1 Like

Thanks @clement ! I figured this was the case but couldn’t find any documentation relating one description in the software UI to the actual property name. This is exactly what I needed.

I’m struggling with setting Packed Textures.

This is what I have in the code: mp.TextureRange = new MeshingParameterTextureRange.PackedScaledNormalized(0,2);

Error: |Severity|Code|Description|Project|File|Line|Suppression State|
|Error|CS0426|The type name ‘PackedScaledNormalized’ does not exist in the type ‘MeshingParameterTextureRange’|davesTestPlugin|G:\Product Development Share\David\ProArchitect C sharp Dev Files\davesTest\davesTestPlugin\Commands\xMeshBrep.cs|43|Active|

I’m referencing this:
MeshingParameterTextureRange enum (

Hi @Me_Dave,

MeshingParameters.TextureRange is a enum, not a class.

var mp = new MeshingParameters
  TextureRange = MeshingParameterTextureRange.PackedScaledNormalized

// TODO...

– Dale

Got it. Hopefully my questioning isn’t too annoying. Just a Rhino user here trying to learn coding. lol
Thanks for the help! I’ll do more homework before asking next time.

1 Like

inches? or mm’s?

the new order in V7 or V8 … some of it makes sense but some of it doesn’t.

Sometimes I wish I could modify Rhino’s entrie GUI and put things in the order I think makes more sense.

but what does “refine” do then exactly? If it overrides certain parameters, then what will the parameters be…

It wont matter how much homework you do or how long you’ve been using Rhino. Sometimes connotations of others will project you as an inexperienced user that knows nothing.

I don’t worry about that though. The sigma matrices have a life of their own.

Annoyed ppl annoy themselves regardless of the words and symbols having been projected.

Posting here is the best homework, and pushing the envelope of the rules can be fun too.

I’m trying to learn coding too, cause pretty much seems like the only option for most things – at this point.

Hi @lander, i guess distances are in units which are set in the document properties.

I agree, the different order in V8 seems to be a papercut. I’m more concerned with the position of the Preview button. After using the bottom location for more than 2 decades, it is hard to get used to the position on top of the dialog using V8. @Gijs, could you please add this to the pile ? (Order of meshing parameters and position of preview button).

It does not override certain parameters. Instead in enables some parameters. Eg. Try to mesh a single planar surface so it is finer than 100K faces. Without the Refine checkbox checked, you’ll not be able to produce such a dense mesh.

I hope this is not true and would like to encourage anyone to just keep asking questions. There are no stupid questions and this is what the forum is all about.


1 Like

@clement can you look over this and see if after reading, you still think this should be changed back?
RH-66829 Mesh: Reordered detailed parameters based on the meshing process

The position of the preview is not much different from V7’s

Hi @Gijs, since this item has been closed i think it should be re-opened. The order of the custom meshing parameters of the document properties in V7 look like this:

in V8 i have this which seems to be quite different:

The position of the Presets button seems out of place imho, it could go the the top.

Sorry, with the Preview button i was referring to the Detailed Mesh Options dialog which you see when adjusting mesh settings per object. In V7 it looks like this and the button is in the bottom row of buttons:


To me this seems to be a nice and compact dialog, all buttons at the bottom (to which i got used to). For comparison, this is the same dialog in V8 which is a waste of screen space:

Same complaint here, parameters not in order and Presets button is out of place.

Another issue is the bottom part of this dialog for SubD Meshing parameters and the statement “For rendering only”. I may be dumb but don’t understand it. To repeat my confusion please do this:

  1. Create a SubD sphere
  2. Enable Shaded display mode and flat shade
  3. Change the SubD meshing options either global or per object

Nothing changes. Now run ExtractRenderMesh on the SubD object and you see, it actually extracts a render mesh with the level which has been set. Why are users not alowed to change this for display purposes and only for rendering or raytracing ? It kinda makes me feel ousted if i cannot control this.


1 Like

@clement I’ve reopened that issue.
As for the subd meshing parameters, @dalelear can certainly better explain this, but SubD’s have been designed in such a way that they are always rendering smoothly in OpenGL. The issue is that this can currently not be translated to rendering, and therefore you have those controls in Mesh settings. The long time goal is that no mesh parameters for SubD’s are needed at all.

1 Like

If you click the Help button in the meshing dialog, you should find information about what the “Refine” checkbox does.

SubD meshing parameters (For rendering only) means the slider only affects render meshes of SubDs in the Raytraced viewport and the Rhino Render window.
Scroll this topic to the bottom, the link of More information about adaptive meshing for SubD brings you to the topic that might answer most of you questions.

To me it makes no sense to move the ‘density’ from top to third position. After all these years of density taking precedent as number 1 position to now number 3? … makes no sense.

And ‘minimum grid quads’ from 7th position to now number 1 position? … makes no sense.

Graphically why is it even a ‘vertical’ list anyway. Maybe have two columns? or some other type of graphical dialogue?

And why split up ‘maximum angle’ and ‘maximum aspect ratio’ after they’ve been together for so many years? now they’re 4 positions apart? … so crazy. Now users have to adapt to such graphical scrambled nonsense.

It would be great if we users could just choose the order our selves.

Good thing the ‘edge length mins n max’ didn’t get separated… lol.

I’ve done that countless times over the years. Doing it again shouldn’t be too much of a bother. I’ll check it out again, thank you.

Ahhh yes, very interesting :face_with_monocle: :thinking: :thought_balloon:

1 Like

Hi @pierrec, reading your comment on YT:

The comment about being used to something for more than 20 years, was about the position of the Preview button, not the order of meshing parameters.

No, i’ve also wanted to include the order of the meshing parameters to which i am used to. I’ve just opened V5, V6 and V7 and found that the order in V8 is now different. In previous Rhino versions the Density parameter was standing out more as it had it’s own slider control which visually seperated it while removing complexity from the amount of parameters. By just replacing this with an numeric input, the amount of parameters increased which might scare new users the more this list of parameters increases.

Personally, i would asume that longtime users are more interested in the original order than the (new) order these settings are in code. The Preview btw. was added sometime during the years.

I think the biggest problem with such UI design is that multiple Rhino dialogs do not follow a strict design rule yet. So it might be worth looking at other existing dialogs using a preview button eg. _Patch which has it in line with other buttons at the bottom right of the dialog. If there is no strict design rule yet, i would try to match what exists already.

I think this is the same reason why we have an ancient keyboard layout in 2023 originating from a typewriter. If you used the layout for many years, it is very hard to get used to something different. Especially when switching back and forth to older Rhino versions such changes can be annoying.


Why does the UI not disable those input fields which stop working if Refine is unchecked ? Would this make the parameters and checks more self explanatory ?


1 Like

hi Clement, I was working on this the other day. Refinement in help file makes it look that the 4 mentioned parameters are only considered when this checkbox is checked, but this is not the case. It’s an extra round of checks on those parameters instead.

Hi @Gijs, oh yeah, would have been too easy :wink: