RhinoCommon API
PlaneSurface Constructor (Plane, Interval, Interval) |
Initializes a plane surface with x and y intervals.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)

public PlaneSurface( Plane plane, Interval xExtents, Interval yExtents )
Public Sub New ( plane As Plane, xExtents As Interval, yExtents As Interval )
Parameters
- plane
- Type: Rhino.GeometryPlane
The plane. - xExtents
- Type: Rhino.GeometryInterval
The x interval of the plane that defines the rectangle. The corresponding evaluation interval domain is set so that it matches the extents interval. - yExtents
- Type: Rhino.GeometryInterval
The y interval of the plane that defines the rectangle. The corresponding evaluation interval domain is set so that it matches the extents interval.

using Rhino; using Rhino.Geometry; using Rhino.Commands; namespace examples_cs { public class PlaneSurfaceCommand : Command { public override string EnglishName { get { return "csPlaneSurface"; } } protected override Result RunCommand(RhinoDoc doc, RunMode mode) { Point3d[] corners; var rc = Rhino.Input.RhinoGet.GetRectangle(out corners); if (rc != Result.Success) return rc; var plane = new Plane(corners[0], corners[1], corners[2]); var plane_surface = new PlaneSurface(plane, new Interval(0, corners[0].DistanceTo(corners[1])), new Interval(0, corners[1].DistanceTo(corners[2]))); doc.Objects.Add(plane_surface); doc.Views.Redraw(); return Result.Success; } } }
Imports Rhino Imports Rhino.Geometry Imports Rhino.Commands Namespace examples_vb Public Class PlaneSurfaceCommand Inherits Command Public Overrides ReadOnly Property EnglishName() As String Get Return "vbPlaneSurface" End Get End Property Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result Dim corners As Point3d() = Nothing Dim rc = Input.RhinoGet.GetRectangle(corners) If rc <> Result.Success Then Return rc End If Dim plane = New Plane(corners(0), corners(1), corners(2)) Dim plane_surface = New PlaneSurface(plane, New Interval(0, corners(0).DistanceTo(corners(1))), New Interval(0, corners(1).DistanceTo(corners(2)))) doc.Objects.Add(plane_surface) doc.Views.Redraw() Return Result.Success End Function End Class End Namespace
import Rhino; import rhinoscriptsyntax as rs def RunCommand(): rc, corners = Rhino.Input.RhinoGet.GetRectangle() if rc <> Rhino.Commands.Result.Success: return rc plane = Rhino.Geometry.Plane(corners[0], corners[1], corners[2]) u_dir = rs.Distance(corners[0], corners[1]) v_dir = rs.Distance(corners[1], corners[2]) rs.AddPlaneSurface(plane, u_dir, v_dir) if __name__ == "__main__": RunCommand()

Rhino for Mac
Supported in: 5.4Rhino for Windows
Supported in: 6.8