Click or drag to resize

NurbsSurfaceCreateFromCorners Method (Point3d, Point3d, Point3d, Point3d)

Makes a surface from 4 corner points.

This is the same as calling CreateFromCorners(Point3d, Point3d, Point3d, Point3d, Double) with tolerance 0.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax
public static NurbsSurface CreateFromCorners(
	Point3d corner1,
	Point3d corner2,
	Point3d corner3,
	Point3d corner4
)

Parameters

corner1
Type: Rhino.GeometryPoint3d
The first corner.
corner2
Type: Rhino.GeometryPoint3d
The second corner.
corner3
Type: Rhino.GeometryPoint3d
The third corner.
corner4
Type: Rhino.GeometryPoint3d
The fourth corner.

Return Value

Type: NurbsSurface
the resulting surface or null on error.
Examples
using Rhino;
using Rhino.Geometry;
using Rhino.Commands;

namespace examples_cs
{
  public class SurfaceFromCornersCommand : Rhino.Commands.Command
  {
    public override string EnglishName
    {
      get { return "csSurfaceFromCorners"; }
    }

    protected override Result RunCommand(RhinoDoc doc, RunMode mode)
    {
      var surface = NurbsSurface.CreateFromCorners(
        new Point3d(5, 0, 0),
        new Point3d(5, 5, 5),
        new Point3d(0, 5, 0),
        new Point3d(0, 0, 0));

      doc.Objects.AddSurface(surface);
      doc.Views.Redraw();

      return Rhino.Commands.Result.Success;
    }
  }
}
Python
from Rhino.Geometry import NurbsSurface, Point3d
from scriptcontext import doc

surface = NurbsSurface.CreateFromCorners(
  Point3d(5, 0, 0),
  Point3d(5, 5, 5),
  Point3d(0, 5, 0),
  Point3d(0, 0, 0));

doc.Objects.AddSurface(surface);
doc.Views.Redraw();
See Also