MeshingParameters

References
Represents settings used for creating a mesh representation of a brep or surface.

Constructors

MeshingParameters

#Since v5.0
public MeshingParameters()
Initializes a new instance with default values.

Initial values are same as Default.

MeshingParameters

#Since v6.0
public MeshingParameters(double density, double minimumEdgeLength)
Initializes a new instance with simple values, similar to that of Rhino's meshing slider interface.
density (double)The density and number of mesh polygons, where 0.0 <= density <= 1.0, where 0 quickly creates coarse meshes, and 1 slowly creates dense meshes.
minimumEdgeLength (double)The minimum allowed mesh edge length.

MeshingParameters

#Since v6.0
public MeshingParameters(double density)
Initializes a new instance with simple values, similar to that of Rhino's meshing slider interface.
density (double)The density and number of mesh polygons, where 0.0 <= density <= 1.0, where 0 quickly creates coarse meshes, and 1 slowly creates dense meshes.

MeshingParameters

#Since v8.0
public MeshingParameters(MeshingParameters source)
Initializes a new instance copying values from source.

Initial values are same as Default.

source (MeshingParameters)

MeshingParameters

#Since v8.0
public MeshingParameters(SerializationInfo info, StreamingContext context)
Called by BinaryFormatter.Deserialize to create a new MeshParamaters object.
info (SerializationInfo)
context (StreamingContext)

Finalizer

~MeshingParameters

#
~MeshingParameters()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().

Properties

ClosedObjectPostProcess

#Since v6.0
public bool ClosedObjectPostProcess { get; set; }
Gets or sets a value indicating whether or not to post process non-closed meshes that should be closed. If the Brep being meshed is closed, JaggedSeams = false, and ClosedObjectPostProcess = true, and the resulting mesh is not closed, then a post meshing process is applied to find and close gaps in the mesh. Typically the resulting mesh is not closed because the input Brep has a geometric flaw, like loops in trimming curve.

Coarse

#ExampleSince v5.0
public static MeshingParameters Coarse { get; }
obsoleteUse MeshingParameters.FastRenderMesh
Gets mesh creation parameters for coarse meshing.

This corresponds with the "Jagged and Faster" default in Rhino.

ComputeCurvature

#Since v5.0
public bool ComputeCurvature { get; set; }
Gets or sets a value indicating whether or not surface curvature data will be embedded in the mesh.

Default

#ExampleSince v5.0
public static MeshingParameters Default { get; }
Gets mesh creation parameters to create the default render mesh. Only use this if you plan on specifying your own custom meshing parameters.

DefaultAnalysisMesh

#Since v6.0
public static MeshingParameters DefaultAnalysisMesh { get; }
Gets mesh creation parameters to create the default analysis mesh.

DoublePrecision

#Since v8.0
public bool DoublePrecision { get; set; }
Gets or sets a value indicating whether or not the mesh should have double precision vertices in addition to the floats.

FastRenderMesh

#Since v6.0
public static MeshingParameters FastRenderMesh { get; }
Gets mesh creation parameters to create the a render mesh when meshing speed is preferred over mesh quality.

GridAmplification

#Since v5.0
public double GridAmplification { get; set; }
Gets or sets the grid amplification factor. Values lower than 1.0 will decrease the number of initial quads, values higher than 1.0 will increase the number of initial quads.

GridAngle

#Since v5.0
public double GridAngle { get; set; }
Gets or sets the maximum allowed angle difference (in radians) for a single sampling quad. The angle pertains to the surface normals.

GridAspectRatio

#Since v5.0
public double GridAspectRatio { get; set; }
Gets or sets the maximum allowed aspect ratio of sampling quads.

GridMaxCount

#Since v5.0
public int GridMaxCount { get; set; }
Gets or sets the maximum number of grid quads in the initial sampling grid.

GridMinCount

#Since v5.0
public int GridMinCount { get; set; }
Gets or sets the minimum number of grid quads in the initial sampling grid.

JaggedSeams

#Since v5.0
public bool JaggedSeams { get; set; }
Gets or sets whether or not the mesh is allowed to have jagged seams. When this flag is set to true, meshes on either side of a Brep Edge will not match up.

MaximumEdgeLength

#Since v5.0
public double MaximumEdgeLength { get; set; }
Gets or sets the maximum allowed mesh edge length.

Minimal

#ExampleSince v5.0
public static MeshingParameters Minimal { get; }
Gets minimal meshing parameters.

MinimumEdgeLength

#Since v5.0
public double MinimumEdgeLength { get; set; }
Gets or sets the minimum allowed mesh edge length.

MinimumTolerance

#Since v5.0
public double MinimumTolerance { get; set; }
Gets or sets the minimum tolerance.

QualityRenderMesh

#Since v6.0
public static MeshingParameters QualityRenderMesh { get; }
Gets mesh creation parameters to create the a render mesh when mesh quality is preferred over meshing speed.

RefineAngle

#Since v5.0
public double RefineAngle { get; set; }
Gets or sets the mesh parameter refine angle in radians.

RefineAngleInDegrees

#Since v8.0
public double RefineAngleInDegrees { get; set; }
Gets or sets the mesh parameter refine angle in degrees.

RefineGrid

#Since v5.0
public bool RefineGrid { get; set; }
Gets or sets a value indicating whether or not the sampling grid can be refined when certain tolerances are not met.

RelativeTolerance

#Since v5.0
public double RelativeTolerance { get; set; }
Gets or sets the relative tolerance.

SimplePlanes

#Since v5.0
public bool SimplePlanes { get; set; }
Gets or sets a value indicating whether or not planar areas are allowed to be meshed in a simplified manner.

Smooth

#ExampleSince v5.0
public static MeshingParameters Smooth { get; }
obsoleteUse MeshingParameters.QualityRenderMesh
Gets mesh creation parameters for smooth meshing.

This corresponds with the "Smooth and Slower" default in Rhino.

TextureRange

#Since v6.0
public MeshingParameterTextureRange TextureRange { get; set; }
Gets or sets how and if textures will be packed.

Tolerance

#Since v5.0
public double Tolerance { get; set; }
Gets or sets the maximum allowed edge deviation. This tolerance is measured between the center of the mesh edge and the surface.

Methods

CopyFrom

#Since v8.0
public void CopyFrom(MeshingParameters source)
Call this method to copy MeshingParameters from another instance.
source (MeshingParameters)

Dispose

#Since v5.0
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.

Dispose

#
protected virtual void Dispose(bool disposing)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

disposing (bool)true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.

DocumentCurrentSetting

#Since v5.0
public static MeshingParameters DocumentCurrentSetting(RhinoDoc doc)
Gets the MeshingParameters that are currently set for a document. These are the same settings that are shown in the DocumentProperties "mesh settings" user interface.
doc (RhinoDoc)A Rhino document to query.
Meshing parameters of the document.
ArgumentNullExceptionIf doc is null.

Equals

#Since v8.0
public bool Equals(MeshingParameters other)
Determines whether the specified MeshingParameters has the same values as the present MeshingParameters.
other (MeshingParameters)The specified MeshingParameters.
true if MeshingParameters has the same values as this; otherwise false.

Equals

#Since v8.0
public override bool Equals(object obj)
Determines whether the specified MeshingParameters has the same values as the present MeshingParameters.
obj (object)The specified MeshingParameters.
true if MeshingParameters has the same values as this; otherwise false.
Object.Equals

FromEncodedString

#Since v8.0
public static MeshingParameters FromEncodedString(string value)
Converts encoded serialized string into a MeshingParameters
value (string)Encoded string returned by MeshingParameters.ToString()
Returns a new MeshingParameters created by decoding and deserializing the string or null if value is invalid.

GetHashCode

#
public override int GetHashCode()
Computes a hash number that represents the current MeshingParameters.
A hash code for MeshingParameters.

GetObjectData

#Since v8.0
public void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a SerializationInfo with the data needed to serialize the target object.
info (SerializationInfo)The SerializationInfo to populate with data.
context (StreamingContext)The destination (see StreamingContext) for this serialization.
SecurityExceptionThe caller does not have the required permission.

SetSubDDisplayParameters

#Since v7.18
public void SetSubDDisplayParameters(SubDDisplayParameters subDDisplayParameters)
Sets the SubD display parameters.
subDDisplayParameters (SubDDisplayParameters)The SubD display parameters.

SubDDisplayParameters

#Since v7.18
public SubDDisplayParameters SubDDisplayParameters()
Gets the SubD display parameters.
The SubD display parameters.

ToEncodedString

#Since v8.0
public string ToEncodedString()
Returns a encoded string that represents the MeshingParameters.
A encoded string that represents the MeshingParameters.

Operators

OperationResultDescription
MeshingParameters==MeshingParametersboolDetermines whether the two MeshingParameters have equal values.
MeshingParameters!=MeshingParametersboolDetermines whether the two MeshingParameters do not have equal values.