Exemple #1
0
        /// <inheritdoc />
        public IMesh Triangulate(IPolygon polygon, ConstraintOptions options, QualityOptions quality)
        {
            var mesh = (Mesh)triangulator.Triangulate(polygon.Points, config);

            var cmesher = new ConstraintMesher(mesh, config);
            var qmesher = new QualityMesher(mesh, config);

            mesh.SetQualityMesher(qmesher);

            // Insert segments.
            cmesher.Apply(polygon, options);

            // Refine mesh.
            qmesher.Apply(quality);

            return(mesh);
        }
Exemple #2
0
 /// <inheritdoc />
 public IMesh Triangulate(IPolygon polygon, ConstraintOptions options)
 {
     return(Triangulate(polygon, options, null));
 }