diff --git a/quasar_site/src/api_examples.json b/quasar_site/src/api_examples.json index 932c6a45..02300871 100644 --- a/quasar_site/src/api_examples.json +++ b/quasar_site/src/api_examples.json @@ -11,21 +11,21 @@ "name": "Addbackgroundbitmap.cs", "code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddBackgroundBitmap(Rhino.RhinoDoc doc)\n {\n // Allow the user to select a bitmap file\n var fd = new Rhino.UI.OpenFileDialog { Filter = \"Image Files (*.bmp;*.png;*.jpg)|*.bmp;*.png;*.jpg\" };\n if (!fd.ShowOpenDialog())\n return Rhino.Commands.Result.Cancel;\n\n // Verify the file that was selected\n System.Drawing.Image image;\n try\n {\n image = System.Drawing.Image.FromFile(fd.FileName);\n }\n catch (Exception)\n {\n return Rhino.Commands.Result.Failure;\n }\n\n // Allow the user to pick the bitmap origin\n var gp = new Rhino.Input.Custom.GetPoint();\n gp.SetCommandPrompt(\"Bitmap Origin\");\n gp.ConstrainToConstructionPlane(true);\n gp.Get();\n if (gp.CommandResult() != Rhino.Commands.Result.Success)\n return gp.CommandResult();\n\n // Get the view that the point was picked in.\n // This will be the view that the bitmap appears in.\n var view = gp.View();\n if (view == null)\n {\n view = doc.Views.ActiveView;\n if (view == null)\n return Rhino.Commands.Result.Failure;\n }\n\n // Allow the user to specify the bitmap width in model units\n var gn = new Rhino.Input.Custom.GetNumber();\n gn.SetCommandPrompt(\"Bitmap width\");\n gn.SetLowerLimit(1.0, false);\n gn.Get();\n if (gn.CommandResult() != Rhino.Commands.Result.Success)\n return gn.CommandResult();\n\n // Cook up some scale factors\n var w = gn.Number();\n var image_width = image.Width;\n var image_height = image.Height;\n var h = w * (image_height / image_width);\n\n var plane = view.ActiveViewport.ConstructionPlane();\n plane.Origin = gp.Point();\n view.ActiveViewport.SetTraceImage(fd.FileName, plane, w, h, false, false);\n view.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n", "members": [ - ["Rhino.Display.RhinoView", "RhinoViewport ActiveViewport"], - ["Rhino.Display.RhinoView", "System.Void Redraw()"], ["Rhino.Display.RhinoViewport", "Plane ConstructionPlane()"], ["Rhino.Display.RhinoViewport", "System.Boolean SetTraceImage(System.String bitmapFileName, Plane plane, System.Double width, System.Double height, System.Boolean grayscale, System.Boolean filtered)"], + ["Rhino.Display.RhinoView", "RhinoViewport ActiveViewport"], + ["Rhino.Display.RhinoView", "System.Void Redraw()"], ["Rhino.UI.OpenFileDialog", "OpenFileDialog()"], ["Rhino.UI.OpenFileDialog", "string FileName"], ["Rhino.UI.OpenFileDialog", "string Filter"], ["Rhino.UI.OpenFileDialog", "System.Boolean ShowOpenDialog()"], ["Rhino.Input.Custom.GetPoint", "System.Boolean ConstrainToConstructionPlane(System.Boolean throughBasePoint)"], - ["Rhino.Input.Custom.GetNumber", "GetNumber()"], - ["Rhino.Input.Custom.GetNumber", "GetResult Get()"], - ["Rhino.Input.Custom.GetNumber", "System.Void SetLowerLimit(System.Double lowerLimit, System.Boolean strictlyGreaterThan)"], ["Rhino.Input.Custom.GetBaseClass", "Result CommandResult()"], ["Rhino.Input.Custom.GetBaseClass", "System.Double Number()"], ["Rhino.Input.Custom.GetBaseClass", "RhinoView View()"], + ["Rhino.Input.Custom.GetNumber", "GetNumber()"], + ["Rhino.Input.Custom.GetNumber", "GetResult Get()"], + ["Rhino.Input.Custom.GetNumber", "System.Void SetLowerLimit(System.Double lowerLimit, System.Boolean strictlyGreaterThan)"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoView ActiveView"] ] }, @@ -50,8 +50,8 @@ "name": "Addcircle.cs", "code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddCircle(Rhino.RhinoDoc doc)\n {\n Rhino.Geometry.Point3d center = new Rhino.Geometry.Point3d(0, 0, 0);\n const double radius = 10.0;\n Rhino.Geometry.Circle c = new Rhino.Geometry.Circle(center, radius);\n if (doc.Objects.AddCircle(c) != Guid.Empty)\n {\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n return Rhino.Commands.Result.Failure;\n }\n}\n", "members": [ - ["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"], ["Rhino.Geometry.Point3d", "Point3d(double x, double y, double z)"], + ["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"], ["Rhino.DocObjects.Tables.ViewTable", "System.Void Redraw()"], ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddCircle(Circle circle)"] ] @@ -62,31 +62,31 @@ "members": [ ["Rhino.Geometry.Plane", "Plane(Point3d origin, Point3d xPoint, Point3d yPoint)"], ["Rhino.FileIO.File3dmObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"], - ["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"] + ["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"] ] }, { "name": "Addcylinder.cs", "code": "partial class Examples\n{\n public static Rhino.Commands.Result AddCylinder(Rhino.RhinoDoc doc)\n {\n Rhino.Geometry.Point3d center_point = new Rhino.Geometry.Point3d(0, 0, 0);\n Rhino.Geometry.Point3d height_point = new Rhino.Geometry.Point3d(0, 0, 10);\n Rhino.Geometry.Vector3d zaxis = height_point - center_point;\n Rhino.Geometry.Plane plane = new Rhino.Geometry.Plane(center_point, zaxis);\n const double radius = 5;\n Rhino.Geometry.Circle circle = new Rhino.Geometry.Circle(plane, radius);\n Rhino.Geometry.Cylinder cylinder = new Rhino.Geometry.Cylinder(circle, zaxis.Length);\n Rhino.Geometry.Brep brep = cylinder.ToBrep(true, true);\n if (brep != null)\n {\n doc.Objects.AddBrep(brep);\n doc.Views.Redraw();\n }\n return Rhino.Commands.Result.Success;\n }\n}\n", "members": [ - ["Rhino.Geometry.Plane", "Plane(Point3d origin, Vector3d normal)"], ["Rhino.Geometry.Cylinder", "Cylinder(Circle baseCircle, double height)"], - ["Rhino.Geometry.Cylinder", "Brep ToBrep(System.Boolean capBottom, System.Boolean capTop)"] + ["Rhino.Geometry.Cylinder", "Brep ToBrep(System.Boolean capBottom, System.Boolean capTop)"], + ["Rhino.Geometry.Plane", "Plane(Point3d origin, Vector3d normal)"] ] }, { "name": "Addlayer.cs", "code": "partial class Examples\n{\n public static Rhino.Commands.Result AddLayer(Rhino.RhinoDoc doc)\n {\n // Cook up an unused layer name\n string unused_name = doc.Layers.GetUnusedLayerName(false);\n\n // Prompt the user to enter a layer name\n Rhino.Input.Custom.GetString gs = new Rhino.Input.Custom.GetString();\n gs.SetCommandPrompt(\"Name of layer to add\");\n gs.SetDefaultString(unused_name);\n gs.AcceptNothing(true);\n gs.Get();\n if (gs.CommandResult() != Rhino.Commands.Result.Success)\n return gs.CommandResult();\n\n // Was a layer named entered?\n string layer_name = gs.StringResult().Trim();\n if (string.IsNullOrEmpty(layer_name))\n {\n Rhino.RhinoApp.WriteLine(\"Layer name cannot be blank.\");\n return Rhino.Commands.Result.Cancel;\n }\n\n // Is the layer name valid?\n if (!Rhino.DocObjects.Layer.IsValidName(layer_name))\n {\n Rhino.RhinoApp.WriteLine(layer_name + \" is not a valid layer name.\");\n return Rhino.Commands.Result.Cancel;\n }\n\n // Does a layer with the same name already exist?\n int layer_index = doc.Layers.Find(layer_name, true);\n if (layer_index >= 0)\n {\n Rhino.RhinoApp.WriteLine(\"A layer with the name {0} already exists.\", layer_name);\n return Rhino.Commands.Result.Cancel;\n }\n\n // Add a new layer to the document\n layer_index = doc.Layers.Add(layer_name, System.Drawing.Color.Black);\n if (layer_index < 0)\n {\n Rhino.RhinoApp.WriteLine(\"Unable to add {0} layer.\", layer_name);\n return Rhino.Commands.Result.Failure;\n }\n return Rhino.Commands.Result.Success;\n }\n}\n", "members": [ + ["Rhino.DocObjects.Layer", "System.Boolean IsValidName(System.String name)"], ["Rhino.RhinoApp", "System.Void WriteLine(System.String format, System.Object arg0)"], ["Rhino.RhinoApp", "System.Void WriteLine(System.String message)"], - ["Rhino.DocObjects.Layer", "System.Boolean IsValidName(System.String name)"], - ["Rhino.Input.Custom.GetString", "GetString()"], - ["Rhino.Input.Custom.GetString", "GetResult Get()"], ["Rhino.Input.Custom.GetBaseClass", "System.Void AcceptNothing(System.Boolean enable)"], ["Rhino.Input.Custom.GetBaseClass", "System.Void SetDefaultString(System.String defaultValue)"], ["Rhino.Input.Custom.GetBaseClass", "System.String StringResult()"], + ["Rhino.Input.Custom.GetString", "GetString()"], + ["Rhino.Input.Custom.GetString", "GetResult Get()"], ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Add(System.String layerName, System.Drawing.Color layerColor)"], ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Find(System.String layerName, System.Boolean ignoreDeletedLayers)"], ["Rhino.DocObjects.Tables.LayerTable", "Layer FindName(System.String layerName)"], @@ -98,14 +98,14 @@ "name": "Addlayout.cs", "code": "partial class Examples\n{\n /// \n /// Generate a layout with a single detail view that zooms to a list of objects\n /// \n /// \n /// \n public static Rhino.Commands.Result AddLayout(Rhino.RhinoDoc doc)\n {\n doc.PageUnitSystem = Rhino.UnitSystem.Millimeters;\n var page_views = doc.Views.GetPageViews();\n int page_number = (page_views==null) ? 1 : page_views.Length + 1;\n var pageview = doc.Views.AddPageView(string.Format(\"A0_{0}\",page_number), 1189, 841);\n if( pageview!=null )\n {\n Rhino.Geometry.Point2d top_left = new Rhino.Geometry.Point2d(20,821);\n Rhino.Geometry.Point2d bottom_right = new Rhino.Geometry.Point2d(1169, 20);\n var detail = pageview.AddDetailView(\"ModelView\", top_left, bottom_right, Rhino.Display.DefinedViewportProjection.Top);\n if (detail != null)\n {\n pageview.SetActiveDetail(detail.Id);\n detail.Viewport.ZoomExtents();\n detail.DetailGeometry.IsProjectionLocked = true;\n detail.DetailGeometry.SetScale(1, doc.ModelUnitSystem, 10, doc.PageUnitSystem);\n // Commit changes tells the document to replace the document's detail object\n // with the modified one that we just adjusted\n detail.CommitChanges();\n }\n pageview.SetPageAsActive();\n doc.Views.ActiveView = pageview;\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n return Rhino.Commands.Result.Failure;\n }\n}\n", "members": [ - ["Rhino.RhinoDoc", "UnitSystem PageUnitSystem"], + ["Rhino.Geometry.DetailView", "bool IsProjectionLocked"], + ["Rhino.Geometry.DetailView", "System.Boolean SetScale(System.Double modelLength, Rhino.UnitSystem modelUnits, System.Double pageLength, Rhino.UnitSystem pageUnits)"], + ["Rhino.DocObjects.RhinoObject", "System.Boolean CommitChanges()"], ["Rhino.Display.RhinoPageView", "DetailViewObject AddDetailView(System.String title, Geometry.Point2d corner0, Geometry.Point2d corner1, DefinedViewportProjection initialProjection)"], ["Rhino.Display.RhinoPageView", "System.Boolean SetActiveDetail(System.Guid detailId)"], ["Rhino.Display.RhinoPageView", "System.Void SetPageAsActive()"], ["Rhino.Display.RhinoViewport", "System.Boolean ZoomExtents()"], - ["Rhino.Geometry.DetailView", "bool IsProjectionLocked"], - ["Rhino.Geometry.DetailView", "System.Boolean SetScale(System.Double modelLength, Rhino.UnitSystem modelUnits, System.Double pageLength, Rhino.UnitSystem pageUnits)"], - ["Rhino.DocObjects.RhinoObject", "System.Boolean CommitChanges()"], + ["Rhino.RhinoDoc", "UnitSystem PageUnitSystem"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView AddPageView(System.String title, System.Double pageWidth, System.Double pageHeight)"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView[] GetPageViews()"] ] @@ -129,8 +129,8 @@ "name": "Addlineardimension.cs", "code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddLinearDimension(Rhino.RhinoDoc doc)\n {\n Rhino.Geometry.LinearDimension dimension;\n Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetLinearDimension(out dimension);\n if (rc == Rhino.Commands.Result.Success && dimension != null)\n {\n if (doc.Objects.AddLinearDimension(dimension) == Guid.Empty)\n rc = Rhino.Commands.Result.Failure;\n else\n doc.Views.Redraw();\n }\n return rc;\n }\n}\n", "members": [ - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLinearDimension(LinearDimension dimension)"], - ["Rhino.Input.RhinoGet", "Result GetLinearDimension(out LinearDimension dimension)"] + ["Rhino.Input.RhinoGet", "Result GetLinearDimension(out LinearDimension dimension)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLinearDimension(LinearDimension dimension)"] ] }, { @@ -150,28 +150,28 @@ ["Rhino.Geometry.Mesh", "MeshVertexNormalList Normals"], ["Rhino.Geometry.Mesh", "MeshVertexList Vertices"], ["Rhino.Geometry.Mesh", "System.Boolean Compact()"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddMesh(Geometry.Mesh mesh)"], ["Rhino.Geometry.Collections.MeshVertexList", "System.Int32 Add(System.Double x, System.Double y, System.Double z)"], ["Rhino.Geometry.Collections.MeshVertexList", "System.Int32 Add(System.Single x, System.Single y, System.Single z)"], ["Rhino.Geometry.Collections.MeshVertexNormalList", "System.Boolean ComputeNormals()"], - ["Rhino.Geometry.Collections.MeshFaceList", "System.Int32 AddFace(System.Int32 vertex1, System.Int32 vertex2, System.Int32 vertex3, System.Int32 vertex4)"] + ["Rhino.Geometry.Collections.MeshFaceList", "System.Int32 AddFace(System.Int32 vertex1, System.Int32 vertex2, System.Int32 vertex3, System.Int32 vertex4)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddMesh(Geometry.Mesh mesh)"] ] }, { "name": "Addnamedview.cs", "code": "partial class Examples\n{\n public static Rhino.Commands.Result AddNamedView(Rhino.RhinoDoc doc)\n {\n Rhino.Display.RhinoView view;\n Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetView(\"Select view to adjust\", out view);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n Rhino.Geometry.Point3d location;\n rc = Rhino.Input.RhinoGet.GetPoint(\"Camera Location\", false, out location);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n Rhino.Input.Custom.GetPoint gp = new Rhino.Input.Custom.GetPoint();\n gp.SetCommandPrompt(\"Look At Location\");\n gp.DrawLineFromPoint(location, false);\n gp.Get();\n if (gp.CommandResult() != Rhino.Commands.Result.Success)\n return gp.CommandResult();\n Rhino.Geometry.Point3d lookat = gp.Point();\n \n string name = view.ActiveViewport.Name;\n rc = Rhino.Input.RhinoGet.GetString(\"Name\", true, ref name);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n Rhino.Display.RhinoViewport vp = view.ActiveViewport;\n // save the current viewport projection\n vp.PushViewProjection();\n vp.CameraUp = Rhino.Geometry.Vector3d.ZAxis;\n vp.SetCameraLocation(location, false);\n vp.SetCameraDirection(lookat - location, true);\n vp.Name = name;\n\n doc.NamedViews.Add(name, vp.Id);\n view.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}", "members": [ - ["Rhino.RhinoDoc", "NamedViewTable NamedViews"], ["Rhino.Display.RhinoViewport", "Vector3d CameraUp"], ["Rhino.Display.RhinoViewport", "string Name"], ["Rhino.Display.RhinoViewport", "System.Boolean PopViewProjection()"], ["Rhino.Display.RhinoViewport", "System.Void PushViewProjection()"], ["Rhino.Display.RhinoViewport", "System.Void SetCameraDirection(Vector3d cameraDirection, System.Boolean updateTargetLocation)"], ["Rhino.Display.RhinoViewport", "System.Void SetCameraLocation(Point3d cameraLocation, System.Boolean updateTargetLocation)"], - ["Rhino.DocObjects.Tables.NamedViewTable", "System.Int32 Add(System.String name, System.Guid viewportId)"], + ["Rhino.RhinoDoc", "NamedViewTable NamedViews"], ["Rhino.Input.RhinoGet", "Result GetPoint(System.String prompt, System.Boolean acceptNothing, out Point3d point)"], ["Rhino.Input.RhinoGet", "Result GetString(System.String prompt, System.Boolean acceptNothing, ref System.String outputString)"], - ["Rhino.Input.RhinoGet", "Result GetView(System.String commandPrompt, out RhinoView view)"] + ["Rhino.Input.RhinoGet", "Result GetView(System.String commandPrompt, out RhinoView view)"], + ["Rhino.DocObjects.Tables.NamedViewTable", "System.Int32 Add(System.String name, System.Guid viewportId)"] ] }, { @@ -243,10 +243,10 @@ "name": "Addtruncatedcone.cs", "code": "using System;\nusing Rhino.Geometry;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddTruncatedCone(Rhino.RhinoDoc doc)\n {\n Point3d bottom_pt = new Point3d(0,0,0);\n const double bottom_radius = 2;\n Circle bottom_circle = new Circle(bottom_pt, bottom_radius);\n\n Point3d top_pt = new Point3d(0,0,10);\n const double top_radius = 6;\n Circle top_circle = new Circle(top_pt, top_radius);\n\n LineCurve shapeCurve = new LineCurve(bottom_circle.PointAt(0), top_circle.PointAt(0));\n Line axis = new Line(bottom_circle.Center, top_circle.Center);\n RevSurface revsrf = RevSurface.Create(shapeCurve, axis);\n Brep tcone_brep = Brep.CreateFromRevSurface(revsrf, true, true);\n if( doc.Objects.AddBrep(tcone_brep) != Guid.Empty )\n {\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n return Rhino.Commands.Result.Failure;\n }\n}\n", "members": [ - ["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"], - ["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"], ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, System.Boolean capStart, System.Boolean capEnd)"], - ["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"] + ["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"], + ["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"], + ["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"] ] }, { @@ -433,9 +433,9 @@ "name": "Curvesurfaceintersect.cs", "code": "using Rhino;\nusing Rhino.Geometry;\nusing Rhino.Geometry.Intersect;\nusing Rhino.Input.Custom;\nusing Rhino.DocObjects;\nusing Rhino.Commands;\n\nnamespace examples_cs\n{\n public class CurveSurfaceIntersectCommand : Command\n {\n public override string EnglishName { get { return \"csCurveSurfaceIntersect\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var gs = new GetObject();\n gs.SetCommandPrompt(\"select brep\");\n gs.GeometryFilter = ObjectType.Brep;\n gs.DisablePreSelect();\n gs.SubObjectSelect = false;\n gs.Get();\n if (gs.CommandResult() != Result.Success)\n return gs.CommandResult();\n var brep = gs.Object(0).Brep();\n\n var gc = new GetObject();\n gc.SetCommandPrompt(\"select curve\");\n gc.GeometryFilter = ObjectType.Curve;\n gc.DisablePreSelect();\n gc.SubObjectSelect = false;\n gc.Get();\n if (gc.CommandResult() != Result.Success)\n return gc.CommandResult();\n var curve = gc.Object(0).Curve();\n\n if (brep == null || curve == null)\n return Result.Failure;\n\n var tolerance = doc.ModelAbsoluteTolerance;\n\n Point3d[] intersection_points;\n Curve[] overlap_curves;\n if (!Intersection.CurveBrep(curve, brep, tolerance, out overlap_curves, out intersection_points))\n {\n RhinoApp.WriteLine(\"curve brep intersection failed\");\n return Result.Nothing;\n }\n\n foreach (var overlap_curve in overlap_curves)\n doc.Objects.AddCurve(overlap_curve);\n foreach (var intersection_point in intersection_points)\n doc.Objects.AddPoint(intersection_point);\n\n RhinoApp.WriteLine(\"{0} overlap curves, and {1} intersection points\", overlap_curves.Length, intersection_points.Length);\n doc.Views.Redraw();\n\n return Result.Success;\n }\n }\n}", "members": [ - ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 Select(IEnumerable objectIds)"], + ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, System.Double tolerance, System.Double overlapTolerance)"], ["Rhino.Geometry.Intersect.IntersectionEvent", "bool IsOverlap"], - ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, System.Double tolerance, System.Double overlapTolerance)"] + ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 Select(IEnumerable objectIds)"] ] }, { @@ -458,8 +458,8 @@ "code": "using Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Commands;\nusing Rhino.Geometry;\n\nnamespace examples_cs\n{\n public class ChangeDimensionStyleCommand : Rhino.Commands.Command\n {\n public override string EnglishName\n {\n get { return \"csChangeDimensionStyle\"; }\n }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n foreach (var rhino_object in doc.Objects.GetObjectList(ObjectType.Annotation))\n {\n var annotation_object = rhino_object as AnnotationObjectBase;\n if (annotation_object == null) continue;\n\n var annotation = annotation_object.Geometry as AnnotationBase;\n if (annotation == null) continue;\n\n if (annotation.Index == doc.DimStyles.CurrentDimensionStyleIndex) continue;\n\n annotation.Index = doc.DimStyles.CurrentDimensionStyleIndex;\n annotation_object.CommitChanges();\n }\n\n doc.Views.Redraw();\n\n return Result.Success;\n }\n }\n}", "members": [ ["Rhino.RhinoDoc", "DimStyleTable DimStyles"], - ["Rhino.DocObjects.Tables.DimStyleTable", "int CurrentIndex"], - ["Rhino.DocObjects.Tables.ObjectTable", "IEnumerable GetObjectList(System.Type typeFilter)"] + ["Rhino.DocObjects.Tables.ObjectTable", "IEnumerable GetObjectList(System.Type typeFilter)"], + ["Rhino.DocObjects.Tables.DimStyleTable", "int CurrentIndex"] ] }, { @@ -486,12 +486,12 @@ ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, System.Boolean reverse)"], ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds)"], ["Rhino.Geometry.Curve", "System.Boolean IsShort(System.Double tolerance)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3d point)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3f point)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Select(System.Guid objectId)"], ["Rhino.Input.RhinoGet", "Result GetNumber(System.String prompt, System.Boolean acceptNothing, ref System.Double outputNumber, System.Double lowerLimit, System.Double upperLimit)"], ["Rhino.Input.RhinoGet", "Result GetNumber(System.String prompt, System.Boolean acceptNothing, ref System.Double outputNumber)"], - ["Rhino.Input.RhinoGet", "Result GetOneObject(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef rhObject)"] + ["Rhino.Input.RhinoGet", "Result GetOneObject(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef rhObject)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3d point)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3f point)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Select(System.Guid objectId)"] ] }, { @@ -609,14 +609,14 @@ "name": "Hatchcurve.cs", "code": "partial class Examples\n{\n public static Rhino.Commands.Result HatchCurve(Rhino.RhinoDoc doc)\n {\n var go = new Rhino.Input.Custom.GetObject();\n go.SetCommandPrompt(\"Select closed planar curve\");\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve;\n go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve;\n go.SubObjectSelect = false;\n go.Get();\n if( go.CommandResult() != Rhino.Commands.Result.Success )\n return go.CommandResult();\n\n var curve = go.Object(0).Curve();\n if( curve==null || !curve.IsClosed || !curve.IsPlanar() )\n return Rhino.Commands.Result.Failure;\n\n string hatch_name = doc.HatchPatterns[doc.HatchPatterns.CurrentHatchPatternIndex].Name;\n var rc = Rhino.Input.RhinoGet.GetString(\"Hatch pattern\", true, ref hatch_name);\n if( rc!= Rhino.Commands.Result.Success )\n return rc;\n hatch_name = hatch_name.Trim();\n if( string.IsNullOrWhiteSpace(hatch_name) )\n return Rhino.Commands.Result.Nothing;\n int index = doc.HatchPatterns.Find(hatch_name, true);\n if( index < 0 )\n {\n Rhino.RhinoApp.WriteLine(\"Hatch pattern does not exist.\");\n return Rhino.Commands.Result.Nothing;\n }\n\n var hatches = Rhino.Geometry.Hatch.Create( curve, index, 0, 1);\n for( int i=0; i0 )\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n", "members": [ - ["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"], ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, System.Int32 hatchPatternIndex, System.Double rotationRadians, System.Double scale, System.Double tolerance)"], ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, System.Int32 hatchPatternIndex, System.Double rotationRadians, System.Double scale)"], ["Rhino.DocObjects.ModelComponent", "string Name"], + ["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"], ["Rhino.DocObjects.Tables.HatchPatternTable", "int CurrentHatchPatternIndex"], ["Rhino.DocObjects.Tables.HatchPatternTable", "System.Int32 Find(System.String name, System.Boolean ignoreDeleted)"], - ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(System.String name)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"] + ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(System.String name)"] ] }, { @@ -625,8 +625,8 @@ "members": [ ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Curve curve, System.Boolean allowPickingPointOffObject)"], ["Rhino.Input.Custom.GetPoint", "Curve PointOnCurve(out System.Double t)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Replace(ObjRef objref, Curve curve)"], - ["Rhino.Geometry.Collections.NurbsCurveKnotList", "System.Boolean InsertKnot(System.Double value)"] + ["Rhino.Geometry.Collections.NurbsCurveKnotList", "System.Boolean InsertKnot(System.Double value)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Replace(ObjRef objref, Curve curve)"] ] }, { @@ -641,8 +641,8 @@ "name": "Intersectcurves.cs", "code": "partial class Examples\n{\n public static Rhino.Commands.Result IntersectCurves(Rhino.RhinoDoc doc)\n {\n // Select two curves to intersect\n var go = new Rhino.Input.Custom.GetObject();\n go.SetCommandPrompt(\"Select two curves\");\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve;\n go.GetMultiple(2, 2);\n if (go.CommandResult() != Rhino.Commands.Result.Success)\n return go.CommandResult();\n\n // Validate input\n var curveA = go.Object(0).Curve();\n var curveB = go.Object(1).Curve();\n if (curveA == null || curveB == null)\n return Rhino.Commands.Result.Failure;\n\n // Calculate the intersection\n const double intersection_tolerance = 0.001;\n const double overlap_tolerance = 0.0;\n var events = Rhino.Geometry.Intersect.Intersection.CurveCurve(curveA, curveB, intersection_tolerance, overlap_tolerance);\n\n // Process the results\n if (events != null)\n {\n for (int i = 0; i < events.Count; i++)\n {\n var ccx_event = events[i];\n doc.Objects.AddPoint(ccx_event.PointA);\n if (ccx_event.PointA.DistanceTo(ccx_event.PointB) > double.Epsilon)\n {\n doc.Objects.AddPoint(ccx_event.PointB);\n doc.Objects.AddLine(ccx_event.PointA, ccx_event.PointB);\n }\n }\n doc.Views.Redraw();\n }\n return Rhino.Commands.Result.Success;\n }\n}\n", "members": [ - ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"], ["Rhino.Geometry.Point3f", "System.Double DistanceTo(Point3f other)"], + ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"], ["Rhino.DocObjects.ObjRef", "Curve Curve()"], ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, System.Double tolerance, System.Double overlapTolerance)"] ] @@ -658,9 +658,9 @@ "name": "Intersectlines.cs", "code": "using Rhino.Geometry;\n\npartial class Examples\n{\n public static Rhino.Commands.Result IntersectLines(Rhino.RhinoDoc doc)\n {\n Rhino.Input.Custom.GetObject go = new Rhino.Input.Custom.GetObject();\n go.SetCommandPrompt( \"Select lines\" );\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve;\n go.GetMultiple( 2, 2);\n if( go.CommandResult() != Rhino.Commands.Result.Success )\n return go.CommandResult();\n if( go.ObjectCount != 2 )\n return Rhino.Commands.Result.Failure;\n\n LineCurve crv0 = go.Object(0).Geometry() as LineCurve;\n LineCurve crv1 = go.Object(1).Geometry() as LineCurve;\n if( crv0==null || crv1==null )\n return Rhino.Commands.Result.Failure;\n\n Line line0 = crv0.Line;\n Line line1 = crv1.Line;\n Vector3d v0 = line0.Direction;\n v0.Unitize();\n Vector3d v1 = line1.Direction;\n v1.Unitize();\n\n if( v0.IsParallelTo(v1) != 0 )\n {\n Rhino.RhinoApp.WriteLine(\"Selected lines are parallel.\");\n return Rhino.Commands.Result.Nothing;\n }\n\n double a, b;\n if( !Rhino.Geometry.Intersect.Intersection.LineLine(line0, line1, out a, out b))\n {\n Rhino.RhinoApp.WriteLine(\"No intersection found.\");\n return Rhino.Commands.Result.Nothing;\n }\n\n Point3d pt0 = line0.PointAt(a);\n Point3d pt1 = line1.PointAt(b);\n // pt0 and pt1 should be equal, so we will only add pt0 to the document\n doc.Objects.AddPoint( pt0 );\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n", "members": [ - ["Rhino.Geometry.Vector3d", "System.Int32 IsParallelTo(Vector3d other)"], ["Rhino.Geometry.Line", "Vector3d Direction"], ["Rhino.Geometry.Line", "Point3d PointAt(System.Double t)"], + ["Rhino.Geometry.Vector3d", "System.Int32 IsParallelTo(Vector3d other)"], ["Rhino.Geometry.Intersect.Intersection", "System.Boolean LineLine(Line lineA, Line lineB, out System.Double a, out System.Double b)"] ] }, @@ -723,10 +723,10 @@ "name": "Meshdrawing.cs", "code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Display;\nusing Rhino.Geometry;\nusing Rhino.Input.Custom;\nusing Rhino.DocObjects;\nusing System.Drawing;\n\nnamespace examples_cs\n{\n public class MeshDrawingCommand : Command\n {\n public override string EnglishName { get { return \"csDrawMesh\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var gs = new GetObject();\n gs.SetCommandPrompt(\"select sphere\");\n gs.GeometryFilter = ObjectType.Surface;\n gs.DisablePreSelect();\n gs.SubObjectSelect = false;\n gs.Get();\n if (gs.CommandResult() != Result.Success)\n return gs.CommandResult();\n\n Sphere sphere;\n gs.Object(0).Surface().TryGetSphere(out sphere);\n if (sphere.IsValid)\n {\n var mesh = Mesh.CreateFromSphere(sphere, 10, 10);\n if (mesh == null)\n return Result.Failure;\n\n var conduit = new DrawBlueMeshConduit(mesh) {Enabled = true};\n doc.Views.Redraw();\n\n var in_str = \"\";\n Rhino.Input.RhinoGet.GetString(\"press to continue\", true, ref in_str);\n\n conduit.Enabled = false;\n doc.Views.Redraw();\n return Result.Success;\n }\n else\n return Result.Failure;\n }\n }\n\n class DrawBlueMeshConduit : DisplayConduit\n {\n readonly Mesh m_mesh;\n readonly Color m_color;\n readonly DisplayMaterial m_material;\n readonly BoundingBox m_bbox;\n\n public DrawBlueMeshConduit(Mesh mesh)\n {\n // set up as much data as possible so we do the minimum amount of work possible inside\n // the actual display code\n m_mesh = mesh;\n m_color = System.Drawing.Color.Blue;\n m_material = new DisplayMaterial();\n m_material.Diffuse = m_color;\n if (m_mesh != null && m_mesh.IsValid)\n m_bbox = m_mesh.GetBoundingBox(true);\n }\n\n // this is called every frame inside the drawing code so try to do as little as possible\n // in order to not degrade display speed. Don't create new objects if you don't have to as this\n // will incur an overhead on the heap and garbage collection.\n protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)\n {\n base.CalculateBoundingBox(e);\n // Since we are dynamically drawing geometry, we needed to override\n // CalculateBoundingBox. Otherwise, there is a good chance that our\n // dynamically drawing geometry would get clipped.\n \n // Union the mesh's bbox with the scene's bounding box\n e.IncludeBoundingBox(m_bbox);\n }\n\n protected override void PreDrawObjects(DrawEventArgs e)\n {\n base.PreDrawObjects(e);\n var vp = e.Display.Viewport;\n if (vp.DisplayMode.EnglishName.ToLower() == \"wireframe\")\n e.Display.DrawMeshWires(m_mesh, m_color);\n else\n e.Display.DrawMeshShaded(m_mesh, m_material);\n }\n }\n}", "members": [ - ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"], - ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"], ["Rhino.Display.DisplayConduit", "System.Void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)"], - ["Rhino.Display.DisplayConduit", "System.Void PreDrawObjects(DrawEventArgs e)"] + ["Rhino.Display.DisplayConduit", "System.Void PreDrawObjects(DrawEventArgs e)"], + ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"], + ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"] ] }, { @@ -820,13 +820,13 @@ ["Rhino.DocObjects.RhinoObject", "System.Int32 Select(System.Boolean on)"], ["Rhino.DocObjects.ObjRef", "RhinoObject Object()"], ["Rhino.DocObjects.ObjRef", "Surface Surface()"], + ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"], ["Rhino.Input.Custom.GetObject", "bool DeselectAllBeforePostSelect"], ["Rhino.Input.Custom.GetObject", "ObjectType GeometryFilter"], ["Rhino.Input.Custom.GetObject", "bool GroupSelect"], ["Rhino.Input.Custom.GetObject", "bool OneByOnePostSelect"], ["Rhino.Input.Custom.GetObject", "bool SubObjectSelect"], ["Rhino.Input.Custom.GetObject", "ObjRef Object(System.Int32 index)"], - ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"], ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, System.Boolean deleteOriginal)"] ] }, @@ -848,8 +848,8 @@ "name": "Pointatcursor.cs", "code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.DocObjects;\nusing System;\n\nnamespace examples_cs\n{\n public class PointAtCursorCommand : Command\n {\n public override string EnglishName { get { return \"csPointAtCursor\"; } }\n\n [System.Runtime.InteropServices.DllImport(\"user32.dll\")]\n public static extern bool GetCursorPos(out System.Drawing.Point point);\n \n [System.Runtime.InteropServices.DllImport(\"user32.dll\")]\n public static extern bool ScreenToClient(IntPtr hWnd, ref System.Drawing.Point point);\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var result = Result.Failure;\n var view = doc.Views.ActiveView;\n if (view == null) return result;\n\n System.Drawing.Point windows_drawing_point;\n if (!GetCursorPos(out windows_drawing_point) || !ScreenToClient(view.Handle, ref windows_drawing_point))\n return result;\n\n var xform = view.ActiveViewport.GetTransform(CoordinateSystem.Screen, CoordinateSystem.World);\n var point = new Rhino.Geometry.Point3d(windows_drawing_point.X, windows_drawing_point.Y, 0.0);\n RhinoApp.WriteLine(\"screen point: ({0})\", point);\n point.Transform(xform);\n RhinoApp.WriteLine(\"world point: ({0})\", point);\n result = Result.Success;\n return result;\n }\n }\n}", "members": [ - ["Rhino.Display.RhinoViewport", "Transform GetTransform(DocObjects.CoordinateSystem sourceSystem, DocObjects.CoordinateSystem destinationSystem)"], - ["Rhino.Geometry.Point3d", "System.Void Transform(Transform xform)"] + ["Rhino.Geometry.Point3d", "System.Void Transform(Transform xform)"], + ["Rhino.Display.RhinoViewport", "Transform GetTransform(DocObjects.CoordinateSystem sourceSystem, DocObjects.CoordinateSystem destinationSystem)"] ] }, { @@ -1017,21 +1017,21 @@ "name": "Addbackgroundbitmap.py", "code": "import Rhino\nimport scriptcontext\nimport System.Windows.Forms.DialogResult\nimport System.Drawing.Image\n\ndef AddBackgroundBitmap():\n # Allow the user to select a bitmap file\n fd = Rhino.UI.OpenFileDialog()\n fd.Filter = \"Image Files (*.bmp;*.png;*.jpg)|*.bmp;*.png;*.jpg\"\n if fd.ShowDialog()!=System.Windows.Forms.DialogResult.OK:\n return Rhino.Commands.Result.Cancel\n\n # Verify the file that was selected\n image = None\n try:\n image = System.Drawing.Image.FromFile(fd.FileName)\n except:\n return Rhino.Commands.Result.Failure\n\n # Allow the user to pick the bitmap origin\n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Bitmap Origin\")\n gp.ConstrainToConstructionPlane(True)\n gp.Get()\n if gp.CommandResult()!=Rhino.Commands.Result.Success:\n return gp.CommandResult()\n\n # Get the view that the point was picked in.\n # This will be the view that the bitmap appears in.\n view = gp.View()\n if view is None:\n view = scriptcontext.doc.Views.ActiveView\n if view is None: return Rhino.Commands.Result.Failure\n\n # Allow the user to specify the bitmap with in model units\n gn = Rhino.Input.Custom.GetNumber()\n gn.SetCommandPrompt(\"Bitmap width\")\n gn.SetLowerLimit(1.0, False)\n gn.Get()\n if gn.CommandResult()!=Rhino.Commands.Result.Success:\n return gn.CommandResult()\n\n # Cook up some scale factors\n w = gn.Number()\n h = w * (image.Width / image.Height)\n\n plane = view.ActiveViewport.ConstructionPlane()\n plane.Origin = gp.Point()\n view.ActiveViewport.SetTraceImage(fd.FileName, plane, w, h, False, False)\n view.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n AddBackgroundBitmap()\n", "members": [ - ["Rhino.Display.RhinoView", "RhinoViewport ActiveViewport"], - ["Rhino.Display.RhinoView", "System.Void Redraw()"], ["Rhino.Display.RhinoViewport", "Plane ConstructionPlane()"], ["Rhino.Display.RhinoViewport", "System.Boolean SetTraceImage(System.String bitmapFileName, Plane plane, System.Double width, System.Double height, System.Boolean grayscale, System.Boolean filtered)"], + ["Rhino.Display.RhinoView", "RhinoViewport ActiveViewport"], + ["Rhino.Display.RhinoView", "System.Void Redraw()"], ["Rhino.UI.OpenFileDialog", "OpenFileDialog()"], ["Rhino.UI.OpenFileDialog", "string FileName"], ["Rhino.UI.OpenFileDialog", "string Filter"], ["Rhino.UI.OpenFileDialog", "System.Boolean ShowOpenDialog()"], ["Rhino.Input.Custom.GetPoint", "System.Boolean ConstrainToConstructionPlane(System.Boolean throughBasePoint)"], - ["Rhino.Input.Custom.GetNumber", "GetNumber()"], - ["Rhino.Input.Custom.GetNumber", "GetResult Get()"], - ["Rhino.Input.Custom.GetNumber", "System.Void SetLowerLimit(System.Double lowerLimit, System.Boolean strictlyGreaterThan)"], ["Rhino.Input.Custom.GetBaseClass", "Result CommandResult()"], ["Rhino.Input.Custom.GetBaseClass", "System.Double Number()"], ["Rhino.Input.Custom.GetBaseClass", "RhinoView View()"], + ["Rhino.Input.Custom.GetNumber", "GetNumber()"], + ["Rhino.Input.Custom.GetNumber", "GetResult Get()"], + ["Rhino.Input.Custom.GetNumber", "System.Void SetLowerLimit(System.Double lowerLimit, System.Boolean strictlyGreaterThan)"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoView ActiveView"] ] }, @@ -1056,8 +1056,8 @@ "name": "Addcircle.py", "code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddCircle():\n center = Rhino.Geometry.Point3d(0, 0, 0)\n radius = 10.0\n c = Rhino.Geometry.Circle(center, radius)\n if scriptcontext.doc.Objects.AddCircle(c)!=System.Guid.Empty:\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n return Rhino.Commands.Result.Failure\n\nif __name__==\"__main__\":\n AddCircle()\n", "members": [ - ["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"], ["Rhino.Geometry.Point3d", "Point3d(double x, double y, double z)"], + ["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"], ["Rhino.DocObjects.Tables.ViewTable", "System.Void Redraw()"], ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddCircle(Circle circle)"] ] @@ -1068,31 +1068,31 @@ "members": [ ["Rhino.Geometry.Plane", "Plane(Point3d origin, Point3d xPoint, Point3d yPoint)"], ["Rhino.FileIO.File3dmObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"], - ["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"] + ["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"] ] }, { "name": "Addcylinder.py", "code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddCylinder():\n center_point = Rhino.Geometry.Point3d(0, 0, 0)\n height_point = Rhino.Geometry.Point3d(0, 0, 10)\n zaxis = height_point-center_point\n plane = Rhino.Geometry.Plane(center_point, zaxis)\n radius = 5\n circle = Rhino.Geometry.Circle(plane, radius)\n cylinder = Rhino.Geometry.Cylinder(circle, zaxis.Length)\n brep = cylinder.ToBrep(True, True)\n if brep:\n if scriptcontext.doc.Objects.AddBrep(brep)!=System.Guid.Empty:\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n return Rhino.Commands.Result.Failure\n\nif __name__==\"__main__\":\n AddCylinder()\n", "members": [ - ["Rhino.Geometry.Plane", "Plane(Point3d origin, Vector3d normal)"], ["Rhino.Geometry.Cylinder", "Cylinder(Circle baseCircle, double height)"], - ["Rhino.Geometry.Cylinder", "Brep ToBrep(System.Boolean capBottom, System.Boolean capTop)"] + ["Rhino.Geometry.Cylinder", "Brep ToBrep(System.Boolean capBottom, System.Boolean capTop)"], + ["Rhino.Geometry.Plane", "Plane(Point3d origin, Vector3d normal)"] ] }, { "name": "Addlayer.py", "code": "import Rhino\nimport scriptcontext\nimport System.Guid, System.Drawing.Color\n\ndef AddLayer():\n # Cook up an unused layer name\n unused_name = scriptcontext.doc.Layers.GetUnusedLayerName(False)\n\n # Prompt the user to enter a layer name\n gs = Rhino.Input.Custom.GetString()\n gs.SetCommandPrompt(\"Name of layer to add\")\n gs.SetDefaultString(unused_name)\n gs.AcceptNothing(True)\n gs.Get()\n if gs.CommandResult()!=Rhino.Commands.Result.Success:\n return gs.CommandResult()\n\n # Was a layer named entered?\n layer_name = gs.StringResult().Trim()\n if not layer_name:\n print \"Layer name cannot be blank.\"\n return Rhino.Commands.Result.Cancel\n\n # Is the layer name valid?\n if not Rhino.DocObjects.Layer.IsValidName(layer_name):\n print layer_name, \"is not a valid layer name.\"\n return Rhino.Commands.Result.Cancel\n\n # Does a layer with the same name already exist?\n layer_index = scriptcontext.doc.Layers.Find(layer_name, True)\n if layer_index>=0:\n print \"A layer with the name\", layer_name, \"already exists.\"\n return Rhino.Commands.Result.Cancel\n\n # Add a new layer to the document\n layer_index = scriptcontext.doc.Layers.Add(layer_name, System.Drawing.Color.Black)\n if layer_index<0:\n print \"Unable to add\", layer_name, \"layer.\"\n return Rhino.Commands.Result.Failure\n\n return Rhino.Commands.Result.Success\n\n\nif __name__==\"__main__\":\n AddLayer()\n", "members": [ + ["Rhino.DocObjects.Layer", "System.Boolean IsValidName(System.String name)"], ["Rhino.RhinoApp", "System.Void WriteLine(System.String format, System.Object arg0)"], ["Rhino.RhinoApp", "System.Void WriteLine(System.String message)"], - ["Rhino.DocObjects.Layer", "System.Boolean IsValidName(System.String name)"], - ["Rhino.Input.Custom.GetString", "GetString()"], - ["Rhino.Input.Custom.GetString", "GetResult Get()"], ["Rhino.Input.Custom.GetBaseClass", "System.Void AcceptNothing(System.Boolean enable)"], ["Rhino.Input.Custom.GetBaseClass", "System.Void SetDefaultString(System.String defaultValue)"], ["Rhino.Input.Custom.GetBaseClass", "System.String StringResult()"], + ["Rhino.Input.Custom.GetString", "GetString()"], + ["Rhino.Input.Custom.GetString", "GetResult Get()"], ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Add(System.String layerName, System.Drawing.Color layerColor)"], ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Find(System.String layerName, System.Boolean ignoreDeletedLayers)"], ["Rhino.DocObjects.Tables.LayerTable", "Layer FindName(System.String layerName)"], @@ -1104,14 +1104,14 @@ "name": "Addlayout.py", "code": "import Rhino\nimport scriptcontext\n\n# Generate a layout with a single detail view that zooms\n# to a list of objects\ndef AddLayout():\n scriptcontext.doc.PageUnitSystem = Rhino.UnitSystem.Millimeters\n page_views = scriptcontext.doc.Views.GetPageViews()\n page_number = 1\n if page_views: page_number = len(page_views) + 1\n pageview = scriptcontext.doc.Views.AddPageView(\"A0_{0}\".format(page_number), 1189, 841)\n if pageview:\n top_left = Rhino.Geometry.Point2d(20,821)\n bottom_right = Rhino.Geometry.Point2d(1169, 20)\n detail = pageview.AddDetailView(\"ModelView\", top_left, bottom_right, Rhino.Display.DefinedViewportProjection.Top)\n if detail:\n pageview.SetActiveDetail(detail.Id)\n detail.Viewport.ZoomExtents()\n detail.DetailGeometry.IsProjectionLocked = True\n detail.DetailGeometry.SetScale(1, scriptcontext.doc.ModelUnitSystem, 10, scriptcontext.doc.PageUnitSystem)\n # Commit changes tells the document to replace the document's detail object\n # with the modified one that we just adjusted\n detail.CommitChanges()\n pageview.SetPageAsActive()\n scriptcontext.doc.Views.ActiveView = pageview\n scriptcontext.doc.Views.Redraw()\n\nif __name__==\"__main__\":\n AddLayout()", "members": [ - ["Rhino.RhinoDoc", "UnitSystem PageUnitSystem"], + ["Rhino.Geometry.DetailView", "bool IsProjectionLocked"], + ["Rhino.Geometry.DetailView", "System.Boolean SetScale(System.Double modelLength, Rhino.UnitSystem modelUnits, System.Double pageLength, Rhino.UnitSystem pageUnits)"], + ["Rhino.DocObjects.RhinoObject", "System.Boolean CommitChanges()"], ["Rhino.Display.RhinoPageView", "DetailViewObject AddDetailView(System.String title, Geometry.Point2d corner0, Geometry.Point2d corner1, DefinedViewportProjection initialProjection)"], ["Rhino.Display.RhinoPageView", "System.Boolean SetActiveDetail(System.Guid detailId)"], ["Rhino.Display.RhinoPageView", "System.Void SetPageAsActive()"], ["Rhino.Display.RhinoViewport", "System.Boolean ZoomExtents()"], - ["Rhino.Geometry.DetailView", "bool IsProjectionLocked"], - ["Rhino.Geometry.DetailView", "System.Boolean SetScale(System.Double modelLength, Rhino.UnitSystem modelUnits, System.Double pageLength, Rhino.UnitSystem pageUnits)"], - ["Rhino.DocObjects.RhinoObject", "System.Boolean CommitChanges()"], + ["Rhino.RhinoDoc", "UnitSystem PageUnitSystem"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView AddPageView(System.String title, System.Double pageWidth, System.Double pageHeight)"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView[] GetPageViews()"] ] @@ -1135,8 +1135,8 @@ "name": "Addlineardimension.py", "code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddLinearDimension():\n rc, dimension = Rhino.Input.RhinoGet.GetLinearDimension()\n if rc==Rhino.Commands.Result.Success:\n if scriptcontext.doc.Objects.AddLinearDimension(dimension)==System.Guid.Empty:\n rc = Rhino.Commands.Result.Failure\n else:\n scriptcontext.doc.Views.Redraw()\n return rc\n\n\nif __name__==\"__main__\":\n AddLinearDimension()\n", "members": [ - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLinearDimension(LinearDimension dimension)"], - ["Rhino.Input.RhinoGet", "Result GetLinearDimension(out LinearDimension dimension)"] + ["Rhino.Input.RhinoGet", "Result GetLinearDimension(out LinearDimension dimension)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLinearDimension(LinearDimension dimension)"] ] }, { @@ -1156,28 +1156,28 @@ ["Rhino.Geometry.Mesh", "MeshVertexNormalList Normals"], ["Rhino.Geometry.Mesh", "MeshVertexList Vertices"], ["Rhino.Geometry.Mesh", "System.Boolean Compact()"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddMesh(Geometry.Mesh mesh)"], ["Rhino.Geometry.Collections.MeshVertexList", "System.Int32 Add(System.Double x, System.Double y, System.Double z)"], ["Rhino.Geometry.Collections.MeshVertexList", "System.Int32 Add(System.Single x, System.Single y, System.Single z)"], ["Rhino.Geometry.Collections.MeshVertexNormalList", "System.Boolean ComputeNormals()"], - ["Rhino.Geometry.Collections.MeshFaceList", "System.Int32 AddFace(System.Int32 vertex1, System.Int32 vertex2, System.Int32 vertex3, System.Int32 vertex4)"] + ["Rhino.Geometry.Collections.MeshFaceList", "System.Int32 AddFace(System.Int32 vertex1, System.Int32 vertex2, System.Int32 vertex3, System.Int32 vertex4)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddMesh(Geometry.Mesh mesh)"] ] }, { "name": "Addnamedview.py", "code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddNamedView():\n rc, view = Rhino.Input.RhinoGet.GetView(\"Select view to adjust\")\n if rc!=Rhino.Commands.Result.Success: return rc\n\n rc, location = Rhino.Input.RhinoGet.GetPoint(\"Camera Location\", False)\n if rc!=Rhino.Commands.Result.Success: return rc\n \n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Look At Location\")\n gp.DrawLineFromPoint(location, False)\n gp.Get()\n if gp.CommandResult()!=Rhino.Commands.Result.Success:\n return gp.CommandResult()\n lookat = gp.Point()\n\n name = view.ActiveViewport.Name\n rc, name = Rhino.Input.RhinoGet.GetString(\"Name\", True, name)\n if rc!=Rhino.Commands.Result.Success: return rc\n\n vp = view.ActiveViewport\n # save the current viewport projection\n vp.PushViewProjection()\n vp.CameraUp = Rhino.Geometry.Vector3d.ZAxis\n vp.SetCameraLocation(location, False)\n vp.SetCameraDirection(lookat - location, True)\n vp.Name = name\n \n scriptcontext.doc.NamedViews.Add(name, vp.Id)\n view.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n AddNamedView()\n", "members": [ - ["Rhino.RhinoDoc", "NamedViewTable NamedViews"], ["Rhino.Display.RhinoViewport", "Vector3d CameraUp"], ["Rhino.Display.RhinoViewport", "string Name"], ["Rhino.Display.RhinoViewport", "System.Boolean PopViewProjection()"], ["Rhino.Display.RhinoViewport", "System.Void PushViewProjection()"], ["Rhino.Display.RhinoViewport", "System.Void SetCameraDirection(Vector3d cameraDirection, System.Boolean updateTargetLocation)"], ["Rhino.Display.RhinoViewport", "System.Void SetCameraLocation(Point3d cameraLocation, System.Boolean updateTargetLocation)"], - ["Rhino.DocObjects.Tables.NamedViewTable", "System.Int32 Add(System.String name, System.Guid viewportId)"], + ["Rhino.RhinoDoc", "NamedViewTable NamedViews"], ["Rhino.Input.RhinoGet", "Result GetPoint(System.String prompt, System.Boolean acceptNothing, out Point3d point)"], ["Rhino.Input.RhinoGet", "Result GetString(System.String prompt, System.Boolean acceptNothing, ref System.String outputString)"], - ["Rhino.Input.RhinoGet", "Result GetView(System.String commandPrompt, out RhinoView view)"] + ["Rhino.Input.RhinoGet", "Result GetView(System.String commandPrompt, out RhinoView view)"], + ["Rhino.DocObjects.Tables.NamedViewTable", "System.Int32 Add(System.String name, System.Guid viewportId)"] ] }, { @@ -1249,10 +1249,10 @@ "name": "Addtruncatedcone.py", "code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddTruncatedCone():\n bottom_pt = Rhino.Geometry.Point3d(0,0,0)\n bottom_radius = 2\n bottom_circle = Rhino.Geometry.Circle(bottom_pt, bottom_radius)\n\n top_pt = Rhino.Geometry.Point3d(0,0,10)\n top_radius = 6\n top_circle = Rhino.Geometry.Circle(top_pt, top_radius)\n\n shapeCurve = Rhino.Geometry.LineCurve(bottom_circle.PointAt(0), top_circle.PointAt(0))\n axis = Rhino.Geometry.Line(bottom_circle.Center, top_circle.Center)\n revsrf = Rhino.Geometry.RevSurface.Create(shapeCurve, axis)\n tcone_brep = Rhino.Geometry.Brep.CreateFromRevSurface(revsrf, True, True)\n\n if scriptcontext.doc.Objects.AddBrep(tcone_brep)!=System.Guid.Empty:\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n return Rhino.Commands.Result.Failure\n\n\nif __name__==\"__main__\":\n AddTruncatedCone()\n", "members": [ - ["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"], - ["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"], ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, System.Boolean capStart, System.Boolean capEnd)"], - ["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"] + ["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"], + ["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"], + ["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"] ] }, { @@ -1430,9 +1430,9 @@ "name": "Curvesurfaceintersect.py", "code": "import rhinoscriptsyntax as rs\nfrom scriptcontext import *\nimport Rhino\nimport System.Collections.Generic as scg\nimport System as s\n\ndef RunCommand():\n srfid = rs.GetObject(\"select surface\", rs.filter.surface | rs.filter.polysurface)\n if not srfid: return\n \n crvid = rs.GetObject(\"select curve\", rs.filter.curve)\n if not crvid: return\n\n result = rs.CurveBrepIntersect(crvid, srfid)\n if result == None:\n print \"no intersection\"\n return\n \n curves, points = result\n for curve in curves:\n doc.Objects.AddCurve(rs.coercecurve(curve))\n for point in points:\n rs.AddPoint(point)\n\n doc.Views.Redraw()\n\nif __name__ == \"__main__\":\n RunCommand()\n", "members": [ - ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 Select(IEnumerable objectIds)"], + ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, System.Double tolerance, System.Double overlapTolerance)"], ["Rhino.Geometry.Intersect.IntersectionEvent", "bool IsOverlap"], - ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, System.Double tolerance, System.Double overlapTolerance)"] + ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 Select(IEnumerable objectIds)"] ] }, { @@ -1455,8 +1455,8 @@ "code": "from Rhino import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Commands import *\nfrom Rhino.Geometry import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n for annotation_object in doc.Objects.GetObjectList(ObjectType.Annotation):\n if not isinstance (annotation_object, AnnotationObjectBase):\n continue\n\n annotation = annotation_object.Geometry\n\n if annotation.Index == doc.DimStyles.CurrentDimensionStyleIndex:\n continue\n\n annotation.Index = doc.DimStyles.CurrentDimensionStyleIndex\n annotation_object.CommitChanges()\n\n doc.Views.Redraw()\n return Result.Success\n\nif __name__ == \"__main__\":\n RunCommand()", "members": [ ["Rhino.RhinoDoc", "DimStyleTable DimStyles"], - ["Rhino.DocObjects.Tables.DimStyleTable", "int CurrentIndex"], - ["Rhino.DocObjects.Tables.ObjectTable", "IEnumerable GetObjectList(System.Type typeFilter)"] + ["Rhino.DocObjects.Tables.ObjectTable", "IEnumerable GetObjectList(System.Type typeFilter)"], + ["Rhino.DocObjects.Tables.DimStyleTable", "int CurrentIndex"] ] }, { @@ -1483,12 +1483,12 @@ ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, System.Boolean reverse)"], ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds)"], ["Rhino.Geometry.Curve", "System.Boolean IsShort(System.Double tolerance)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3d point)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3f point)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Select(System.Guid objectId)"], ["Rhino.Input.RhinoGet", "Result GetNumber(System.String prompt, System.Boolean acceptNothing, ref System.Double outputNumber, System.Double lowerLimit, System.Double upperLimit)"], ["Rhino.Input.RhinoGet", "Result GetNumber(System.String prompt, System.Boolean acceptNothing, ref System.Double outputNumber)"], - ["Rhino.Input.RhinoGet", "Result GetOneObject(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef rhObject)"] + ["Rhino.Input.RhinoGet", "Result GetOneObject(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef rhObject)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3d point)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3f point)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Select(System.Guid objectId)"] ] }, { @@ -1606,14 +1606,14 @@ "name": "Hatchcurve.py", "code": "import Rhino\nimport scriptcontext\n\ndef HatchCurve():\n go = Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select closed planar curve\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve\n go.SubObjectSelect = False\n go.Get()\n if go.CommandResult()!=Rhino.Commands.Result.Success: return\n\n curve = go.Object(0).Curve()\n if (not curve or not curve.IsClosed or not curve.IsPlanar()): return\n\n hatch_name = scriptcontext.doc.HatchPatterns[scriptcontext.doc.HatchPatterns.CurrentHatchPatternIndex].Name\n rc, hatch_name = Rhino.Input.RhinoGet.GetString(\"Hatch pattern\", True, hatch_name)\n if rc!=Rhino.Commands.Result.Success or not hatch_name: return\n\n index = scriptcontext.doc.HatchPatterns.Find(hatch_name, True)\n if index<0:\n print \"Hatch pattern does not exist.\"\n return\n\n hatches = Rhino.Geometry.Hatch.Create(curve, index, 0, 1)\n for hatch in hatches:\n scriptcontext.doc.Objects.AddHatch(hatch)\n if hatches: scriptcontext.doc.Views.Redraw()\n\nif __name__==\"__main__\":\n HatchCurve()", "members": [ - ["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"], ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, System.Int32 hatchPatternIndex, System.Double rotationRadians, System.Double scale, System.Double tolerance)"], ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, System.Int32 hatchPatternIndex, System.Double rotationRadians, System.Double scale)"], ["Rhino.DocObjects.ModelComponent", "string Name"], + ["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"], ["Rhino.DocObjects.Tables.HatchPatternTable", "int CurrentHatchPatternIndex"], ["Rhino.DocObjects.Tables.HatchPatternTable", "System.Int32 Find(System.String name, System.Boolean ignoreDeleted)"], - ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(System.String name)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"] + ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(System.String name)"] ] }, { @@ -1622,8 +1622,8 @@ "members": [ ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Curve curve, System.Boolean allowPickingPointOffObject)"], ["Rhino.Input.Custom.GetPoint", "Curve PointOnCurve(out System.Double t)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Replace(ObjRef objref, Curve curve)"], - ["Rhino.Geometry.Collections.NurbsCurveKnotList", "System.Boolean InsertKnot(System.Double value)"] + ["Rhino.Geometry.Collections.NurbsCurveKnotList", "System.Boolean InsertKnot(System.Double value)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Replace(ObjRef objref, Curve curve)"] ] }, { @@ -1638,8 +1638,8 @@ "name": "Intersectcurves.py", "code": "import Rhino\nimport scriptcontext\n\ndef IntersectCurves():\n # Select two curves to intersect\n go = Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select two curves\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GetMultiple(2, 2)\n if go.CommandResult()!=Rhino.Commands.Result.Success: return\n\n # Validate input\n curveA = go.Object(0).Curve()\n curveB = go.Object(1).Curve()\n if not curveA or not curveB: return\n\n # Calculate the intersection\n intersection_tolerance = 0.001\n overlap_tolerance = 0.0\n events = Rhino.Geometry.Intersect.Intersection.CurveCurve(curveA, curveB, intersection_tolerance, overlap_tolerance)\n\n # Process the results\n if not events: return\n for ccx_event in events:\n scriptcontext.doc.Objects.AddPoint(ccx_event.PointA)\n if ccx_event.PointA.DistanceTo(ccx_event.PointB) > float.Epsilon:\n scriptcontext.doc.Objects.AddPoint(ccx_event.PointB)\n scriptcontext.doc.Objects.AddLine(ccx_event.PointA, ccx_event.PointB)\n scriptcontext.doc.Views.Redraw()\n\nif __name__==\"__main__\":\n IntersectCurves()", "members": [ - ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"], ["Rhino.Geometry.Point3f", "System.Double DistanceTo(Point3f other)"], + ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"], ["Rhino.DocObjects.ObjRef", "Curve Curve()"], ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, System.Double tolerance, System.Double overlapTolerance)"] ] @@ -1655,9 +1655,9 @@ "name": "Intersectlines.py", "code": "import Rhino\nimport scriptcontext\n\ndef IntersectLines():\n go = Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt( \"Select lines\" )\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GetMultiple( 2, 2)\n if go.CommandResult()!=Rhino.Commands.Result.Success:\n return go.CommandResult()\n if go.ObjectCount!=2: return Rhino.Commands.Result.Failure\n\n crv0 = go.Object(0).Geometry()\n crv1 = go.Object(1).Geometry()\n if not crv0 or not crv1: return Rhino.Commands.Result.Failure\n\n line0 = crv0.Line\n line1 = crv1.Line\n v0 = line0.Direction\n v0.Unitize()\n v1 = line1.Direction\n v1.Unitize()\n\n if v0.IsParallelTo(v1)!=0:\n print \"Selected lines are parallel.\"\n return Rhino.Commands.Result.Nothing\n\n rc, a, b = Rhino.Geometry.Intersect.Intersection.LineLine(line0, line1)\n if not rc:\n print \"No intersection found.\"\n return Rhino.Commands.Result.Nothing\n\n pt0 = line0.PointAt(a)\n pt1 = line1.PointAt(b)\n # pt0 and pt1 should be equal, so we will only add pt0 to the document\n scriptcontext.doc.Objects.AddPoint(pt0)\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n IntersectLines()", "members": [ - ["Rhino.Geometry.Vector3d", "System.Int32 IsParallelTo(Vector3d other)"], ["Rhino.Geometry.Line", "Vector3d Direction"], ["Rhino.Geometry.Line", "Point3d PointAt(System.Double t)"], + ["Rhino.Geometry.Vector3d", "System.Int32 IsParallelTo(Vector3d other)"], ["Rhino.Geometry.Intersect.Intersection", "System.Boolean LineLine(Line lineA, Line lineB, out System.Double a, out System.Double b)"] ] }, @@ -1720,10 +1720,10 @@ "name": "Meshdrawing.py", "code": "import rhinoscriptsyntax as rs\nfrom scriptcontext import doc\nimport Rhino\nimport System\nimport System.Drawing\n\ndef RunCommand():\n gs = Rhino.Input.Custom.GetObject()\n gs.SetCommandPrompt(\"select sphere\")\n gs.GeometryFilter = Rhino.DocObjects.ObjectType.Surface\n gs.DisablePreSelect()\n gs.SubObjectSelect = False\n gs.Get()\n if gs.CommandResult() != Rhino.Commands.Result.Success:\n return gs.CommandResult()\n\n b, sphere = gs.Object(0).Surface().TryGetSphere()\n if sphere.IsValid:\n mesh = Rhino.Geometry.Mesh.CreateFromSphere(sphere, 10, 10)\n if mesh == None:\n return Rhino.Commands.Result.Failure\n\n conduit = DrawBlueMeshConduit(mesh)\n conduit.Enabled = True\n doc.Views.Redraw()\n\n inStr = rs.GetString(\"press to continue\")\n\n conduit.Enabled = False\n doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n else:\n return Rhino.Commands.Result.Failure\n\nclass DrawBlueMeshConduit(Rhino.Display.DisplayConduit):\n def __init__(self, mesh):\n self.mesh = mesh\n self.color = System.Drawing.Color.Blue\n self.material = Rhino.Display.DisplayMaterial()\n self.material.Diffuse = self.color\n if mesh != None and mesh.IsValid:\n self.bbox = mesh.GetBoundingBox(True)\n\n def CalculateBoundingBox(self, calculateBoundingBoxEventArgs):\n #super.CalculateBoundingBox(calculateBoundingBoxEventArgs)\n calculateBoundingBoxEventArgs.IncludeBoundingBox(self.bbox)\n\n def PreDrawObjects(self, drawEventArgs):\n #base.PreDrawObjects(rawEventArgs)\n gvp = drawEventArgs.Display.Viewport\n if gvp.DisplayMode.EnglishName.ToLower() == \"wireframe\":\n drawEventArgs.Display.DrawMeshWires(self.mesh, self.color)\n else:\n drawEventArgs.Display.DrawMeshShaded(self.mesh, self.material)\n\nif __name__ == \"__main__\":\n RunCommand()", "members": [ - ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"], - ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"], ["Rhino.Display.DisplayConduit", "System.Void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)"], - ["Rhino.Display.DisplayConduit", "System.Void PreDrawObjects(DrawEventArgs e)"] + ["Rhino.Display.DisplayConduit", "System.Void PreDrawObjects(DrawEventArgs e)"], + ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"], + ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"] ] }, { @@ -1809,13 +1809,13 @@ ["Rhino.DocObjects.RhinoObject", "System.Int32 Select(System.Boolean on)"], ["Rhino.DocObjects.ObjRef", "RhinoObject Object()"], ["Rhino.DocObjects.ObjRef", "Surface Surface()"], + ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"], ["Rhino.Input.Custom.GetObject", "bool DeselectAllBeforePostSelect"], ["Rhino.Input.Custom.GetObject", "ObjectType GeometryFilter"], ["Rhino.Input.Custom.GetObject", "bool GroupSelect"], ["Rhino.Input.Custom.GetObject", "bool OneByOnePostSelect"], ["Rhino.Input.Custom.GetObject", "bool SubObjectSelect"], ["Rhino.Input.Custom.GetObject", "ObjRef Object(System.Int32 index)"], - ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"], ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, System.Boolean deleteOriginal)"] ] }, @@ -1991,21 +1991,21 @@ "name": "Addbackgroundbitmap.vb", "code": "Partial Class Examples\n Public Shared Function AddBackgroundBitmap(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Allow the user to select a bitmap file\n Dim fd As New Rhino.UI.OpenFileDialog()\n fd.Filter = \"Image Files (*.bmp;*.png;*.jpg)|*.bmp;*.png;*.jpg\"\n If fd.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then\n Return Rhino.Commands.Result.Cancel\n End If\n\n ' Verify the file that was selected\n Dim image As System.Drawing.Image\n Try\n image = System.Drawing.Image.FromFile(fd.FileName)\n Catch generatedExceptionName As Exception\n Return Rhino.Commands.Result.Failure\n End Try\n\n ' Allow the user to pick the bitmap origin\n Dim gp As New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Bitmap Origin\")\n gp.ConstrainToConstructionPlane(True)\n gp.Get()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n\n ' Get the view that the point was picked in.\n ' This will be the view that the bitmap appears in.\n Dim view As Rhino.Display.RhinoView = gp.View()\n If view Is Nothing Then\n view = doc.Views.ActiveView\n If view Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n End If\n\n ' Allow the user to specify the bitmap with in model units\n Dim gn As New Rhino.Input.Custom.GetNumber()\n gn.SetCommandPrompt(\"Bitmap width\")\n gn.SetLowerLimit(1.0, False)\n gn.Get()\n If gn.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gn.CommandResult()\n End If\n\n ' Cook up some scale factors\n Dim w As Double = gn.Number()\n Dim image_width As Double = CDbl(image.Width)\n Dim image_height As Double = CDbl(image.Height)\n Dim h As Double = w * (image_height / image_width)\n\n Dim plane As Rhino.Geometry.Plane = view.ActiveViewport.ConstructionPlane()\n plane.Origin = gp.Point()\n view.ActiveViewport.SetTraceImage(fd.FileName, plane, w, h, False, False)\n view.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n", "members": [ - ["Rhino.Display.RhinoView", "RhinoViewport ActiveViewport"], - ["Rhino.Display.RhinoView", "System.Void Redraw()"], ["Rhino.Display.RhinoViewport", "Plane ConstructionPlane()"], ["Rhino.Display.RhinoViewport", "System.Boolean SetTraceImage(System.String bitmapFileName, Plane plane, System.Double width, System.Double height, System.Boolean grayscale, System.Boolean filtered)"], + ["Rhino.Display.RhinoView", "RhinoViewport ActiveViewport"], + ["Rhino.Display.RhinoView", "System.Void Redraw()"], ["Rhino.UI.OpenFileDialog", "OpenFileDialog()"], ["Rhino.UI.OpenFileDialog", "string FileName"], ["Rhino.UI.OpenFileDialog", "string Filter"], ["Rhino.UI.OpenFileDialog", "System.Boolean ShowOpenDialog()"], ["Rhino.Input.Custom.GetPoint", "System.Boolean ConstrainToConstructionPlane(System.Boolean throughBasePoint)"], - ["Rhino.Input.Custom.GetNumber", "GetNumber()"], - ["Rhino.Input.Custom.GetNumber", "GetResult Get()"], - ["Rhino.Input.Custom.GetNumber", "System.Void SetLowerLimit(System.Double lowerLimit, System.Boolean strictlyGreaterThan)"], ["Rhino.Input.Custom.GetBaseClass", "Result CommandResult()"], ["Rhino.Input.Custom.GetBaseClass", "System.Double Number()"], ["Rhino.Input.Custom.GetBaseClass", "RhinoView View()"], + ["Rhino.Input.Custom.GetNumber", "GetNumber()"], + ["Rhino.Input.Custom.GetNumber", "GetResult Get()"], + ["Rhino.Input.Custom.GetNumber", "System.Void SetLowerLimit(System.Double lowerLimit, System.Boolean strictlyGreaterThan)"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoView ActiveView"] ] }, @@ -2030,8 +2030,8 @@ "name": "Addcircle.vb", "code": "Partial Class Examples\n Public Shared Function AddCircle(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim center As New Rhino.Geometry.Point3d(0, 0, 0)\n Const radius As Double = 10.0\n Dim c As New Rhino.Geometry.Circle(center, radius)\n If doc.Objects.AddCircle(c) <> Guid.Empty Then\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End If\n Return Rhino.Commands.Result.Failure\n End Function\nEnd Class\n", "members": [ - ["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"], ["Rhino.Geometry.Point3d", "Point3d(double x, double y, double z)"], + ["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"], ["Rhino.DocObjects.Tables.ViewTable", "System.Void Redraw()"], ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddCircle(Circle circle)"] ] @@ -2042,31 +2042,31 @@ "members": [ ["Rhino.Geometry.Plane", "Plane(Point3d origin, Point3d xPoint, Point3d yPoint)"], ["Rhino.FileIO.File3dmObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"], - ["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"] + ["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, System.Double uMagnitude, System.Double vMagnitude, System.Guid clippedViewportId)"] ] }, { "name": "Addcylinder.vb", "code": "Partial Class Examples\n Public Shared Function AddCylinder(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim center_point As New Rhino.Geometry.Point3d(0, 0, 0)\n Dim height_point As New Rhino.Geometry.Point3d(0, 0, 10)\n Dim zaxis As Rhino.Geometry.Vector3d = height_point - center_point\n Dim plane As New Rhino.Geometry.Plane(center_point, zaxis)\n Const radius As Double = 5\n Dim circle As New Rhino.Geometry.Circle(plane, radius)\n Dim cylinder As New Rhino.Geometry.Cylinder(circle, zaxis.Length)\n Dim brep As Rhino.Geometry.Brep = cylinder.ToBrep(True, True)\n If brep IsNot Nothing Then\n doc.Objects.AddBrep(brep)\n doc.Views.Redraw()\n End If\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n", "members": [ - ["Rhino.Geometry.Plane", "Plane(Point3d origin, Vector3d normal)"], ["Rhino.Geometry.Cylinder", "Cylinder(Circle baseCircle, double height)"], - ["Rhino.Geometry.Cylinder", "Brep ToBrep(System.Boolean capBottom, System.Boolean capTop)"] + ["Rhino.Geometry.Cylinder", "Brep ToBrep(System.Boolean capBottom, System.Boolean capTop)"], + ["Rhino.Geometry.Plane", "Plane(Point3d origin, Vector3d normal)"] ] }, { "name": "Addlayer.vb", "code": "Partial Class Examples\n Public Shared Function AddLayer(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Cook up an unused layer name\n Dim unused_name As String = doc.Layers.GetUnusedLayerName(False)\n\n ' Prompt the user to enter a layer name\n Dim gs As New Rhino.Input.Custom.GetString()\n gs.SetCommandPrompt(\"Name of layer to add\")\n gs.SetDefaultString(unused_name)\n gs.AcceptNothing(True)\n gs.Get()\n If gs.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gs.CommandResult()\n End If\n\n ' Was a layer named entered?\n Dim layer_name As String = gs.StringResult().Trim()\n If String.IsNullOrEmpty(layer_name) Then\n Rhino.RhinoApp.WriteLine(\"Layer name cannot be blank.\")\n Return Rhino.Commands.Result.Cancel\n End If\n\n ' Is the layer name valid?\n If Not Rhino.DocObjects.Layer.IsValidName(layer_name) Then\n Rhino.RhinoApp.WriteLine(layer_name & \" is not a valid layer name.\")\n Return Rhino.Commands.Result.Cancel\n End If\n\n ' Does a layer with the same name already exist?\n Dim layer_index As Integer = doc.Layers.Find(layer_name, True)\n If layer_index >= 0 Then\n Rhino.RhinoApp.WriteLine(\"A layer with the name {0} already exists.\", layer_name)\n Return Rhino.Commands.Result.Cancel\n End If\n\n ' Add a new layer to the document\n layer_index = doc.Layers.Add(layer_name, System.Drawing.Color.Black)\n If layer_index < 0 Then\n Rhino.RhinoApp.WriteLine(\"Unable to add {0} layer.\", layer_name)\n Return Rhino.Commands.Result.Failure\n End If\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n", "members": [ + ["Rhino.DocObjects.Layer", "System.Boolean IsValidName(System.String name)"], ["Rhino.RhinoApp", "System.Void WriteLine(System.String format, System.Object arg0)"], ["Rhino.RhinoApp", "System.Void WriteLine(System.String message)"], - ["Rhino.DocObjects.Layer", "System.Boolean IsValidName(System.String name)"], - ["Rhino.Input.Custom.GetString", "GetString()"], - ["Rhino.Input.Custom.GetString", "GetResult Get()"], ["Rhino.Input.Custom.GetBaseClass", "System.Void AcceptNothing(System.Boolean enable)"], ["Rhino.Input.Custom.GetBaseClass", "System.Void SetDefaultString(System.String defaultValue)"], ["Rhino.Input.Custom.GetBaseClass", "System.String StringResult()"], + ["Rhino.Input.Custom.GetString", "GetString()"], + ["Rhino.Input.Custom.GetString", "GetResult Get()"], ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Add(System.String layerName, System.Drawing.Color layerColor)"], ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Find(System.String layerName, System.Boolean ignoreDeletedLayers)"], ["Rhino.DocObjects.Tables.LayerTable", "Layer FindName(System.String layerName)"], @@ -2078,14 +2078,14 @@ "name": "Addlayout.vb", "code": "Partial Class Examples\n ''' \n ''' Generate a layout with a single detail view that zooms to a list of objects\n ''' \n ''' \n ''' \n Public Shared Function AddLayout(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n doc.PageUnitSystem = Rhino.UnitSystem.Millimeters\n Dim page_views = doc.Views.GetPageViews()\n Dim page_number As Integer = If((page_views Is Nothing), 1, page_views.Length + 1)\n Dim pageview = doc.Views.AddPageView(String.Format(\"A0_{0}\", page_number), 1189, 841)\n If pageview IsNot Nothing Then\n Dim top_left As New Rhino.Geometry.Point2d(20, 821)\n Dim bottom_right As New Rhino.Geometry.Point2d(1169, 20)\n Dim detail = pageview.AddDetailView(\"ModelView\", top_left, bottom_right, Rhino.Display.DefinedViewportProjection.Top)\n If detail IsNot Nothing Then\n pageview.SetActiveDetail(detail.Id)\n detail.Viewport.ZoomExtents()\n detail.DetailGeometry.IsProjectionLocked = True\n detail.DetailGeometry.SetScale(1, doc.ModelUnitSystem, 10, doc.PageUnitSystem)\n ' Commit changes tells the document to replace the document's detail object\n ' with the modified one that we just adjusted\n detail.CommitChanges()\n End If\n pageview.SetPageAsActive()\n doc.Views.ActiveView = pageview\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End If\n Return Rhino.Commands.Result.Failure\n End Function\nEnd Class\n", "members": [ - ["Rhino.RhinoDoc", "UnitSystem PageUnitSystem"], + ["Rhino.Geometry.DetailView", "bool IsProjectionLocked"], + ["Rhino.Geometry.DetailView", "System.Boolean SetScale(System.Double modelLength, Rhino.UnitSystem modelUnits, System.Double pageLength, Rhino.UnitSystem pageUnits)"], + ["Rhino.DocObjects.RhinoObject", "System.Boolean CommitChanges()"], ["Rhino.Display.RhinoPageView", "DetailViewObject AddDetailView(System.String title, Geometry.Point2d corner0, Geometry.Point2d corner1, DefinedViewportProjection initialProjection)"], ["Rhino.Display.RhinoPageView", "System.Boolean SetActiveDetail(System.Guid detailId)"], ["Rhino.Display.RhinoPageView", "System.Void SetPageAsActive()"], ["Rhino.Display.RhinoViewport", "System.Boolean ZoomExtents()"], - ["Rhino.Geometry.DetailView", "bool IsProjectionLocked"], - ["Rhino.Geometry.DetailView", "System.Boolean SetScale(System.Double modelLength, Rhino.UnitSystem modelUnits, System.Double pageLength, Rhino.UnitSystem pageUnits)"], - ["Rhino.DocObjects.RhinoObject", "System.Boolean CommitChanges()"], + ["Rhino.RhinoDoc", "UnitSystem PageUnitSystem"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView AddPageView(System.String title, System.Double pageWidth, System.Double pageHeight)"], ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView[] GetPageViews()"] ] @@ -2109,8 +2109,8 @@ "name": "Addlineardimension.vb", "code": "Partial Class Examples\n Public Shared Function AddLinearDimension(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim dimension As Rhino.Geometry.LinearDimension = Nothing\n Dim rc As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetLinearDimension(dimension)\n If rc = Rhino.Commands.Result.Success AndAlso dimension IsNot Nothing Then\n If doc.Objects.AddLinearDimension(dimension) = Guid.Empty Then\n rc = Rhino.Commands.Result.Failure\n Else\n doc.Views.Redraw()\n End If\n End If\n Return rc\n End Function\nEnd Class\n", "members": [ - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLinearDimension(LinearDimension dimension)"], - ["Rhino.Input.RhinoGet", "Result GetLinearDimension(out LinearDimension dimension)"] + ["Rhino.Input.RhinoGet", "Result GetLinearDimension(out LinearDimension dimension)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLinearDimension(LinearDimension dimension)"] ] }, { @@ -2130,28 +2130,28 @@ ["Rhino.Geometry.Mesh", "MeshVertexNormalList Normals"], ["Rhino.Geometry.Mesh", "MeshVertexList Vertices"], ["Rhino.Geometry.Mesh", "System.Boolean Compact()"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddMesh(Geometry.Mesh mesh)"], ["Rhino.Geometry.Collections.MeshVertexList", "System.Int32 Add(System.Double x, System.Double y, System.Double z)"], ["Rhino.Geometry.Collections.MeshVertexList", "System.Int32 Add(System.Single x, System.Single y, System.Single z)"], ["Rhino.Geometry.Collections.MeshVertexNormalList", "System.Boolean ComputeNormals()"], - ["Rhino.Geometry.Collections.MeshFaceList", "System.Int32 AddFace(System.Int32 vertex1, System.Int32 vertex2, System.Int32 vertex3, System.Int32 vertex4)"] + ["Rhino.Geometry.Collections.MeshFaceList", "System.Int32 AddFace(System.Int32 vertex1, System.Int32 vertex2, System.Int32 vertex3, System.Int32 vertex4)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddMesh(Geometry.Mesh mesh)"] ] }, { "name": "Addnamedview.vb", "code": "Partial Class Examples\n Public Shared Function AddNamedView(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim view As Rhino.Display.RhinoView = Nothing\n Dim rc As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetView(\"Select view to adjust\", view)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim location As Rhino.Geometry.Point3d\n rc = Rhino.Input.RhinoGet.GetPoint(\"Camera Location\", False, location)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim gp As New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Look At Location\")\n gp.DrawLineFromPoint(location, False)\n gp.Get()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n Dim lookat As Rhino.Geometry.Point3d = gp.Point()\n\n Dim name As String = view.ActiveViewport.Name\n rc = Rhino.Input.RhinoGet.GetString(\"Name\", True, name)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim vp As Rhino.Display.RhinoViewport = view.ActiveViewport\n ' save the current viewport projection\n vp.PushViewProjection()\n vp.CameraUp = Rhino.Geometry.Vector3d.ZAxis\n vp.SetCameraLocation(location, False)\n vp.SetCameraDirection(lookat - location, True)\n vp.Name = name\n\n doc.NamedViews.Add(name, vp.Id)\n view.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n", "members": [ - ["Rhino.RhinoDoc", "NamedViewTable NamedViews"], ["Rhino.Display.RhinoViewport", "Vector3d CameraUp"], ["Rhino.Display.RhinoViewport", "string Name"], ["Rhino.Display.RhinoViewport", "System.Boolean PopViewProjection()"], ["Rhino.Display.RhinoViewport", "System.Void PushViewProjection()"], ["Rhino.Display.RhinoViewport", "System.Void SetCameraDirection(Vector3d cameraDirection, System.Boolean updateTargetLocation)"], ["Rhino.Display.RhinoViewport", "System.Void SetCameraLocation(Point3d cameraLocation, System.Boolean updateTargetLocation)"], - ["Rhino.DocObjects.Tables.NamedViewTable", "System.Int32 Add(System.String name, System.Guid viewportId)"], + ["Rhino.RhinoDoc", "NamedViewTable NamedViews"], ["Rhino.Input.RhinoGet", "Result GetPoint(System.String prompt, System.Boolean acceptNothing, out Point3d point)"], ["Rhino.Input.RhinoGet", "Result GetString(System.String prompt, System.Boolean acceptNothing, ref System.String outputString)"], - ["Rhino.Input.RhinoGet", "Result GetView(System.String commandPrompt, out RhinoView view)"] + ["Rhino.Input.RhinoGet", "Result GetView(System.String commandPrompt, out RhinoView view)"], + ["Rhino.DocObjects.Tables.NamedViewTable", "System.Int32 Add(System.String name, System.Guid viewportId)"] ] }, { @@ -2223,10 +2223,10 @@ "name": "Addtruncatedcone.vb", "code": "Imports Rhino.Geometry\n\nPartial Class Examples\n Public Shared Function AddTruncatedCone(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim bottom_pt As New Point3d(0, 0, 0)\n Const bottom_radius As Double = 2\n Dim bottom_circle As New Circle(bottom_pt, bottom_radius)\n\n Dim top_pt As New Point3d(0, 0, 10)\n Const top_radius As Double = 6\n Dim top_circle As New Circle(top_pt, top_radius)\n\n Dim shapeCurve As New LineCurve(bottom_circle.PointAt(0), top_circle.PointAt(0))\n Dim axis As New Line(bottom_circle.Center, top_circle.Center)\n Dim revsrf As RevSurface = RevSurface.Create(shapeCurve, axis)\n Dim tcone_brep As Brep = Brep.CreateFromRevSurface(revsrf, True, True)\n If doc.Objects.AddBrep(tcone_brep) <> Guid.Empty Then\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End If\n Return Rhino.Commands.Result.Failure\n End Function\nEnd Class\n", "members": [ - ["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"], - ["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"], ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, System.Boolean capStart, System.Boolean capEnd)"], - ["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"] + ["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"], + ["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"], + ["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"] ] }, { @@ -2413,9 +2413,9 @@ "name": "Curvesurfaceintersect.vb", "code": "Imports Rhino\nImports Rhino.Geometry\nImports Rhino.Geometry.Intersect\nImports Rhino.Input.Custom\nImports Rhino.DocObjects\nImports Rhino.Commands\n\nNamespace examples_vb\n Public Class CurveSurfaceIntersectCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbCurveSurfaceIntersect\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim gs = New GetObject()\n gs.SetCommandPrompt(\"select brep\")\n gs.GeometryFilter = ObjectType.Brep\n gs.DisablePreSelect()\n gs.SubObjectSelect = False\n gs.Get()\n If gs.CommandResult() <> Result.Success Then\n Return gs.CommandResult()\n End If\n Dim brep = gs.[Object](0).Brep()\n\n Dim gc = New GetObject()\n gc.SetCommandPrompt(\"select curve\")\n gc.GeometryFilter = ObjectType.Curve\n gc.DisablePreSelect()\n gc.SubObjectSelect = False\n gc.Get()\n If gc.CommandResult() <> Result.Success Then\n Return gc.CommandResult()\n End If\n Dim curve = gc.Object(0).Curve()\n\n If brep Is Nothing OrElse curve Is Nothing Then\n Return Result.Failure\n End If\n\n Dim tolerance = doc.ModelAbsoluteTolerance\n\n Dim intersectionPoints As Point3d() = Nothing\n Dim overlapCurves As Curve() = Nothing\n If Not Intersection.CurveBrep(curve, brep, tolerance, overlapCurves, intersectionPoints) Then\n RhinoApp.WriteLine(\"curve brep intersection failed\")\n Return Result.Nothing\n End If\n\n For Each overlapCurve As Curve In overlapCurves\n doc.Objects.AddCurve(overlapCurve)\n Next\n For Each intersectionPoint As Point3d In intersectionPoints\n doc.Objects.AddPoint(intersectionPoint)\n Next\n\n RhinoApp.WriteLine(\"{0} overlap curves, and {1} intersection points\", overlapCurves.Length, intersectionPoints.Length)\n doc.Views.Redraw()\n\n Return Result.Success\n End Function\n End Class\nEnd Namespace", "members": [ - ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 Select(IEnumerable objectIds)"], + ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, System.Double tolerance, System.Double overlapTolerance)"], ["Rhino.Geometry.Intersect.IntersectionEvent", "bool IsOverlap"], - ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, System.Double tolerance, System.Double overlapTolerance)"] + ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 Select(IEnumerable objectIds)"] ] }, { @@ -2438,8 +2438,8 @@ "code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.Commands\nImports Rhino.Geometry\n\nNamespace examples_vb\n Public Class ChangeDimensionStyleCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbChangeDimensionStyle\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n For Each rhino_object As RhinoObject In doc.Objects.GetObjectList(ObjectType.Annotation)\n Dim annotation_object = TryCast(rhino_object, AnnotationObjectBase)\n If annotation_object Is Nothing Then\n Continue For\n End If\n\n Dim annotation = TryCast(annotation_object.Geometry, AnnotationBase)\n If annotation Is Nothing Then\n Continue For\n End If\n\n If annotation.Index = doc.DimStyles.CurrentDimensionStyleIndex Then\n Continue For\n End If\n\n annotation.Index = doc.DimStyles.CurrentDimensionStyleIndex\n annotation_object.CommitChanges()\n Next\n\n doc.Views.Redraw()\n\n Return Result.Success\n End Function\n End Class\nEnd Namespace", "members": [ ["Rhino.RhinoDoc", "DimStyleTable DimStyles"], - ["Rhino.DocObjects.Tables.DimStyleTable", "int CurrentIndex"], - ["Rhino.DocObjects.Tables.ObjectTable", "IEnumerable GetObjectList(System.Type typeFilter)"] + ["Rhino.DocObjects.Tables.ObjectTable", "IEnumerable GetObjectList(System.Type typeFilter)"], + ["Rhino.DocObjects.Tables.DimStyleTable", "int CurrentIndex"] ] }, { @@ -2466,12 +2466,12 @@ ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, System.Boolean reverse)"], ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds)"], ["Rhino.Geometry.Curve", "System.Boolean IsShort(System.Double tolerance)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3d point)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3f point)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Select(System.Guid objectId)"], ["Rhino.Input.RhinoGet", "Result GetNumber(System.String prompt, System.Boolean acceptNothing, ref System.Double outputNumber, System.Double lowerLimit, System.Double upperLimit)"], ["Rhino.Input.RhinoGet", "Result GetNumber(System.String prompt, System.Boolean acceptNothing, ref System.Double outputNumber)"], - ["Rhino.Input.RhinoGet", "Result GetOneObject(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef rhObject)"] + ["Rhino.Input.RhinoGet", "Result GetOneObject(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef rhObject)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3d point)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPoint(Point3f point)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Select(System.Guid objectId)"] ] }, { @@ -2589,14 +2589,14 @@ "name": "Hatchcurve.vb", "code": "Partial Class Examples\n Public Shared Function HatchCurve(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim go = New Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select closed planar curve\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GeometryAttributeFilter = Rhino.Input.[Custom].GeometryAttributeFilter.ClosedCurve\n go.SubObjectSelect = False\n go.Get()\n If go.CommandResult() <> Rhino.Commands.Result.Success Then\n Return go.CommandResult()\n End If\n\n Dim curve = go.Object(0).Curve()\n If curve Is Nothing OrElse Not curve.IsClosed OrElse Not curve.IsPlanar() Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim hatch_name As String = doc.HatchPatterns(doc.HatchPatterns.CurrentHatchPatternIndex).Name\n Dim rc = Rhino.Input.RhinoGet.GetString(\"Hatch pattern\", True, hatch_name)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n hatch_name = hatch_name.Trim()\n If String.IsNullOrWhiteSpace(hatch_name) Then\n Return Rhino.Commands.Result.Nothing\n End If\n Dim index As Integer = doc.HatchPatterns.Find(hatch_name, True)\n If index < 0 Then\n Rhino.RhinoApp.WriteLine(\"Hatch pattern does not exist.\")\n Return Rhino.Commands.Result.Nothing\n End If\n\n Dim hatches = Rhino.Geometry.Hatch.Create(curve, index, 0, 1)\n For i As Integer = 0 To hatches.Length - 1\n doc.Objects.AddHatch(hatches(i))\n Next\n If hatches.Length > 0 Then\n doc.Views.Redraw()\n End If\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n", "members": [ - ["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"], ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, System.Int32 hatchPatternIndex, System.Double rotationRadians, System.Double scale, System.Double tolerance)"], ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, System.Int32 hatchPatternIndex, System.Double rotationRadians, System.Double scale)"], ["Rhino.DocObjects.ModelComponent", "string Name"], + ["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"], ["Rhino.DocObjects.Tables.HatchPatternTable", "int CurrentHatchPatternIndex"], ["Rhino.DocObjects.Tables.HatchPatternTable", "System.Int32 Find(System.String name, System.Boolean ignoreDeleted)"], - ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(System.String name)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"] + ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(System.String name)"] ] }, { @@ -2605,8 +2605,8 @@ "members": [ ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Curve curve, System.Boolean allowPickingPointOffObject)"], ["Rhino.Input.Custom.GetPoint", "Curve PointOnCurve(out System.Double t)"], - ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Replace(ObjRef objref, Curve curve)"], - ["Rhino.Geometry.Collections.NurbsCurveKnotList", "System.Boolean InsertKnot(System.Double value)"] + ["Rhino.Geometry.Collections.NurbsCurveKnotList", "System.Boolean InsertKnot(System.Double value)"], + ["Rhino.DocObjects.Tables.ObjectTable", "System.Boolean Replace(ObjRef objref, Curve curve)"] ] }, { @@ -2621,8 +2621,8 @@ "name": "Intersectcurves.vb", "code": "Partial Class Examples\n Public Shared Function IntersectCurves(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Select two curves to intersect\n Dim go = New Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select two curves\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GetMultiple(2, 2)\n If go.CommandResult() <> Rhino.Commands.Result.Success Then\n Return go.CommandResult()\n End If\n\n ' Validate input\n Dim curveA = go.[Object](0).Curve()\n Dim curveB = go.[Object](1).Curve()\n If curveA Is Nothing OrElse curveB Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n ' Calculate the intersection\n Const intersection_tolerance As Double = 0.001\n Const overlap_tolerance As Double = 0.0\n Dim events = Rhino.Geometry.Intersect.Intersection.CurveCurve(curveA, curveB, intersection_tolerance, overlap_tolerance)\n\n ' Process the results\n If events IsNot Nothing Then\n For i As Integer = 0 To events.Count - 1\n Dim ccx_event = events(i)\n doc.Objects.AddPoint(ccx_event.PointA)\n If ccx_event.PointA.DistanceTo(ccx_event.PointB) > Double.Epsilon Then\n doc.Objects.AddPoint(ccx_event.PointB)\n doc.Objects.AddLine(ccx_event.PointA, ccx_event.PointB)\n End If\n Next\n doc.Views.Redraw()\n End If\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n", "members": [ - ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"], ["Rhino.Geometry.Point3f", "System.Double DistanceTo(Point3f other)"], + ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"], ["Rhino.DocObjects.ObjRef", "Curve Curve()"], ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, System.Double tolerance, System.Double overlapTolerance)"] ] @@ -2638,9 +2638,9 @@ "name": "Intersectlines.vb", "code": "Imports Rhino.Geometry\n\nPartial Class Examples\n Public Shared Function IntersectLines(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim go As New Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select lines\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GetMultiple(2, 2)\n If go.CommandResult() <> Rhino.Commands.Result.Success Then\n Return go.CommandResult()\n End If\n If go.ObjectCount <> 2 Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim crv0 As LineCurve = TryCast(go.Object(0).Geometry(), LineCurve)\n Dim crv1 As LineCurve = TryCast(go.Object(1).Geometry(), LineCurve)\n If crv0 Is Nothing OrElse crv1 Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim line0 As Line = crv0.Line\n Dim line1 As Line = crv1.Line\n Dim v0 As Vector3d = line0.Direction\n v0.Unitize()\n Dim v1 As Vector3d = line1.Direction\n v1.Unitize()\n\n If v0.IsParallelTo(v1) <> 0 Then\n Rhino.RhinoApp.WriteLine(\"Selected lines are parallel.\")\n Return Rhino.Commands.Result.[Nothing]\n End If\n\n Dim a As Double, b As Double\n If Not Rhino.Geometry.Intersect.Intersection.LineLine(line0, line1, a, b) Then\n Rhino.RhinoApp.WriteLine(\"No intersection found.\")\n Return Rhino.Commands.Result.[Nothing]\n End If\n\n Dim pt0 As Point3d = line0.PointAt(a)\n Dim pt1 As Point3d = line1.PointAt(b)\n ' pt0 and pt1 should be equal, so we will only add pt0 to the document\n doc.Objects.AddPoint(pt0)\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n", "members": [ - ["Rhino.Geometry.Vector3d", "System.Int32 IsParallelTo(Vector3d other)"], ["Rhino.Geometry.Line", "Vector3d Direction"], ["Rhino.Geometry.Line", "Point3d PointAt(System.Double t)"], + ["Rhino.Geometry.Vector3d", "System.Int32 IsParallelTo(Vector3d other)"], ["Rhino.Geometry.Intersect.Intersection", "System.Boolean LineLine(Line lineA, Line lineB, out System.Double a, out System.Double b)"] ] }, @@ -2703,10 +2703,10 @@ "name": "Meshdrawing.vb", "code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Display\nImports Rhino.Geometry\nImports Rhino.Input.Custom\nImports Rhino.DocObjects\nImports System.Drawing\n\nNamespace examples_vb\n Public Class MeshDrawingCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbDrawMesh\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim gs = New GetObject()\n gs.SetCommandPrompt(\"select sphere\")\n gs.GeometryFilter = ObjectType.Surface\n gs.DisablePreSelect()\n gs.SubObjectSelect = False\n gs.[Get]()\n If gs.CommandResult() <> Result.Success Then\n Return gs.CommandResult()\n End If\n\n Dim sphere As Sphere\n gs.[Object](0).Surface().TryGetSphere(sphere)\n If sphere.IsValid Then\n Dim mesh__1 = Mesh.CreateFromSphere(sphere, 10, 10)\n If mesh__1 Is Nothing Then\n Return Result.Failure\n End If\n Dim conduit = New DrawBlueMeshConduit(mesh__1)\n conduit.Enabled = True\n\n doc.Views.Redraw()\n\n Dim inStr As String = \"\"\n Rhino.Input.RhinoGet.GetString(\"press to continue\", True, inStr)\n\n conduit.Enabled = False\n doc.Views.Redraw()\n Return Result.Success\n Else\n Return Result.Failure\n End If\n End Function\n End Class\n\n Class DrawBlueMeshConduit\n Inherits DisplayConduit\n Private _mesh As Mesh = Nothing\n Private _color As Color\n Private _material As DisplayMaterial = Nothing\n Private _bbox As BoundingBox\n\n Public Sub New(mesh As Mesh)\n ' set up as much data as possible so we do the minimum amount of work possible inside\n ' the actual display code\n _mesh = mesh\n _color = System.Drawing.Color.Blue\n _material = New DisplayMaterial()\n _material.Diffuse = _color\n If _mesh IsNot Nothing AndAlso _mesh.IsValid Then\n _bbox = _mesh.GetBoundingBox(True)\n End If\n End Sub\n\n ' this is called every frame inside the drawing code so try to do as little as possible\n ' in order to not degrade display speed. Don't create new objects if you don't have to as this\n ' will incur an overhead on the heap and garbage collection.\n Protected Overrides Sub CalculateBoundingBox(e As CalculateBoundingBoxEventArgs)\n MyBase.CalculateBoundingBox(e)\n ' Since we are dynamically drawing geometry, we needed to override\n ' CalculateBoundingBox. Otherwise, there is a good chance that our\n ' dynamically drawing geometry would get clipped.\n\n ' Union the mesh's bbox with the scene's bounding box\n e.IncludeBoundingBox(_bbox)\n End Sub\n\n Protected Overrides Sub PreDrawObjects(e As DrawEventArgs)\n MyBase.PreDrawObjects(e)\n Dim vp = e.Display.Viewport\n If vp.DisplayMode.EnglishName.ToLower() = \"wireframe\" Then\n e.Display.DrawMeshWires(_mesh, _color)\n Else\n e.Display.DrawMeshShaded(_mesh, _material)\n End If\n End Sub\n End Class\nEnd Namespace", "members": [ - ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"], - ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"], ["Rhino.Display.DisplayConduit", "System.Void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)"], - ["Rhino.Display.DisplayConduit", "System.Void PreDrawObjects(DrawEventArgs e)"] + ["Rhino.Display.DisplayConduit", "System.Void PreDrawObjects(DrawEventArgs e)"], + ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"], + ["Rhino.Display.DisplayPipeline", "System.Void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"] ] }, { @@ -2792,13 +2792,13 @@ ["Rhino.DocObjects.RhinoObject", "System.Int32 Select(System.Boolean on)"], ["Rhino.DocObjects.ObjRef", "RhinoObject Object()"], ["Rhino.DocObjects.ObjRef", "Surface Surface()"], + ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"], ["Rhino.Input.Custom.GetObject", "bool DeselectAllBeforePostSelect"], ["Rhino.Input.Custom.GetObject", "ObjectType GeometryFilter"], ["Rhino.Input.Custom.GetObject", "bool GroupSelect"], ["Rhino.Input.Custom.GetObject", "bool OneByOnePostSelect"], ["Rhino.Input.Custom.GetObject", "bool SubObjectSelect"], ["Rhino.Input.Custom.GetObject", "ObjRef Object(System.Int32 index)"], - ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"], ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, System.Boolean deleteOriginal)"] ] }, @@ -2820,8 +2820,8 @@ "name": "Pointatcursor.vb", "code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.DocObjects\n\nNamespace examples_vb\n Public Class PointAtCursorCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbPointAtCursor\"\n End Get\n End Property\n\n _\n Public Shared Function GetCursorPos(ByRef point As System.Drawing.Point) As Boolean\n End Function\n\n _\n Public Shared Function ScreenToClient(hWnd As IntPtr, ByRef point As System.Drawing.Point) As Boolean\n End Function\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim result__1 = Result.Failure\n Dim view = doc.Views.ActiveView\n If view Is Nothing Then\n Return result__1\n End If\n\n Dim windowsDrawingPoint As System.Drawing.Point\n If Not GetCursorPos(windowsDrawingPoint) OrElse Not ScreenToClient(view.Handle, windowsDrawingPoint) Then\n Return result__1\n End If\n\n Dim xform = view.ActiveViewport.GetTransform(CoordinateSystem.Screen, CoordinateSystem.World)\n Dim point = New Rhino.Geometry.Point3d(windowsDrawingPoint.X, windowsDrawingPoint.Y, 0.0)\n RhinoApp.WriteLine([String].Format(\"screen point: ({0}, {1}, {2})\", point.X, point.Y, point.Z))\n point.Transform(xform)\n RhinoApp.WriteLine([String].Format(\"world point: ({0}, {1}, {2})\", point.X, point.Y, point.Z))\n result__1 = Result.Success\n Return result__1\n End Function\n End Class\nEnd Namespace", "members": [ - ["Rhino.Display.RhinoViewport", "Transform GetTransform(DocObjects.CoordinateSystem sourceSystem, DocObjects.CoordinateSystem destinationSystem)"], - ["Rhino.Geometry.Point3d", "System.Void Transform(Transform xform)"] + ["Rhino.Geometry.Point3d", "System.Void Transform(Transform xform)"], + ["Rhino.Display.RhinoViewport", "Transform GetTransform(DocObjects.CoordinateSystem sourceSystem, DocObjects.CoordinateSystem destinationSystem)"] ] }, { diff --git a/quasar_site/src/api_info.json b/quasar_site/src/api_info.json index ff22ea08..fbd91ee5 100644 --- a/quasar_site/src/api_info.json +++ b/quasar_site/src/api_info.json @@ -6256,6 +6256,13 @@ "virtual": false, "summary": "Alt + Ctrl + Page Down" }, + { + "signature": "None", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "No shortcut key" + }, { "signature": "AltHome", "modifiers": [], @@ -6521,6 +6528,1070 @@ "protected": false, "virtual": false, "summary": "Alt + 9" + }, + { + "signature": "MacControlHome", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Home (Mac)" + }, + { + "signature": "MacControlEnd", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + End (Mac)" + }, + { + "signature": "MacControlA", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + A (Mac)" + }, + { + "signature": "MacControlB", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + B (Mac)" + }, + { + "signature": "MacControlC", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + C (Mac)" + }, + { + "signature": "MacControlD", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + D (Mac)" + }, + { + "signature": "MacControlE", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + E (Mac)" + }, + { + "signature": "MacControlF", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + F (Mac)" + }, + { + "signature": "MacControlG", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + G (Mac)" + }, + { + "signature": "MacControlH", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + H (Mac)" + }, + { + "signature": "MacControlI", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + I (Mac)" + }, + { + "signature": "MacControlJ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + J (Mac)" + }, + { + "signature": "MacControlK", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + K (Mac)" + }, + { + "signature": "MacControlL", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + L (Mac)" + }, + { + "signature": "MacControlM", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + M (Mac)" + }, + { + "signature": "MacControlN", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + N (Mac)" + }, + { + "signature": "MacControlO", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + O (Mac)" + }, + { + "signature": "MacControlP", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + P (Mac)" + }, + { + "signature": "MacControlQ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Q (Mac)" + }, + { + "signature": "MacControlR", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + R (Mac)" + }, + { + "signature": "MacControlS", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + S (Mac)" + }, + { + "signature": "MacControlT", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + T (Mac)" + }, + { + "signature": "MacControlU", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + U (Mac)" + }, + { + "signature": "MacControlV", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + V (Mac)" + }, + { + "signature": "MacControlW", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + W (Mac)" + }, + { + "signature": "MacControlX", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + X (Mac)" + }, + { + "signature": "MacControlY", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Y (Mac)" + }, + { + "signature": "MacControlZ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Z (Mac)" + }, + { + "signature": "MacControl0", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 0 (Mac)" + }, + { + "signature": "MacControl1", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 1 (Mac)" + }, + { + "signature": "MacControl2", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 2 (Mac)" + }, + { + "signature": "MacControl3", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 3 (Mac)" + }, + { + "signature": "MacControl4", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 4 (Mac)" + }, + { + "signature": "MacControl5", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 5 (Mac)" + }, + { + "signature": "MacControl6", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 6 (Mac)" + }, + { + "signature": "MacControl7", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 7 (Mac)" + }, + { + "signature": "MacControl8", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 8 (Mac)" + }, + { + "signature": "MacControl9", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + 9 (Mac)" + }, + { + "signature": "MacControlAltHome", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + Home (Mac)" + }, + { + "signature": "MacControlAltEnd", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + End (Mac)" + }, + { + "signature": "MacControlAltA", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + A (Mac)" + }, + { + "signature": "MacControlAltB", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + B (Mac)" + }, + { + "signature": "MacControlAltC", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + C (Mac)" + }, + { + "signature": "MacControlAltD", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + D (Mac)" + }, + { + "signature": "MacControlAltE", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + E (Mac)" + }, + { + "signature": "MacControlAltF", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + F (Mac)" + }, + { + "signature": "MacControlAltG", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + G (Mac)" + }, + { + "signature": "MacControlAltH", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + H (Mac)" + }, + { + "signature": "MacControlAltI", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + I (Mac)" + }, + { + "signature": "MacControlAltJ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + J (Mac)" + }, + { + "signature": "MacControlAltK", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + K (Mac)" + }, + { + "signature": "MacControlAltL", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + L (Mac)" + }, + { + "signature": "MacControlAltM", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + M (Mac)" + }, + { + "signature": "MacControlAltN", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + N (Mac)" + }, + { + "signature": "MacControlAltO", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + O (Mac)" + }, + { + "signature": "MacControlAltP", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + P (Mac)" + }, + { + "signature": "MacControlAltQ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + Q (Mac)" + }, + { + "signature": "MacControlAltR", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + R (Mac)" + }, + { + "signature": "MacControlAltS", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + S (Mac)" + }, + { + "signature": "MacControlAltT", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + T (Mac)" + }, + { + "signature": "MacControlAltU", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + U (Mac)" + }, + { + "signature": "MacControlAltV", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + Alt + V (Mac)" + }, + { + "signature": "MacControlAltW", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + W (Mac)" + }, + { + "signature": "MacControlAltX", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + X (Mac)" + }, + { + "signature": "MacControlAltY", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + Y (Mac)" + }, + { + "signature": "MacControlAltZ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + Z (Mac)" + }, + { + "signature": "MacControlAlt0", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 0 (Mac)" + }, + { + "signature": "MacControlAlt1", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 1 (Mac)" + }, + { + "signature": "MacControlAlt2", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 2 (Mac)" + }, + { + "signature": "MacControlAlt3", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 3 (Mac)" + }, + { + "signature": "MacControlAlt4", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 4 (Mac)" + }, + { + "signature": "MacControlAlt5", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 5 (Mac)" + }, + { + "signature": "MacControlAlt6", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 6 (Mac)" + }, + { + "signature": "MacControlAlt7", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 7 (Mac)" + }, + { + "signature": "MacControlAlt8", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 8 (Mac)" + }, + { + "signature": "MacControlAlt9", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Alt + 9 (Mac)" + }, + { + "signature": "MacControlOptionHome", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + Home (Mac)" + }, + { + "signature": "MacControlOptionEnd", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + End (Mac)" + }, + { + "signature": "MacControlOptionA", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + A (Mac)" + }, + { + "signature": "MacControlOptionB", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + B (Mac)" + }, + { + "signature": "MacControlOptionC", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + C (Mac)" + }, + { + "signature": "MacControlOptionD", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + D (Mac)" + }, + { + "signature": "MacControlOptionE", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + E (Mac)" + }, + { + "signature": "MacControlOptionF", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + F (Mac)" + }, + { + "signature": "MacControlOptionG", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + G (Mac)" + }, + { + "signature": "MacControlOptionH", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + H (Mac)" + }, + { + "signature": "MacControlOptionI", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + I (Mac)" + }, + { + "signature": "MacControlOptionJ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + J (Mac)" + }, + { + "signature": "MacControlOptionK", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + K (Mac)" + }, + { + "signature": "MacControlOptionL", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + L (Mac)" + }, + { + "signature": "MacControlOptionM", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + M (Mac)" + }, + { + "signature": "MacControlOptionN", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + N (Mac)" + }, + { + "signature": "MacControlOptionO", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + O (Mac)" + }, + { + "signature": "MacControlOptionP", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + P (Mac)" + }, + { + "signature": "MacControlOptionQ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + Q (Mac)" + }, + { + "signature": "MacControlOptionR", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + R (Mac)" + }, + { + "signature": "MacControlOptionS", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + S (Mac)" + }, + { + "signature": "MacControlOptionT", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + T (Mac)" + }, + { + "signature": "MacControlOptionU", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + U (Mac)" + }, + { + "signature": "MacControlOptionV", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + V (Mac)" + }, + { + "signature": "MacControlOptionW", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + W (Mac)" + }, + { + "signature": "MacControlOptionX", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + X (Mac)" + }, + { + "signature": "MacControlOptionY", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + Y (Mac)" + }, + { + "signature": "MacControlOptionZ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + Z (Mac)" + }, + { + "signature": "MacControlOption0", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 0 (Mac)" + }, + { + "signature": "MacControlOption1", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 1 (Mac)" + }, + { + "signature": "MacControlOption2", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 2 (Mac)" + }, + { + "signature": "MacControlOption3", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 3 (Mac)" + }, + { + "signature": "MacControlOption4", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 4 (Mac)" + }, + { + "signature": "MacControlOption5", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 5 (Mac)" + }, + { + "signature": "MacControlOption6", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 6 (Mac)" + }, + { + "signature": "MacControlOption7", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 7 (Mac)" + }, + { + "signature": "MacControlOption8", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 8 (Mac)" + }, + { + "signature": "MacControlOption9", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Option + 9 (Mac)" + }, + { + "signature": "MacControlShiftHome", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + Home (Mac)" + }, + { + "signature": "MacControlShiftEnd", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + End (Mac)" + }, + { + "signature": "MacControlShiftA", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + A (Mac)" + }, + { + "signature": "MacControlShiftB", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + B (Mac)" + }, + { + "signature": "MacControlShiftC", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + C (Mac)" + }, + { + "signature": "MacControlShiftD", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + D (Mac)" + }, + { + "signature": "MacControlShiftE", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + E (Mac)" + }, + { + "signature": "MacControlShiftF", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + F (Mac)" + }, + { + "signature": "MacControlShiftG", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + G (Mac)" + }, + { + "signature": "MacControlShiftH", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + H (Mac)" + }, + { + "signature": "MacControlShiftI", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + I (Mac)" + }, + { + "signature": "MacControlShiftJ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + J (Mac)" + }, + { + "signature": "MacControlShiftK", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + K (Mac)" + }, + { + "signature": "MacControlShiftL", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + L (Mac)" + }, + { + "signature": "MacControlShiftM", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + M (Mac)" + }, + { + "signature": "MacControlShiftN", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + N (Mac)" + }, + { + "signature": "MacControlShiftO", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + O (Mac)" + }, + { + "signature": "MacControlShiftP", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + P (Mac)" + }, + { + "signature": "MacControlShiftQ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + Q (Mac)" + }, + { + "signature": "MacControlShiftR", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + R (Mac)" + }, + { + "signature": "MacControlShiftS", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + S (Mac)" + }, + { + "signature": "MacControlShiftT", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + T (Mac)" + }, + { + "signature": "MacControlShiftU", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + U (Mac)" + }, + { + "signature": "MacControlShiftV", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + V (Mac)" + }, + { + "signature": "MacControlShiftW", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + W (Mac)" + }, + { + "signature": "MacControlShiftX", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + X (Mac)" + }, + { + "signature": "MacControlShiftY", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + Y (Mac)" + }, + { + "signature": "MacControlShiftZ", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + Z (Mac)" + }, + { + "signature": "MacControlShift0", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 0 (Mac)" + }, + { + "signature": "MacControlShift1", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 1 (Mac)" + }, + { + "signature": "MacControlShift2", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 2 (Mac)" + }, + { + "signature": "MacControlShift3", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 3 (Mac)" + }, + { + "signature": "MacControlShift4", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 4 (Mac)" + }, + { + "signature": "MacControlShift5", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 5 (Mac)" + }, + { + "signature": "MacControlShift6", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 6 (Mac)" + }, + { + "signature": "MacControlShift7", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 7 (Mac)" + }, + { + "signature": "MacControlShift8", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 8 (Mac)" + }, + { + "signature": "MacControlShift9", + "modifiers": [], + "protected": false, + "virtual": false, + "summary": "Control + Shift + 9 (Mac)" } ] @@ -17356,7 +18427,15 @@ "modifiers": ["public"], "protected": false, "virtual": false, - "since": "5.0" + "summary": "Draws a construction plane.", + "since": "5.0", + "parameters": [ + { + "name": "constructionPlane", + "type": "DocObjects.ConstructionPlane", + "summary": "The construction plane to draw." + } + ] }, { "signature": "System.Void DrawCurvatureGraph(Curve curve, System.Drawing.Color color, System.Int32 hairScale, System.Int32 hairDensity, System.Int32 sampleDensity)", @@ -17860,6 +18939,26 @@ } ] }, + { + "signature": "System.Void DrawLight(Light light, System.Drawing.Color wireframeColor)", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Draws a light.", + "since": "8.4", + "parameters": [ + { + "name": "light", + "type": "Light", + "summary": "The light to draw." + }, + { + "name": "wireframeColor", + "type": "System.Drawing.Color", + "summary": "The wireframe color." + } + ] + }, { "signature": "System.Void DrawLine(Line line, DisplayPen pen)", "modifiers": ["public"], @@ -19757,6 +20856,22 @@ "since": "6.3", "property": ["get", "set"] }, + { + "signature": "double BackMaterialShine", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Get or set the back material shine (0 to Rhino.DocObjects.MaxShine). You must call DisplayModeDescription.UpdateDisplayMode() to commit this change.", + "property": ["get", "set"] + }, + { + "signature": "double BackMaterialTransparency", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Get or set the back material transparency (0 to 100). You must call DisplayModeDescription.UpdateDisplayMode() to commit this change.", + "property": ["get", "set"] + }, { "signature": "BoundingBoxDisplayMode BoundingBoxMode", "modifiers": ["public"], @@ -19800,6 +20915,22 @@ "since": "5.1", "property": ["get", "set"] }, + { + "signature": "float CurveThicknessScale", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Scale thickness for curves", + "property": ["get", "set"] + }, + { + "signature": "CurveThicknessType CurveThicknessUsage", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Use a pixel thickness (CurveThickness) or a scale thickness (CurveThicknessScale)", + "property": ["get", "set"] + }, { "signature": "bool DisableConduits", "modifiers": ["public"], @@ -19833,6 +20964,22 @@ "since": "6.0", "property": ["get", "set"] }, + { + "signature": "double FrontMaterialShine", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Get or set the front material shine (0 to Rhino.DocObjects.MaxShine). You must call DisplayModeDescription.UpdateDisplayMode() to commit this change.", + "property": ["get", "set"] + }, + { + "signature": "double FrontMaterialTransparency", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Get or set the front material transparency (0 to 100). You must call DisplayModeDescription.UpdateDisplayMode() to commit this change.", + "property": ["get", "set"] + }, { "signature": "Guid Id", "modifiers": ["public"], @@ -19849,6 +20996,13 @@ "since": "5.0", "property": ["get", "set"] }, + { + "signature": "LightingSchema LightingScheme", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "property": ["get", "set"] + }, { "signature": "string LocalName", "modifiers": ["public"], @@ -19882,6 +21036,22 @@ "since": "5.0", "property": ["get", "set"] }, + { + "signature": "float PointCloudRadius", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "since": "8.4", + "property": ["get", "set"] + }, + { + "signature": "PointStyle PointCloudStyle", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "since": "8.4", + "property": ["get", "set"] + }, { "signature": "float PointRadius", "modifiers": ["public"], @@ -20424,6 +21594,26 @@ } ] + }, + { + "namespace": "Rhino.Display", + "name": "DisplayPipelineAttributes.CurveThicknessType", + "dataType": "enum", + "values": [ + { + "signature": "UseObjectWidth = 0", + "modifiers": [], + "protected": false, + "virtual": false + }, + { + "signature": "Pixels = 1", + "modifiers": [], + "protected": false, + "virtual": false + } + ] + }, { "namespace": "Rhino.Display", @@ -20475,6 +21665,44 @@ } ] + }, + { + "namespace": "Rhino.Display", + "name": "DisplayPipelineAttributes.LightingSchema", + "dataType": "enum", + "values": [ + { + "signature": "None = 0", + "modifiers": [], + "protected": false, + "virtual": false + }, + { + "signature": "DefaultLighting = 1", + "modifiers": [], + "protected": false, + "virtual": false + }, + { + "signature": "SceneLighting = 2", + "modifiers": [], + "protected": false, + "virtual": false + }, + { + "signature": "CustomLighting = 3", + "modifiers": [], + "protected": false, + "virtual": false + }, + { + "signature": "AmbientOcclusion = 4", + "modifiers": [], + "protected": false, + "virtual": false + } + ] + }, { "namespace": "Rhino.Display", @@ -24548,6 +25776,14 @@ "since": "7.6", "property": ["get", "set"] }, + { + "signature": "double HorizontalScale", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Horizontal stretch to be applied to output. Useful for calibrating printers", + "property": ["get", "set"] + }, { "signature": "bool IsScaleToFit", "modifiers": ["public"], @@ -24658,6 +25894,14 @@ "since": "6.15", "property": ["get", "set"] }, + { + "signature": "double VerticalScale", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Vertical stretch to be applied to output. Useful for calibrating printers", + "property": ["get", "set"] + }, { "signature": "ViewAreaMapping ViewArea", "modifiers": ["public"], @@ -26845,6 +28089,31 @@ "virtual": false, "summary": "Returns a copy of the underlying curve geometry.", "since": "5.0" + }, + { + "signature": "GeometryBase[] GetLinetypeSegments()", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Converts the linetype pattern of the curve into curve segments and points based on the active Rhino viewport.", + "since": "8.4", + "returns": "An array of curve and point objects if successful." + }, + { + "signature": "GeometryBase[] GetLinetypeSegments(RhinoViewport viewport)", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Converts the linetype pattern of the curve into curve segments and points based on the specified Rhino viewport.", + "since": "8.4", + "parameters": [ + { + "name": "viewport", + "type": "RhinoViewport", + "summary": "The Rhino viewport used to generate the curve segments and points." + } + ], + "returns": "An array of curve and point objects if successful." } ] }, @@ -39218,6 +40487,42 @@ } ] }, + { + "signature": "Commands.Result MeshObjects(IEnumerable rhinoObjects, MeshingParameters parameters, out Mesh[] meshes, out ObjectAttributes[] attributes, System.Boolean useWorkerThread)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Meshes Rhino objects.", + "since": "8.4", + "parameters": [ + { + "name": "rhinoObjects", + "type": "System.Collections.Generic.IEnumerable", + "summary": "The Rhino objects to mesh." + }, + { + "name": "parameters", + "type": "MeshingParameters", + "summary": "The parameters used to create the meshes." + }, + { + "name": "meshes", + "type": "Mesh[]", + "summary": "The created meshes are appended to this array." + }, + { + "name": "attributes", + "type": "ObjectAttributes[]", + "summary": "The object attributes that coincide with each created mesh are appended to this array." + }, + { + "name": "useWorkerThread", + "type": "System.Boolean", + "summary": "Set True to compute meshes in a worker thread." + } + ], + "returns": "The results of the calculation." + }, { "signature": "Commands.Result MeshObjects(IEnumerable rhinoObjects, MeshingParameters parameters, out Mesh[] meshes, out ObjectAttributes[] attributes)", "modifiers": ["public", "static"], @@ -60187,6 +61492,15 @@ } ], "methods": [ + { + "signature": "System.Int32 AddGroup()", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Adds a new empty group to the group table.", + "since": "8.4", + "returns": ">=0 index of new group or -1 on error." + }, { "signature": "Group FindIndex(System.Int32 groupIndex)", "modifiers": ["public"], @@ -60811,6 +62125,15 @@ } ], "methods": [ + { + "signature": "System.Int32 AddMaterial(DocObjects.Material material)", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Adds a material to the model material table", + "since": "8.4", + "returns": "The material's index (>=0) is returned. Otherwise, RhinoMath.UnsetIntIndex is returned." + }, { "signature": "DocObjects.Material FindIndex(System.Int32 index)", "modifiers": ["public"], @@ -73748,7 +75071,7 @@ "namespace": "Rhino.FileIO", "name": "SerializationOptions", "dataType": "class", - "summary": "Contains options for serializing -or storing- data, such as Rhino version and user data.", + "summary": "Contains options for serializing -or storing- data, such as Rhino version, user data, and meshes.", "constructors": [ { "signature": "SerializationOptions()", @@ -73769,6 +75092,22 @@ "since": "5.0", "property": ["get", "set"] }, + { + "signature": "bool WriteAnalysisMeshes", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Gets or sets a value indicating whether to write analysis meshes", + "property": ["get", "set"] + }, + { + "signature": "bool WriteRenderMeshes", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Gets or sets a value indicating whether to write render meshes", + "property": ["get", "set"] + }, { "signature": "bool WriteUserData", "modifiers": ["public"], @@ -85135,6 +86474,37 @@ ], "returns": "Valid circle on success, Circle.Unset on failure." }, + { + "signature": "System.Boolean TrySmallestEnclosingCircle(IEnumerable points, System.Double tolerance, out Circle circle, out System.Int32[] indicesOnCircle)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Attempt to create the smallest circle enclosing a set of planar points.", + "since": "8.4", + "parameters": [ + { + "name": "points", + "type": "IEnumerable", + "summary": "The points to enclose." + }, + { + "name": "tolerance", + "type": "System.Double", + "summary": "The tolerance to use" + }, + { + "name": "circle", + "type": "Circle", + "summary": "The resulting circle on success." + }, + { + "name": "indicesOnCircle", + "type": "System.Int32[]", + "summary": "If possible, indices of two or three points that define the circle" + } + ], + "returns": "True on success, False on failure." + }, { "signature": "System.Boolean ClosestParameter(Point3d testPoint, out System.Double t)", "modifiers": ["public"], @@ -94778,6 +96148,37 @@ ], "returns": "True on success, False on failure." }, + { + "signature": "Curve[] JoinCurves(IEnumerable inputCurves, System.Double joinTolerance, System.Boolean preserveDirection, out System.Int32[] key)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Joins a collection of curve segments together.", + "since": "8.4", + "parameters": [ + { + "name": "inputCurves", + "type": "IEnumerable", + "summary": "An array, a list or any enumerable set of curve segments to join." + }, + { + "name": "joinTolerance", + "type": "System.Double", + "summary": "Joining tolerance, i.e. the distance between segment end-points that is allowed." + }, + { + "name": "preserveDirection", + "type": "System.Boolean", + "summary": "If true, curve endpoints will be compared to curve start points. \nIf false, all start and endpoints will be compared and copies of input curves may be reversed in output." + }, + { + "name": "key", + "type": "System.Int32[]", + "summary": "inputCurves[i] is part of returnValue[key[i]]" + } + ], + "returns": "An array of joined curves. This array can be empty." + }, { "signature": "Curve[] JoinCurves(IEnumerable inputCurves, System.Double joinTolerance, System.Boolean preserveDirection)", "modifiers": ["public", "static"], @@ -96703,6 +98104,22 @@ "since": "7.0", "returns": "An array of points if successful, None if not successful or on error." }, + { + "signature": "Point3d[] InflectionPoints(out System.Double[] curveParameters)", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Returns a curve's inflection points. An inflection point is a location on a curve at which the sign of the curvature (i.e., the concavity) changes. The curvature at these locations is always 0.", + "since": "8.4", + "parameters": [ + { + "name": "curveParameters", + "type": "System.Double[]", + "summary": "An array of curve parameters at the inflection points." + } + ], + "returns": "An array of points if successful, None if not successful or on error." + }, { "signature": "System.Boolean IsArc()", "modifiers": ["public"], @@ -97159,6 +98576,22 @@ "since": "7.0", "returns": "An array of points if successful, None if not successful or on error." }, + { + "signature": "Point3d[] MaxCurvaturePoints(out System.Double[] curveParameters)", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Returns a curve's maximum curvature points. The maximum curvature points identify where the curvature starts to decrease in both directions from the points.", + "since": "8.4", + "parameters": [ + { + "name": "curveParameters", + "type": "System.Double[]", + "summary": "An array of curve parameters at the maximum curvature points." + } + ], + "returns": "An array of points if successful, None if not successful or on error." + }, { "signature": "System.Void NonConstOperation()", "modifiers": ["protected", "override"], @@ -101153,7 +102586,7 @@ "summary": "The mesh type." } ], - "returns": "A bool." + "returns": "True on success." }, { "signature": "System.Boolean SetOuterProfile(Curve outerProfile, System.Boolean cap)", @@ -121489,6 +122922,22 @@ ], "returns": "The length of the line between the two points, or 0 if either point is invalid." }, + { + "signature": "System.Double DistanceToSquared(Point2d other)", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Computes the square of the distance between two 2d points. \nThis method is usually largely faster than DistanceTo().", + "since": "8.4", + "parameters": [ + { + "name": "other", + "type": "Point2d", + "summary": "Other point for squared distance measurement." + } + ], + "returns": "The squared length of the line between this and the other point; or 0 if any of the points is not valid." + }, { "signature": "System.Boolean EpsilonEquals(Point2d other, System.Double epsilon)", "modifiers": ["public"], @@ -128407,6 +129856,24 @@ "summary": "Gets the revolute curve.", "since": "6.0", "property": ["get"] + }, + { + "signature": "Interval Interval", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Interval specifies the parameterization for the angular parameter. Interval must be an increasing interval. The parameter Interval[0] corresponds to Angle[0] and the parameter Interval[1] corresponds to Angle[1].", + "since": "8.4", + "property": ["get"] + }, + { + "signature": "bool IsTransposed", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "If false, the \"u\" parameter is the angle parameter and the \"v\" parameter is the curve parameter. If true, the \"u\" parameter is the curve parameter and the \"v\" parameter is the angle parameter.", + "since": "8.4", + "property": ["get"] } ], "methods": [ @@ -131372,6 +132839,110 @@ ], "returns": "A new SubD if successful, or None on failure." }, + { + "signature": "SubD CreateGlobeSphere(Sphere sphere, SubDComponentLocation vertexLocation, System.UInt32 axialFaceCount, System.UInt32 equatorialFaceCount)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Creates a SubD sphere made from polar triangle fans and bands of quads. The result resembles a globe with triangle fans at the poles and the edges forming latitude parallels and longitude meridians.", + "since": "8.4", + "parameters": [ + { + "name": "sphere", + "type": "Sphere", + "summary": "Location, size and orientation of the sphere." + }, + { + "name": "vertexLocation", + "type": "SubDComponentLocation", + "summary": "If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere." + }, + { + "name": "axialFaceCount", + "type": "System.UInt32", + "summary": "Number of faces along the sphere's meridians. (axialFaceCount >= 2) For example, if you wanted each face to span 30 degrees of latitude, you would pass 6 (=180 degrees/30 degrees) for axialFaceCount." + }, + { + "name": "equatorialFaceCount", + "type": "System.UInt32", + "summary": "Number of faces around the sphere's parallels. (equatorialFaceCount >= 3) For example, if you wanted each face to span 30 degrees of longitude, you would pass 12 (=360 degrees/30 degrees) for equatorialFaceCount." + } + ], + "returns": "If the input parameters are valid, a SubD globe sphere is returned. Otherwise None is returned." + }, + { + "signature": "SubD CreateIcosahedron(Sphere sphere, SubDComponentLocation vertexLocation)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Creates a SubD sphere based on an icosohedron (20 triangular faces and 5 valent vertices). This is a goofy topology for a Catmull-Clark subdivision surface (all triangles, all vertices have 5 edges). You may want to consider using the much behaved result from CreateSubDQuadSphere(sphere, vertexLocation, 1) or even the result from CreateSubDGlobeSphere().", + "since": "8.4", + "parameters": [ + { + "name": "sphere", + "type": "Sphere", + "summary": "Location, size and orientation of the sphere." + }, + { + "name": "vertexLocation", + "type": "SubDComponentLocation", + "summary": "If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere." + } + ], + "returns": "If the input parameters are valid, a SubD icosahedron is returned. Otherwise None is returned." + }, + { + "signature": "SubD CreateQuadSphere(Sphere sphere, SubDComponentLocation vertexLocation, System.UInt32 quadSubdivisionLevel)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Creates a SubD sphere made from quad faces.", + "since": "8.4", + "parameters": [ + { + "name": "sphere", + "type": "Sphere", + "summary": "Location, size and orientation of the sphere." + }, + { + "name": "vertexLocation", + "type": "SubDComponentLocation", + "summary": "If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere." + }, + { + "name": "quadSubdivisionLevel", + "type": "System.UInt32", + "summary": "The resulting sphere will have 6*4^subdivision level quads. (0 for 6 quads, 1 for 24 quads, 2 for 96 quads, ...)." + } + ], + "returns": "If the input parameters are valid, a SubD quad sphere is returned. Otherwise None is returned." + }, + { + "signature": "SubD CreateTriSphere(Sphere sphere, SubDComponentLocation vertexLocation, System.UInt32 triSubdivisionLevel)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Creates a SubD sphere made from triangular faces. This is a goofy topology for a Catmull-Clark subdivision surface (all triangles and all vertices have 5 or 6 edges). You may want to consider using the much behaved result from CreateSubDQuadSphere() or even the result from CreateSubDGlobeSphere().", + "since": "8.4", + "parameters": [ + { + "name": "sphere", + "type": "Sphere", + "summary": "Location, size and orientation of the sphere." + }, + { + "name": "vertexLocation", + "type": "SubDComponentLocation", + "summary": "If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere." + }, + { + "name": "triSubdivisionLevel", + "type": "System.UInt32", + "summary": "The resulting sphere will have 20*4^subdivision level triangles. (0 for 20 triangles, 1 for 80 triangles, 2 for 320 triangles, ...)." + } + ], + "returns": "If the input parameters are valid, a SubD tri sphere is returned. Otherwise None is returned." + }, { "signature": "SubD[] JoinSubDs(IEnumerable subdsToJoin, System.Double tolerance, System.Boolean joinedEdgesAreCreases, System.Boolean preserveSymmetry)", "modifiers": ["public", "static"], @@ -131939,7 +133510,7 @@ "modifiers": ["public", "static"], "protected": false, "virtual": false, - "summary": "Look for convex corners at sub-D vertices with 2 edges or fewer that have an included angle ≤ 120 degrees. Look for concave corners at sub-D vertices with 3 edge or more that have an included angle ≥ 240 degrees.", + "summary": "Look for convex corners at sub-D vertices with 2 edges or fewer that have an included angle ≤ 120 degrees. Look for concave corners at sub-D vertices with 3 edges or more that have an included angle ≥ 240 degrees.", "since": "8.0", "property": ["get"] }, @@ -141264,6 +142835,50 @@ } ], "properties": [ + { + "signature": "Vector2f Unset", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Gets the value of the vector with each component set to RhinoMath.UnsetValue.", + "since": "5.0", + "property": ["get"] + }, + { + "signature": "Vector2f XAxis", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Gets the value of the vector with components 1,0.", + "since": "5.0", + "property": ["get"] + }, + { + "signature": "Vector2f YAxis", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Gets the value of the vector with components 0,1.", + "property": ["get"] + }, + { + "signature": "Vector2f Zero", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Gets the value of the vector with components 0,0.", + "since": "5.0", + "property": ["get"] + }, + { + "signature": "bool IsUnitVector", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Gets a value indicating whether or not this is a unit vector. A unit vector has length 1.", + "since": "6.0", + "property": ["get"] + }, { "signature": "bool IsValid", "modifiers": ["public"], @@ -141273,6 +142888,23 @@ "since": "6.0", "property": ["get"] }, + { + "signature": "bool IsZero", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Gets a value indicating whether the X, Y, and Z values are all equal to 0.0.", + "since": "6.0", + "property": ["get"] + }, + { + "signature": "double Length", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Computes the length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem. If this vector is invalid, its length is considered 0.", + "property": ["get"] + }, { "signature": "float SquareLength", "modifiers": ["public"], @@ -141302,6 +142934,46 @@ } ], "methods": [ + { + "signature": "Point2f Add(Point2f point, Vector2f vector)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Sums up a point and a vector, and returns a new point. \n(Provided for languages that do not support operator overloading. You can use the + operator otherwise)", + "parameters": [ + { + "name": "point", + "type": "Point2f", + "summary": "A point." + }, + { + "name": "vector", + "type": "Vector2f", + "summary": "A vector." + } + ], + "returns": "A new point that results from the addition of point and vector." + }, + { + "signature": "Vector2f Add(Vector2f vector1, Vector2f vector2)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Sums up two vectors. \n(Provided for languages that do not support operator overloading. You can use the + operator otherwise)", + "parameters": [ + { + "name": "vector1", + "type": "Vector2f", + "summary": "A vector." + }, + { + "name": "vector2", + "type": "Vector2f", + "summary": "A second vector." + } + ], + "returns": "A new vector that results from the component-wise addition of the two vectors." + }, { "signature": "System.Double Multiply(Vector2f point1, Vector2f point2)", "modifiers": ["public", "static"], @@ -141323,6 +142995,42 @@ ], "returns": "A value that results from the coordinate-wise multiplication of point1 and point2." }, + { + "signature": "Vector2f Negate(Vector2f vector)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Computes the reversed vector. \n(Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)", + "remarks": "This is similar to Reverse , but is static for CLR compliance, and with default name.", + "parameters": [ + { + "name": "vector", + "type": "Vector2f", + "summary": "A vector to negate." + } + ], + "returns": "A new vector where all components were multiplied by -1." + }, + { + "signature": "Vector2f Subtract(Vector2f vector1, Vector2f vector2)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Subtracts the second vector from the first one. \n(Provided for languages that do not support operator overloading. You can use the - operator otherwise)", + "parameters": [ + { + "name": "vector1", + "type": "Vector2f", + "summary": "A vector." + }, + { + "name": "vector2", + "type": "Vector2f", + "summary": "A second vector." + } + ], + "returns": "A new vector that results from the component-wise difference of vector1 - vector2." + }, { "signature": "System.Int32 CompareTo(Vector2f other)", "modifiers": ["public"], @@ -141386,6 +143094,30 @@ "summary": "Computes a hash number that represents the current vector.", "returns": "A hash code that is not unique for each vector." }, + { + "signature": "System.Boolean PerpendicularTo(Vector2f other)", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Sets this vector to be perpendicular to another vector. Result is not unitized.", + "parameters": [ + { + "name": "other", + "type": "Vector2f", + "summary": "Vector to use as guide." + } + ], + "returns": "True on success, False if input vector is zero or invalid." + }, + { + "signature": "System.Boolean Reverse()", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Reverses this vector in place (reverses the direction). \nIf this vector contains RhinoMath.UnsetValue, the reverse will also be invalid and False will be returned.", + "remarks": "Similar to Negate , that is only provided for CLR language compliance.", + "returns": "True on success or False if the vector is invalid." + }, { "signature": "System.String ToString()", "modifiers": ["public", "override"], @@ -141400,6 +143132,14 @@ "protected": false, "virtual": false, "since": "7.0" + }, + { + "signature": "System.Boolean Unitize()", + "modifiers": ["public"], + "protected": false, + "virtual": false, + "summary": "Unitizes the vector in place. A unit vector has length 1 unit. \nAn invalid or zero length vector cannot be unitized.", + "returns": "True on success or False on failure." } ], "operators": [ @@ -141543,6 +143283,25 @@ } ] }, + { + "signature": "public static Point2f operator +(Point2f point, Vector2f vector)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Sums up a point and a vector, and returns a new point.", + "parameters": [ + { + "name": "point", + "type": "Point2f", + "summary": "A point." + }, + { + "name": "vector", + "type": "Vector2f", + "summary": "A vector." + } + ] + }, { "signature": "public static Vector2f operator -(Vector2f a, Vector2f b)", "modifiers": ["public", "static"], @@ -141563,6 +143322,20 @@ } ] }, + { + "signature": "public static Vector2f operator -(Vector2f vector)", + "modifiers": ["public", "static"], + "protected": false, + "virtual": false, + "summary": "Computes the opposite vector.", + "parameters": [ + { + "name": "vector", + "type": "Vector2f", + "summary": "A vector to negate." + } + ] + }, { "signature": "public static Vector2f operator +(Vector2f a, Vector2f b)", "modifiers": ["public", "static"], @@ -157293,6 +159066,13 @@ } ], "properties": [ + { + "signature": "Guid InitialChannelToDisplay", + "modifiers": ["protected", "virtual"], + "protected": true, + "virtual": true, + "property": ["get"] + }, { "signature": "bool PerferBasicContent", "modifiers": ["public"], @@ -204560,6 +206340,13 @@ "summary": "Get the unmanaged pointer associated with the pages content control", "since": "6.0" }, + { + "signature": "System.IntPtr NativeHandle(System.Object host)", + "modifiers": [], + "protected": true, + "virtual": false, + "summary": "Gets the native window handle associated with the host object if there is one." + }, { "signature": "System.Void RedrawPageControl(System.Object pageControl)", "modifiers": [],