diff --git a/quasar_site/src/api_examples.json b/quasar_site/src/api_examples.json
index 2608ae1f..fa94e83b 100644
--- a/quasar_site/src/api_examples.json
+++ b/quasar_site/src/api_examples.json
@@ -12,20 +12,20 @@
"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.RhinoView", "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.RhinoViewport", "bool SetTraceImage(string bitmapFileName, Plane plane, double width, double height, bool grayscale, bool filtered)"],
["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.UI.OpenFileDialog", "bool ShowOpenDialog()"],
+ ["Rhino.Input.Custom.GetPoint", "bool ConstrainToConstructionPlane(bool throughBasePoint)"],
["Rhino.Input.Custom.GetBaseClass", "Result CommandResult()"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Double Number()"],
+ ["Rhino.Input.Custom.GetBaseClass", "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.Input.Custom.GetNumber", "void SetLowerLimit(double lowerLimit, bool strictlyGreaterThan)"],
["Rhino.DocObjects.Tables.ViewTable", "RhinoView ActiveView"]
]
},
@@ -43,7 +43,7 @@
"code": "partial class Examples\n{\n public static Rhino.Commands.Result AddChildLayer(Rhino.RhinoDoc doc)\n {\n // Get an existing layer\n string default_name = doc.Layers.CurrentLayer.Name;\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 existing layer\");\n gs.SetDefaultString(default_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 int index = doc.Layers.Find(layer_name, true);\n if (index<0)\n return Rhino.Commands.Result.Cancel;\n\n Rhino.DocObjects.Layer parent_layer = doc.Layers[index];\n\n // Create a child layer\n string child_name = parent_layer.Name + \"_child\";\n Rhino.DocObjects.Layer childlayer = new Rhino.DocObjects.Layer();\n childlayer.ParentLayerId = parent_layer.Id;\n childlayer.Name = child_name;\n childlayer.Color = System.Drawing.Color.Red;\n\n index = doc.Layers.Add(childlayer);\n if (index < 0)\n {\n Rhino.RhinoApp.WriteLine(\"Unable to add {0} layer.\", child_name);\n return Rhino.Commands.Result.Failure;\n }\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
["Rhino.DocObjects.Layer", "Guid ParentLayerId"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Add(Layer layer)"]
+ ["Rhino.DocObjects.Tables.LayerTable", "int Add(Layer layer)"]
]
},
{
@@ -52,7 +52,7 @@
"members": [
["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"],
["Rhino.Geometry.Point3d", "Point3d(double x, double y, double z)"],
- ["Rhino.DocObjects.Tables.ViewTable", "System.Void Redraw()"],
+ ["Rhino.DocObjects.Tables.ViewTable", "void Redraw()"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddCircle(Circle circle)"]
]
},
@@ -61,8 +61,8 @@
"code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddClippingPlane(Rhino.RhinoDoc doc)\n {\n // Define the corners of the clipping plane\n Rhino.Geometry.Point3d[] corners;\n Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetRectangle(out corners);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n // Get the active view\n Rhino.Display.RhinoView view = doc.Views.ActiveView;\n if (view == null)\n return Rhino.Commands.Result.Failure;\n\n Rhino.Geometry.Point3d p0 = corners[0];\n Rhino.Geometry.Point3d p1 = corners[1];\n Rhino.Geometry.Point3d p3 = corners[3];\n\n // Create a plane from the corner points\n Rhino.Geometry.Plane plane = new Rhino.Geometry.Plane(p0, p1, p3);\n\n // Add a clipping plane object to the document\n Guid id = doc.Objects.AddClippingPlane(plane, p0.DistanceTo(p1), p0.DistanceTo(p3), view.ActiveViewportID);\n if (id != 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.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.FileIO.File3dmObjectTable", "System.Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, System.Guid clippedViewportId)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, System.Guid clippedViewportId)"],
["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"]
]
},
@@ -72,26 +72,26 @@
"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(bool capBottom, bool capTop)"]
]
},
{
"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.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.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.RhinoApp", "void WriteLine(string format, object arg0)"],
+ ["Rhino.RhinoApp", "void WriteLine(string message)"],
+ ["Rhino.DocObjects.Layer", "bool IsValidName(string name)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void AcceptNothing(bool enable)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void SetDefaultString(string defaultValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "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)"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.String GetUnusedLayerName()"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.String GetUnusedLayerName(System.Boolean ignoreDeleted)"]
+ ["Rhino.DocObjects.Tables.LayerTable", "int Add(string layerName, System.Drawing.Color layerColor)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "int Find(string layerName, bool ignoreDeletedLayers)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "Layer FindName(string layerName)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "string GetUnusedLayerName()"],
+ ["Rhino.DocObjects.Tables.LayerTable", "string GetUnusedLayerName(bool ignoreDeleted)"]
]
},
{
@@ -99,14 +99,14 @@
"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.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.DocObjects.RhinoObject", "bool CommitChanges()"],
+ ["Rhino.Display.RhinoPageView", "DetailViewObject AddDetailView(string title, Geometry.Point2d corner0, Geometry.Point2d corner1, DefinedViewportProjection initialProjection)"],
+ ["Rhino.Display.RhinoPageView", "bool SetActiveDetail(System.Guid detailId)"],
+ ["Rhino.Display.RhinoPageView", "void SetPageAsActive()"],
+ ["Rhino.Display.RhinoViewport", "bool 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.Tables.ViewTable", "RhinoPageView AddPageView(System.String title, System.Double pageWidth, System.Double pageHeight)"],
+ ["Rhino.Geometry.DetailView", "bool SetScale(double modelLength, Rhino.UnitSystem modelUnits, double pageLength, Rhino.UnitSystem pageUnits)"],
+ ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView AddPageView(string title, double pageWidth, double pageHeight)"],
["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView[] GetPageViews()"]
]
},
@@ -114,14 +114,14 @@
"name": "Addline.cs",
"code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddLine(Rhino.RhinoDoc doc)\n {\n Rhino.Input.Custom.GetPoint gp = new Rhino.Input.Custom.GetPoint();\n gp.SetCommandPrompt(\"Start of line\");\n gp.Get();\n if (gp.CommandResult() != Rhino.Commands.Result.Success)\n return gp.CommandResult();\n\n Rhino.Geometry.Point3d pt_start = gp.Point();\n\n gp.SetCommandPrompt(\"End of line\");\n gp.SetBasePoint(pt_start, false);\n gp.DrawLineFromPoint(pt_start, true);\n gp.Get();\n if (gp.CommandResult() != Rhino.Commands.Result.Success)\n return gp.CommandResult();\n\n Rhino.Geometry.Point3d pt_end = gp.Point();\n Rhino.Geometry.Vector3d v = pt_end - pt_start;\n if (v.IsTiny(Rhino.RhinoMath.ZeroTolerance))\n return Rhino.Commands.Result.Nothing;\n\n if (doc.Objects.AddLine(pt_start, pt_end) != 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.Vector2d", "System.Boolean IsTiny(System.Double tolerance)"],
- ["Rhino.Geometry.Vector3d", "System.Boolean IsTiny(System.Double tolerance)"],
+ ["Rhino.Geometry.Vector2d", "bool IsTiny(double tolerance)"],
+ ["Rhino.Geometry.Vector3d", "bool IsTiny(double tolerance)"],
["Rhino.Input.Custom.GetPoint", "GetPoint()"],
- ["Rhino.Input.Custom.GetPoint", "System.Void DrawLineFromPoint(Point3d startPoint, System.Boolean showDistanceInStatusBar)"],
+ ["Rhino.Input.Custom.GetPoint", "void DrawLineFromPoint(Point3d startPoint, bool showDistanceInStatusBar)"],
["Rhino.Input.Custom.GetPoint", "GetResult Get()"],
- ["Rhino.Input.Custom.GetPoint", "System.Void SetBasePoint(Point3d basePoint, System.Boolean showDistanceInStatusBar)"],
+ ["Rhino.Input.Custom.GetPoint", "void SetBasePoint(Point3d basePoint, bool showDistanceInStatusBar)"],
["Rhino.Input.Custom.GetBaseClass", "Point3d Point()"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Void SetCommandPrompt(System.String prompt)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void SetCommandPrompt(string prompt)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLine(Point3d from, Point3d to)"]
]
},
@@ -138,7 +138,7 @@
"code": "using System;\nusing Rhino.Geometry;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddLinearDimension2(Rhino.RhinoDoc doc)\n {\n Point3d origin = new Point3d(1,1,0);\n Point3d offset = new Point3d(11,1,0);\n Point3d pt = new Point3d((offset.X-origin.X)/2,3,0);\n\n Plane plane = Plane.WorldXY;\n plane.Origin = origin;\n\n double u,v;\n plane.ClosestParameter(origin, out u, out v);\n Point2d ext1 = new Point2d(u, v);\n\n plane.ClosestParameter(offset, out u, out v);\n Point2d ext2 = new Point2d(u, v);\n\n plane.ClosestParameter(pt, out u, out v);\n Point2d linePt = new Point2d(u, v);\n\n LinearDimension dimension = new LinearDimension(plane, ext1, ext2, linePt);\n if (doc.Objects.AddLinearDimension(dimension) != 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.LinearDimension", "LinearDimension(Plane dimensionPlane, Point2d extensionLine1End, Point2d extensionLine2End, Point2d pointOnDimensionLine)"],
- ["Rhino.Geometry.Plane", "System.Boolean ClosestParameter(Point3d testPoint, out System.Double s, out System.Double t)"]
+ ["Rhino.Geometry.Plane", "bool ClosestParameter(Point3d testPoint, out double s, out double t)"]
]
},
{
@@ -149,12 +149,12 @@
["Rhino.Geometry.Mesh", "MeshFaceList Faces"],
["Rhino.Geometry.Mesh", "MeshVertexNormalList Normals"],
["Rhino.Geometry.Mesh", "MeshVertexList Vertices"],
- ["Rhino.Geometry.Mesh", "System.Boolean Compact()"],
+ ["Rhino.Geometry.Mesh", "bool 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.MeshVertexList", "int Add(double x, double y, double z)"],
+ ["Rhino.Geometry.Collections.MeshVertexList", "int Add(float x, float y, float z)"],
+ ["Rhino.Geometry.Collections.MeshVertexNormalList", "bool ComputeNormals()"],
+ ["Rhino.Geometry.Collections.MeshFaceList", "int AddFace(int vertex1, int vertex2, int vertex3, int vertex4)"]
]
},
{
@@ -164,14 +164,14 @@
["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.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.Display.RhinoViewport", "bool PopViewProjection()"],
+ ["Rhino.Display.RhinoViewport", "void PushViewProjection()"],
+ ["Rhino.Display.RhinoViewport", "void SetCameraDirection(Vector3d cameraDirection, bool updateTargetLocation)"],
+ ["Rhino.Display.RhinoViewport", "void SetCameraLocation(Point3d cameraLocation, bool updateTargetLocation)"],
+ ["Rhino.DocObjects.Tables.NamedViewTable", "int Add(string name, System.Guid viewportId)"],
+ ["Rhino.Input.RhinoGet", "Result GetPoint(string prompt, bool acceptNothing, out Point3d point)"],
+ ["Rhino.Input.RhinoGet", "Result GetString(string prompt, bool acceptNothing, ref string outputString)"],
+ ["Rhino.Input.RhinoGet", "Result GetView(string commandPrompt, out RhinoView view)"]
]
},
{
@@ -187,9 +187,9 @@
"name": "Addnurbscurve.cs",
"code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddNurbsCurve(Rhino.RhinoDoc doc)\n {\n Rhino.Collections.Point3dList points = new Rhino.Collections.Point3dList(5);\n points.Add(0, 0, 0);\n points.Add(0, 2, 0);\n points.Add(2, 3, 0);\n points.Add(4, 2, 0);\n points.Add(4, 0, 0);\n Rhino.Geometry.NurbsCurve nc = Rhino.Geometry.NurbsCurve.Create(false, 3, points);\n Rhino.Commands.Result rc = Rhino.Commands.Result.Failure;\n if (nc != null && nc.IsValid)\n {\n if (doc.Objects.AddCurve(nc) != Guid.Empty)\n {\n doc.Views.Redraw();\n rc = Rhino.Commands.Result.Success;\n }\n }\n return rc;\n }\n}\n",
"members": [
- ["Rhino.Geometry.NurbsCurve", "NurbsCurve Create(System.Boolean periodic, System.Int32 degree, IEnumerable points)"],
+ ["Rhino.Geometry.NurbsCurve", "NurbsCurve Create(bool periodic, int degree, IEnumerable points)"],
["Rhino.Collections.Point3dList", "Point3dList(int initialCapacity)"],
- ["Rhino.Collections.Point3dList", "System.Void Add(System.Double x, System.Double y, System.Double z)"]
+ ["Rhino.Collections.Point3dList", "void Add(double x, double y, double z)"]
]
},
{
@@ -198,20 +198,20 @@
"members": [
["Rhino.RhinoDoc", "GroupTable Groups"],
["Rhino.Input.Custom.GetObject", "GetObject()"],
- ["Rhino.Input.Custom.GetObject", "GetResult GetMultiple(System.Int32 minimumNumber, System.Int32 maximumNumber)"],
- ["Rhino.DocObjects.Tables.GroupTable", "System.Int32 Add(IEnumerable objectIds)"]
+ ["Rhino.Input.Custom.GetObject", "GetResult GetMultiple(int minimumNumber, int maximumNumber)"],
+ ["Rhino.DocObjects.Tables.GroupTable", "int Add(IEnumerable objectIds)"]
]
},
{
"name": "Addradialdimension.cs",
"code": "using Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Commands;\nusing Rhino.Geometry;\nusing Rhino.Input;\n\nnamespace examples_cs\n{\n public class AddRadialDimensionCommand : Rhino.Commands.Command\n {\n public override string EnglishName\n {\n get { return \"csAddRadialDimension\"; }\n }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\"Select curve for radius dimension\", \n true, ObjectType.Curve, out obj_ref);\n if (rc != Result.Success)\n return rc;\n double curve_parameter;\n var curve = obj_ref.CurveParameter(out curve_parameter);\n if (curve == null)\n return Result.Failure;\n\n if (curve.IsLinear() || curve.IsPolyline())\n {\n RhinoApp.WriteLine(\"Curve must be non-linear.\");\n return Result.Nothing;\n }\n\n // in this example just deal with planar curves\n if (!curve.IsPlanar())\n {\n RhinoApp.WriteLine(\"Curve must be planar.\");\n return Result.Nothing;\n }\n\n var point_on_curve = curve.PointAt(curve_parameter);\n var curvature_vector = curve.CurvatureAt(curve_parameter);\n var len = curvature_vector.Length;\n if (len < RhinoMath.SqrtEpsilon)\n {\n RhinoApp.WriteLine(\"Curve is almost linear and therefore has no curvature.\");\n return Result.Nothing;\n }\n\n var center = point_on_curve + (curvature_vector/(len*len));\n Plane plane;\n curve.TryGetPlane(out plane);\n var radial_dimension = \n new RadialDimension(center, point_on_curve, plane.XAxis, plane.Normal, 5.0);\n doc.Objects.AddRadialDimension(radial_dimension);\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.DocObjects.ObjRef", "Curve CurveParameter(out System.Double parameter)"],
- ["Rhino.Geometry.Curve", "Vector3d CurvatureAt(System.Double t)"],
- ["Rhino.Geometry.Curve", "System.Boolean IsLinear()"],
- ["Rhino.Geometry.Curve", "System.Boolean IsPlanar()"],
- ["Rhino.Geometry.Curve", "System.Boolean IsPolyline()"],
- ["Rhino.Geometry.Curve", "Point3d PointAt(System.Double t)"],
+ ["Rhino.DocObjects.ObjRef", "Curve CurveParameter(out double parameter)"],
+ ["Rhino.Geometry.Curve", "Vector3d CurvatureAt(double t)"],
+ ["Rhino.Geometry.Curve", "bool IsLinear()"],
+ ["Rhino.Geometry.Curve", "bool IsPlanar()"],
+ ["Rhino.Geometry.Curve", "bool IsPolyline()"],
+ ["Rhino.Geometry.Curve", "Point3d PointAt(double t)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddRadialDimension(RadialDimension dimension)"]
]
},
@@ -227,7 +227,7 @@
"name": "Addtext.cs",
"code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddAnnotationText(Rhino.RhinoDoc doc)\n {\n Rhino.Geometry.Point3d pt = new Rhino.Geometry.Point3d(10, 0, 0);\n const string text = \"Hello RhinoCommon\";\n const double height = 2.0;\n const string font = \"Arial\";\n Rhino.Geometry.Plane plane = doc.Views.ActiveView.ActiveViewport.ConstructionPlane();\n plane.Origin = pt;\n Guid id = doc.Objects.AddText(text, plane, height, font, false, false);\n if( id != 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.DocObjects.Tables.ObjectTable", "System.Guid AddText(System.String text, Plane plane, System.Double height, System.String fontName, System.Boolean bold, System.Boolean italic)"]
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic)"]
]
},
{
@@ -246,7 +246,7 @@
["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"],
["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"],
["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"],
- ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, System.Boolean capStart, System.Boolean capEnd)"]
+ ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, bool capStart, bool capEnd)"]
]
},
{
@@ -255,37 +255,37 @@
"members": [
["Rhino.Display.DisplayModeDescription", "DisplayPipelineAttributes DisplayAttributes"],
["Rhino.Display.DisplayModeDescription", "DisplayModeDescription[] GetDisplayModes()"],
- ["Rhino.Display.DisplayModeDescription", "System.Boolean UpdateDisplayMode(DisplayModeDescription displayMode)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOption(System.String englishOption)"]
+ ["Rhino.Display.DisplayModeDescription", "bool UpdateDisplayMode(DisplayModeDescription displayMode)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOption(string englishOption)"]
]
},
{
"name": "Analysismode.cs",
"code": "using System;\nusing Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Geometry;\n\n\n[System.Runtime.InteropServices.Guid(\"62dd8eec-5cce-42c7-9d80-8b01fc169b81\")]\npublic class AnalysisModeOnCommand : Rhino.Commands.Command\n{\n public override string EnglishName { get { return \"cs_analysismode_on\"; } }\n\n protected override Rhino.Commands.Result RunCommand(RhinoDoc doc, Rhino.Commands.RunMode mode)\n {\n // make sure our custom visual analysis mode is registered\n var zmode = Rhino.Display.VisualAnalysisMode.Register(typeof(ZAnalysisMode));\n\n const ObjectType filter = Rhino.DocObjects.ObjectType.Surface | Rhino.DocObjects.ObjectType.PolysrfFilter | Rhino.DocObjects.ObjectType.Mesh;\n Rhino.DocObjects.ObjRef[] objs;\n var rc = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select objects for Z analysis\", false, filter, out objs);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n int count = 0;\n for (int i = 0; i < objs.Length; i++)\n {\n var obj = objs[i].Object();\n\n // see if this object is alreay in Z analysis mode\n if (obj.InVisualAnalysisMode(zmode))\n continue;\n\n if (obj.EnableVisualAnalysisMode(zmode, true))\n count++;\n }\n doc.Views.Redraw();\n RhinoApp.WriteLine(\"{0} objects were put into Z-Analysis mode.\", count);\n return Rhino.Commands.Result.Success;\n }\n}\n\n[System.Runtime.InteropServices.Guid(\"0A8CE87D-A8CB-4A41-9DE2-5B3957436AEE\")]\npublic class AnalysisModeOffCommand : Rhino.Commands.Command\n{\n public override string EnglishName { get { return \"cs_analysismode_off\"; } }\n\n protected override Rhino.Commands.Result RunCommand(RhinoDoc doc, Rhino.Commands.RunMode mode)\n {\n var zmode = Rhino.Display.VisualAnalysisMode.Find(typeof(ZAnalysisMode));\n // If zmode is null, we've never registered the mode so we know it hasn't been used\n if (zmode != null)\n {\n foreach (Rhino.DocObjects.RhinoObject obj in doc.Objects)\n {\n obj.EnableVisualAnalysisMode(zmode, false);\n }\n doc.Views.Redraw();\n }\n RhinoApp.WriteLine(\"Z-Analysis is off.\");\n return Rhino.Commands.Result.Success;\n }\n}\n\n\n/// \n/// This simple example provides a false color based on the world z-coordinate.\n/// For details, see the implementation of the FalseColor() function.\n/// \npublic class ZAnalysisMode : Rhino.Display.VisualAnalysisMode\n{\n Interval m_z_range = new Interval(-10,10);\n Interval m_hue_range = new Interval(0,4*Math.PI / 3);\n private const bool m_show_isocurves = true;\n\n public override string Name { get { return \"Z-Analysis\"; } }\n public override Rhino.Display.VisualAnalysisMode.AnalysisStyle Style { get { return AnalysisStyle.FalseColor; } }\n\n public override bool ObjectSupportsAnalysisMode(Rhino.DocObjects.RhinoObject obj)\n {\n if (obj is Rhino.DocObjects.MeshObject || obj is Rhino.DocObjects.BrepObject)\n return true;\n return false;\n }\n\n protected override void UpdateVertexColors(Rhino.DocObjects.RhinoObject obj, Mesh[] meshes)\n {\n // A \"mapping tag\" is used to determine if the colors need to be set\n Rhino.Render.MappingTag mt = GetMappingTag(obj.RuntimeSerialNumber);\n\n for (int mi = 0; mi < meshes.Length; mi++)\n {\n var mesh = meshes[mi];\n if( mesh.VertexColors.Tag.Id != this.Id )\n {\n // The mesh's mapping tag is different from ours. Either the mesh has\n // no false colors, has false colors set by another analysis mode, has\n // false colors set using different m_z_range[]/m_hue_range[] values, or\n // the mesh has been moved. In any case, we need to set the false\n // colors to the ones we want.\n System.Drawing.Color[] colors = new System.Drawing.Color[mesh.Vertices.Count];\n for (int i = 0; i < mesh.Vertices.Count; i++)\n {\n double z = mesh.Vertices[i].Z;\n colors[i] = FalseColor(z);\n }\n mesh.VertexColors.SetColors(colors);\n // set the mesh's color tag \n mesh.VertexColors.Tag = mt;\n }\n }\n }\n\n public override bool ShowIsoCurves\n {\n get\n {\n // Most shaded analysis modes that work on breps have the option of\n // showing or hiding isocurves. Run the built-in Rhino ZebraAnalysis\n // to see how Rhino handles the user interface. If controlling\n // iso-curve visability is a feature you want to support, then provide\n // user interface to set this member variable.\n return m_show_isocurves; \n }\n }\n\n /// \n /// Returns a mapping tag that is used to detect when a mesh's colors need to\n /// be set.\n /// \n /// \n Rhino.Render.MappingTag GetMappingTag(uint serialNumber)\n {\n Rhino.Render.MappingTag mt = new Rhino.Render.MappingTag();\n mt.Id = this.Id;\n\n // Since the false colors that are shown will change if the mesh is\n // transformed, we have to initialize the transformation.\n mt.MeshTransform = Transform.Identity;\n\n // This is a 32 bit CRC or the information used to set the false colors.\n // For this example, the m_z_range and m_hue_range intervals control the\n // colors, so we calculate their crc.\n uint crc = RhinoMath.CRC32(serialNumber, m_z_range.T0);\n crc = RhinoMath.CRC32(crc, m_z_range.T1);\n crc = RhinoMath.CRC32(crc, m_hue_range.T0);\n crc = RhinoMath.CRC32(crc, m_hue_range.T1);\n mt.MappingCRC = crc;\n return mt;\n }\n\n System.Drawing.Color FalseColor(double z)\n {\n // Simple example of one way to change a number into a color.\n double s = m_z_range.NormalizedParameterAt(z);\n s = Rhino.RhinoMath.Clamp(s, 0, 1);\n return System.Drawing.Color.FromArgb((int)(s * 255), 0, 0);\n }\n\n}",
"members": [
- ["Rhino.RhinoMath", "System.UInt32 CRC32(System.UInt32 currentRemainder, System.Double value)"],
+ ["Rhino.RhinoMath", "uint CRC32(uint currentRemainder, double value)"],
["Rhino.Geometry.Collections.MeshVertexColorList", "MappingTag Tag"],
- ["Rhino.Geometry.Collections.MeshVertexColorList", "System.Boolean SetColors(Color[] colors)"]
+ ["Rhino.Geometry.Collections.MeshVertexColorList", "bool SetColors(Color[] colors)"]
]
},
{
"name": "Arclengthpoint.cs",
"code": "partial class Examples\n{\n public static Rhino.Commands.Result ArcLengthPoint(Rhino.RhinoDoc doc)\n {\n Rhino.DocObjects.ObjRef objref;\n Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetOneObject(\"Select curve\",\n true, Rhino.DocObjects.ObjectType.Curve,out objref);\n if(rc!= Rhino.Commands.Result.Success)\n return rc;\n Rhino.Geometry.Curve crv = objref.Curve();\n if( crv==null )\n return Rhino.Commands.Result.Failure;\n \n double crv_length = crv.GetLength();\n double length = 0;\n rc = Rhino.Input.RhinoGet.GetNumber(\"Length from start\", true, ref length, 0, crv_length);\n if(rc!= Rhino.Commands.Result.Success)\n return rc;\n \n Rhino.Geometry.Point3d pt = crv.PointAtLength(length);\n if (pt.IsValid)\n {\n doc.Objects.AddPoint(pt);\n doc.Views.Redraw();\n }\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
- ["Rhino.Geometry.Curve", "System.Double GetLength()"],
- ["Rhino.Geometry.Curve", "Point3d PointAtLength(System.Double length)"]
+ ["Rhino.Geometry.Curve", "double GetLength()"],
+ ["Rhino.Geometry.Curve", "Point3d PointAtLength(double length)"]
]
},
{
"name": "Arraybydistance.cs",
"code": "using Rhino;\n\n[System.Runtime.InteropServices.Guid(\"3CDCBB20-B4E4-4AB6-B870-C911C7435BD7\")]\npublic class ArrayByDistanceCommand : Rhino.Commands.Command\n{\n public override string EnglishName\n {\n get { return \"cs_ArrayByDistance\"; }\n }\n \n double m_distance = 1;\n Rhino.Geometry.Point3d m_point_start;\n protected override Rhino.Commands.Result RunCommand(RhinoDoc doc, Rhino.Commands.RunMode mode)\n {\n Rhino.DocObjects.ObjRef objref;\n var rc = Rhino.Input.RhinoGet.GetOneObject(\"Select object\", true, Rhino.DocObjects.ObjectType.AnyObject, out objref);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n rc = Rhino.Input.RhinoGet.GetPoint(\"Start point\", false, out m_point_start);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n var obj = objref.Object();\n if (obj == null)\n return Rhino.Commands.Result.Failure;\n\n // create an instance of a GetPoint class and add a delegate\n // for the DynamicDraw event\n var gp = new Rhino.Input.Custom.GetPoint();\n gp.DrawLineFromPoint(m_point_start, true);\n var optdouble = new Rhino.Input.Custom.OptionDouble(m_distance);\n bool constrain = false;\n var optconstrain = new Rhino.Input.Custom.OptionToggle(constrain, \"Off\", \"On\");\n gp.AddOptionDouble(\"Distance\", ref optdouble);\n gp.AddOptionToggle(\"Constrain\", ref optconstrain);\n gp.DynamicDraw += ArrayByDistanceDraw;\n gp.Tag = obj;\n while (gp.Get() == Rhino.Input.GetResult.Option)\n {\n m_distance = optdouble.CurrentValue;\n if (constrain != optconstrain.CurrentValue)\n {\n constrain = optconstrain.CurrentValue;\n if (constrain)\n {\n var gp2 = new Rhino.Input.Custom.GetPoint();\n gp2.DrawLineFromPoint(m_point_start, true);\n gp2.SetCommandPrompt(\"Second point on constraint line\");\n if (gp2.Get() == Rhino.Input.GetResult.Point)\n gp.Constrain(m_point_start, gp2.Point());\n else\n {\n gp.ClearCommandOptions();\n optconstrain.CurrentValue = false;\n constrain = false;\n gp.AddOptionDouble(\"Distance\", ref optdouble);\n gp.AddOptionToggle(\"Constrain\", ref optconstrain);\n }\n }\n else\n {\n gp.ClearConstraints();\n }\n }\n }\n\n if (gp.CommandResult() == Rhino.Commands.Result.Success)\n {\n m_distance = optdouble.CurrentValue;\n var pt = gp.Point();\n var vec = pt - m_point_start;\n double length = vec.Length;\n vec.Unitize();\n int count = (int)(length / m_distance);\n for (int i = 1; i < count; i++)\n {\n var translate = vec * (i * m_distance);\n var xf = Rhino.Geometry.Transform.Translation(translate);\n doc.Objects.Transform(obj, xf, false);\n }\n doc.Views.Redraw();\n }\n\n return gp.CommandResult();\n }\n\n // this function is called whenever the GetPoint's DynamicDraw\n // event occurs\n void ArrayByDistanceDraw(object sender, Rhino.Input.Custom.GetPointDrawEventArgs e)\n {\n Rhino.DocObjects.RhinoObject rhobj = e.Source.Tag as Rhino.DocObjects.RhinoObject;\n if (rhobj == null)\n return;\n var vec = e.CurrentPoint - m_point_start;\n double length = vec.Length;\n vec.Unitize();\n int count = (int)(length / m_distance);\n for (int i = 1; i < count; i++)\n {\n var translate = vec * (i * m_distance);\n var xf = Rhino.Geometry.Transform.Translation(translate);\n e.Display.DrawObject(rhobj, xf);\n }\n }\n}\n",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawObject(DocObjects.RhinoObject rhinoObject, Transform xform)"],
+ ["Rhino.Display.DisplayPipeline", "void DrawObject(DocObjects.RhinoObject rhinoObject, Transform xform)"],
["Rhino.Input.Custom.GetPoint", "object Tag"],
- ["Rhino.Input.Custom.GetPoint", "System.Void ClearConstraints()"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Point3d from, Point3d to)"],
+ ["Rhino.Input.Custom.GetPoint", "void ClearConstraints()"],
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Point3d from, Point3d to)"],
["Rhino.Input.Custom.GetPointDrawEventArgs", "GetPoint Source"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Void ClearCommandOptions()"]
+ ["Rhino.Input.Custom.GetBaseClass", "void ClearCommandOptions()"]
]
},
{
@@ -300,16 +300,16 @@
"code": "using System.Collections.Generic;\nusing Rhino.Commands;\n\npartial class Examples\n{\n public static Rhino.Commands.Result BooleanDifference(Rhino.RhinoDoc doc)\n {\n Rhino.DocObjects.ObjRef[] objrefs;\n Result rc = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select first set of polysurfaces\",\n false, Rhino.DocObjects.ObjectType.PolysrfFilter, out objrefs);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n if (objrefs == null || objrefs.Length < 1)\n return Rhino.Commands.Result.Failure;\n\n List in_breps0 = new List();\n for (int i = 0; i < objrefs.Length; i++)\n {\n Rhino.Geometry.Brep brep = objrefs[i].Brep();\n if (brep != null)\n in_breps0.Add(brep);\n }\n\n doc.Objects.UnselectAll();\n rc = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select second set of polysurfaces\",\n false, Rhino.DocObjects.ObjectType.PolysrfFilter, out objrefs);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n if (objrefs == null || objrefs.Length < 1)\n return Rhino.Commands.Result.Failure;\n\n List in_breps1 = new List();\n for (int i = 0; i < objrefs.Length; i++)\n {\n Rhino.Geometry.Brep brep = objrefs[i].Brep();\n if (brep != null)\n in_breps1.Add(brep);\n }\n\n double tolerance = doc.ModelAbsoluteTolerance;\n Rhino.Geometry.Brep[] breps = Rhino.Geometry.Brep.CreateBooleanDifference(in_breps0, in_breps1, tolerance);\n if (breps.Length < 1)\n return Rhino.Commands.Result.Nothing;\n for (int i = 0; i < breps.Length; i++)\n doc.Objects.AddBrep(breps[i]);\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
["Rhino.DocObjects.ObjRef", "Brep Brep()"],
- ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, System.Double tolerance, System.Boolean manifoldOnly)"],
- ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, System.Double tolerance)"],
- ["Rhino.Input.RhinoGet", "Result GetMultipleObjects(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef[] rhObjects)"]
+ ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, double tolerance, bool manifoldOnly)"],
+ ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, double tolerance)"],
+ ["Rhino.Input.RhinoGet", "Result GetMultipleObjects(string prompt, bool acceptNothing, ObjectType filter, out ObjRef[] rhObjects)"]
]
},
{
"name": "Circlecenter.cs",
"code": "partial class Examples\n{\n public static Rhino.Commands.Result CircleCenter(Rhino.RhinoDoc doc)\n {\n Rhino.Input.Custom.GetObject go = new Rhino.Input.Custom.GetObject();\n go.SetCommandPrompt(\"Select objects\");\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve;\n go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve;\n go.GetMultiple(1, 0);\n if( go.CommandResult() != Rhino.Commands.Result.Success )\n return go.CommandResult();\n\n Rhino.DocObjects.ObjRef[] objrefs = go.Objects();\n if( objrefs==null )\n return Rhino.Commands.Result.Nothing;\n\n double tolerance = doc.ModelAbsoluteTolerance;\n for( int i=0; i distance)\n {\n // shrink the sphere to help improve the test\n e.SearchSphere = new Sphere(data.Point, distance);\n data.Index = e.Id;\n data.Distance = distance;\n }\n }\n\n class SearchData\n {\n public SearchData(Mesh mesh, Point3d point)\n {\n Point = point;\n Mesh = mesh;\n HitCount = 0;\n Index = -1;\n Distance = 0;\n }\n\n public int HitCount { get; set; }\n public Point3d Point { get; private set; }\n public Mesh Mesh { get; private set; }\n public int Index { get; set; }\n public double Distance { get; set; }\n }\n\n protected override Rhino.Commands.Result RunCommand(RhinoDoc doc, Rhino.Commands.RunMode mode)\n {\n Rhino.DocObjects.ObjRef objref;\n var rc = Rhino.Input.RhinoGet.GetOneObject(\"select mesh\", false, Rhino.DocObjects.ObjectType.Mesh, out objref);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n Mesh mesh = objref.Mesh();\n objref.Object().Select(false);\n doc.Views.Redraw();\n\n using (RTree tree = new RTree())\n {\n for (int i = 0; i < mesh.Vertices.Count; i++)\n {\n // we can make a C++ function that just builds an rtree from the\n // vertices in one quick shot, but for now...\n tree.Insert(mesh.Vertices[i], i);\n }\n\n while (true)\n {\n Point3d point;\n rc = Rhino.Input.RhinoGet.GetPoint(\"test point\", false, out point);\n if (rc != Rhino.Commands.Result.Success)\n break;\n\n SearchData data = new SearchData(mesh, point);\n // Use the first vertex in the mesh to define a start sphere\n double distance = point.DistanceTo(mesh.Vertices[0]);\n Sphere sphere = new Sphere(point, distance * 1.1);\n if (tree.Search(sphere, SearchCallback, data))\n {\n doc.Objects.AddPoint(mesh.Vertices[data.Index]);\n doc.Views.Redraw();\n RhinoApp.WriteLine(\"Found point in {0} tests\", data.HitCount);\n }\n }\n }\n return Rhino.Commands.Result.Success;\n }\n }\n}\n\n",
"members": [
["Rhino.Geometry.RTree", "RTree()"],
- ["Rhino.Geometry.RTree", "System.Boolean Insert(Point3d point, System.Int32 elementId)"],
- ["Rhino.Geometry.RTree", "System.Boolean Search(Sphere sphere, EventHandler callback, System.Object tag)"]
+ ["Rhino.Geometry.RTree", "bool Insert(Point3d point, int elementId)"],
+ ["Rhino.Geometry.RTree", "bool Search(Sphere sphere, EventHandler callback, object tag)"]
]
},
{
"name": "Commandlineoptions.cs",
"code": "partial class Examples\n{\n public static Rhino.Commands.Result CommandLineOptions(Rhino.RhinoDoc doc)\n {\n // For this example we will use a GetPoint class, but all of the custom\n // \"Get\" classes support command line options.\n Rhino.Input.Custom.GetPoint gp = new Rhino.Input.Custom.GetPoint();\n gp.SetCommandPrompt(\"GetPoint with options\");\n\n // set up the options\n Rhino.Input.Custom.OptionInteger intOption = new Rhino.Input.Custom.OptionInteger(1, 1, 99);\n Rhino.Input.Custom.OptionDouble dblOption = new Rhino.Input.Custom.OptionDouble(2.2, 0, 99.9);\n Rhino.Input.Custom.OptionToggle boolOption = new Rhino.Input.Custom.OptionToggle(true, \"Off\", \"On\");\n string[] listValues = new string[] { \"Item0\", \"Item1\", \"Item2\", \"Item3\", \"Item4\" };\n\n gp.AddOptionInteger(\"Integer\", ref intOption);\n gp.AddOptionDouble(\"Double\", ref dblOption);\n gp.AddOptionToggle(\"Boolean\", ref boolOption);\n int listIndex = 3;\n int opList = gp.AddOptionList(\"List\", listValues, listIndex);\n\n while (true)\n {\n // perform the get operation. This will prompt the user to input a point, but also\n // allow for command line options defined above\n Rhino.Input.GetResult get_rc = gp.Get();\n if (gp.CommandResult() != Rhino.Commands.Result.Success)\n return gp.CommandResult();\n\n if (get_rc == Rhino.Input.GetResult.Point)\n {\n doc.Objects.AddPoint(gp.Point());\n doc.Views.Redraw();\n Rhino.RhinoApp.WriteLine(\"Command line option values are\");\n Rhino.RhinoApp.WriteLine(\" Integer = {0}\", intOption.CurrentValue);\n Rhino.RhinoApp.WriteLine(\" Double = {0}\", dblOption.CurrentValue);\n Rhino.RhinoApp.WriteLine(\" Boolean = {0}\", boolOption.CurrentValue);\n Rhino.RhinoApp.WriteLine(\" List = {0}\", listValues[listIndex]);\n }\n else if (get_rc == Rhino.Input.GetResult.Option)\n {\n if (gp.OptionIndex() == opList)\n listIndex = gp.Option().CurrentListOptionIndex;\n continue;\n }\n break;\n }\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionDouble(System.String englishName, ref OptionDouble numberValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionInteger(System.String englishName, ref OptionInteger intValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionToggle(LocalizeStringPair optionName, ref OptionToggle toggleValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionToggle(System.String englishName, ref OptionToggle toggleValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionDouble(string englishName, ref OptionDouble numberValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionInteger(string englishName, ref OptionInteger intValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionToggle(LocalizeStringPair optionName, ref OptionToggle toggleValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionToggle(string englishName, ref OptionToggle toggleValue)"],
["Rhino.Input.Custom.CommandLineOption", "int CurrentListOptionIndex"],
["Rhino.Input.Custom.OptionToggle", "OptionToggle(bool initialValue, string offValue, string onValue)"],
["Rhino.Input.Custom.OptionToggle", "bool CurrentValue"],
@@ -345,14 +345,14 @@
"name": "Conduitarrowheads.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Geometry;\nusing Rhino.Input.Custom;\n\nnamespace examples_cs\n{\n class DrawArrowHeadsConduit : Rhino.Display.DisplayConduit\n {\n private readonly Line m_line;\n private readonly int m_screen_size;\n private readonly double m_world_size;\n\n public DrawArrowHeadsConduit(Line line, int screenSize, double worldSize)\n {\n m_line = line;\n m_screen_size = screenSize;\n m_world_size = worldSize;\n }\n\n protected override void DrawForeground(Rhino.Display.DrawEventArgs e)\n {\n e.Display.DrawArrow(m_line, System.Drawing.Color.Black, m_screen_size, m_world_size);\n }\n }\n\n\n public class DrawArrowheadsCommand : Command\n {\n public override string EnglishName { get { return \"csDrawArrowHeads\"; } }\n\n DrawArrowHeadsConduit m_draw_conduit;\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n if (m_draw_conduit != null)\n {\n RhinoApp.WriteLine(\"Turn off existing arrowhead conduit\");\n m_draw_conduit.Enabled = false;\n m_draw_conduit = null;\n }\n else\n {\n // get arrow head size\n var go = new GetOption();\n go.SetCommandPrompt(\"ArrowHead length in screen size (pixels) or world size (percentage of arrow length)?\");\n go.AddOption(\"screen\");\n go.AddOption(\"world\");\n go.Get();\n if (go.CommandResult() != Result.Success)\n return go.CommandResult();\n\n int screen_size = 0;\n double world_size = 0.0;\n if (go.Option().EnglishName == \"screen\")\n {\n var gi = new GetInteger();\n gi.SetLowerLimit(0, true);\n gi.SetCommandPrompt(\"Length of arrow head in pixels\");\n gi.Get();\n if (gi.CommandResult() != Result.Success)\n return gi.CommandResult();\n screen_size = gi.Number();\n }\n else\n {\n var gi = new GetInteger();\n gi.SetLowerLimit(0, true);\n gi.SetUpperLimit(100, false);\n gi.SetCommandPrompt(\"Length of arrow head in percentage of total arrow length\");\n gi.Get();\n if (gi.CommandResult() != Result.Success)\n return gi.CommandResult();\n world_size = gi.Number() / 100.0;\n }\n\n\n // get arrow start and end points\n var gp = new GetPoint();\n gp.SetCommandPrompt(\"Start of line\");\n gp.Get();\n if (gp.CommandResult() != Result.Success)\n return gp.CommandResult();\n var start_point = gp.Point();\n\n gp.SetCommandPrompt(\"End of line\");\n gp.SetBasePoint(start_point, false);\n gp.DrawLineFromPoint(start_point, true);\n gp.Get();\n if (gp.CommandResult() != Result.Success)\n return gp.CommandResult();\n var end_point = gp.Point();\n\n var v = end_point - start_point;\n if (v.IsTiny(Rhino.RhinoMath.ZeroTolerance))\n return Result.Nothing;\n\n var line = new Line(start_point, end_point);\n\n m_draw_conduit = new DrawArrowHeadsConduit(line, screen_size, world_size);\n // toggle conduit on/off\n m_draw_conduit.Enabled = true;\n RhinoApp.WriteLine(\"Draw arrowheads conduit enabled.\");\n }\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}\n\n",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawArrow(Line line, System.Drawing.Color color, System.Double screenSize, System.Double relativeSize)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawArrow(Line line, System.Drawing.Color color, double screenSize, double relativeSize)"]
]
},
{
"name": "Conduitbitmap.cs",
"code": "using System.Drawing;\nusing Rhino;\nusing Rhino.Commands;\nusing Rhino.Display;\n\nnamespace examples_cs\n{\n public class DrawBitmapConduit : Rhino.Display.DisplayConduit\n {\n private readonly DisplayBitmap m_display_bitmap;\n\n public DrawBitmapConduit()\n {\n var flag = new System.Drawing.Bitmap(100, 100);\n for( int x = 0; x < flag.Height; ++x )\n for( int y = 0; y < flag.Width; ++y )\n flag.SetPixel(x, y, Color.White);\n\n var g = Graphics.FromImage(flag);\n g.FillEllipse(Brushes.Blue, 25, 25, 50, 50);\n m_display_bitmap = new DisplayBitmap(flag);\n }\n\n protected override void DrawForeground(Rhino.Display.DrawEventArgs e)\n {\n e.Display.DrawBitmap(m_display_bitmap, 50, 50);\n }\n }\n\n public class DrawBitmapCommand : Command\n {\n public override string EnglishName { get { return \"csDrawBitmap\"; } }\n\n readonly DrawBitmapConduit m_conduit = new DrawBitmapConduit();\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n // toggle conduit on/off\n m_conduit.Enabled = !m_conduit.Enabled;\n \n RhinoApp.WriteLine(\"Custom conduit enabled = {0}\", m_conduit.Enabled);\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawBitmap(DisplayBitmap bitmap, System.Int32 left, System.Int32 top)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawBitmap(DisplayBitmap bitmap, int left, int top)"]
]
},
{
@@ -360,9 +360,9 @@
"code": "using System;\n\npartial class Examples\n{\n public static Rhino.Commands.Result ConstrainedCopy(Rhino.RhinoDoc doc)\n {\n // Get a single planar closed curve\n var go = new Rhino.Input.Custom.GetObject();\n go.SetCommandPrompt(\"Select curve\");\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve;\n go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve;\n go.Get();\n if( go.CommandResult() != Rhino.Commands.Result.Success )\n return go.CommandResult();\n var objref = go.Object(0);\n var base_curve = objref.Curve();\n var first_point = objref.SelectionPoint();\n if( base_curve==null || !first_point.IsValid )\n return Rhino.Commands.Result.Cancel;\n\n Rhino.Geometry.Plane plane;\n if( !base_curve.TryGetPlane(out plane) )\n return Rhino.Commands.Result.Cancel;\n\n // Get a point constrained to a line passing through the initial selection\n // point and parallel to the plane's normal\n var gp = new Rhino.Input.Custom.GetPoint();\n gp.SetCommandPrompt(\"Offset point\");\n gp.DrawLineFromPoint(first_point, true);\n var line = new Rhino.Geometry.Line(first_point, first_point+plane.Normal);\n gp.Constrain(line);\n gp.Get();\n if( gp.CommandResult() != Rhino.Commands.Result.Success )\n return gp.CommandResult();\n var second_point = gp.Point();\n Rhino.Geometry.Vector3d vec = second_point - first_point;\n if( vec.Length > 0.001 )\n {\n var xf = Rhino.Geometry.Transform.Translation(vec);\n Guid id = doc.Objects.Transform(objref, xf, false);\n if( id!=Guid.Empty )\n {\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n }\n return Rhino.Commands.Result.Cancel;\n }\n}\n",
"members": [
["Rhino.DocObjects.ObjRef", "Point3d SelectionPoint()"],
- ["Rhino.Geometry.Curve", "System.Boolean TryGetPlane(out Plane plane)"],
+ ["Rhino.Geometry.Curve", "bool TryGetPlane(out Plane plane)"],
["Rhino.Geometry.Transform", "Transform Translation(Vector3d motion)"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Line line)"]
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Line line)"]
]
},
{
@@ -370,9 +370,9 @@
"code": "using Rhino.DocObjects;\n\npartial class Examples\n{\n public static Rhino.Commands.Result CreateBlock(Rhino.RhinoDoc doc)\n {\n // Select objects to define block\n var go = new Rhino.Input.Custom.GetObject();\n go.SetCommandPrompt( \"Select objects to define block\" );\n go.ReferenceObjectSelect = false;\n go.SubObjectSelect = false;\n go.GroupSelect = true;\n\n // Phantoms, grips, lights, etc., cannot be in blocks.\n const ObjectType forbidden_geometry_filter = Rhino.DocObjects.ObjectType.Light |\n Rhino.DocObjects.ObjectType.Grip | Rhino.DocObjects.ObjectType.Phantom;\n const ObjectType geometry_filter = forbidden_geometry_filter ^ Rhino.DocObjects.ObjectType.AnyObject;\n go.GeometryFilter = geometry_filter;\n go.GetMultiple(1, 0);\n if (go.CommandResult() != Rhino.Commands.Result.Success)\n return go.CommandResult();\n\n // Block base point\n Rhino.Geometry.Point3d base_point;\n var rc = Rhino.Input.RhinoGet.GetPoint(\"Block base point\", false, out base_point);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n // Block definition name\n string idef_name = \"\";\n rc = Rhino.Input.RhinoGet.GetString(\"Block definition name\", false, ref idef_name);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n // Validate block name\n idef_name = idef_name.Trim();\n if (string.IsNullOrEmpty(idef_name))\n return Rhino.Commands.Result.Nothing;\n\n // See if block name already exists\n Rhino.DocObjects.InstanceDefinition existing_idef = doc.InstanceDefinitions.Find(idef_name, true);\n if (existing_idef != null)\n {\n Rhino.RhinoApp.WriteLine(\"Block definition {0} already exists\", idef_name);\n return Rhino.Commands.Result.Nothing;\n }\n\n // Gather all of the selected objects\n var geometry = new System.Collections.Generic.List();\n var attributes = new System.Collections.Generic.List();\n for (int i = 0; i < go.ObjectCount; i++)\n {\n var rhinoObject = go.Object(i).Object();\n if (rhinoObject != null)\n {\n geometry.Add(rhinoObject.Geometry);\n attributes.Add(rhinoObject.Attributes);\n }\n }\n\n // Gather all of the selected objects\n int idef_index = doc.InstanceDefinitions.Add(idef_name, string.Empty, base_point, geometry, attributes);\n\n if( idef_index < 0 )\n {\n Rhino.RhinoApp.WriteLine(\"Unable to create block definition\", idef_name);\n return Rhino.Commands.Result.Failure;\n }\n return Rhino.Commands.Result.Failure;\n }\n}\n",
"members": [
["Rhino.Input.Custom.GetObject", "bool ReferenceObjectSelect"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "System.Int32 Add(System.String name, System.String description, Point3d basePoint, IEnumerable geometry, IEnumerable attributes)"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(System.String instanceDefinitionName, System.Boolean ignoreDeletedInstanceDefinitions)"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(System.String instanceDefinitionName)"]
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "int Add(string name, string description, Point3d basePoint, IEnumerable geometry, IEnumerable attributes)"],
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(string instanceDefinitionName, bool ignoreDeletedInstanceDefinitions)"],
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(string instanceDefinitionName)"]
]
},
{
@@ -384,7 +384,7 @@
["Rhino.Geometry.MeshingParameters", "MeshingParameters Minimal"],
["Rhino.Geometry.MeshingParameters", "MeshingParameters Smooth"],
["Rhino.Geometry.Mesh", "Mesh[] CreateFromBrep(Brep brep, MeshingParameters meshingParameters)"],
- ["Rhino.Geometry.Mesh", "System.Void Append(Mesh other)"]
+ ["Rhino.Geometry.Mesh", "void Append(Mesh other)"]
]
},
{
@@ -394,30 +394,30 @@
["Rhino.Geometry.NurbsSurface", "NurbsSurfaceKnotList KnotsU"],
["Rhino.Geometry.NurbsSurface", "NurbsSurfaceKnotList KnotsV"],
["Rhino.Geometry.NurbsSurface", "NurbsSurfacePointList Points"],
- ["Rhino.Geometry.NurbsSurface", "NurbsSurface Create(System.Int32 dimension, System.Boolean isRational, System.Int32 order0, System.Int32 order1, System.Int32 controlPointCount0, System.Int32 controlPointCount1)"]
+ ["Rhino.Geometry.NurbsSurface", "NurbsSurface Create(int dimension, bool isRational, int order0, int order1, int controlPointCount0, int controlPointCount1)"]
]
},
{
"name": "Crvdeviation.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.DocObjects;\nusing Rhino.Geometry;\nusing System.Drawing;\nusing Rhino.Input;\n\nnamespace examples_cs\n{\n class DeviationConduit : Rhino.Display.DisplayConduit\n {\n private readonly Curve m_curve_a;\n private readonly Curve m_curve_b;\n private readonly Point3d m_min_dist_point_a ;\n private readonly Point3d m_min_dist_point_b ;\n private readonly Point3d m_max_dist_point_a ;\n private readonly Point3d m_max_dist_point_b ;\n\n public DeviationConduit(Curve curveA, Curve curveB, Point3d minDistPointA, Point3d minDistPointB, Point3d maxDistPointA, Point3d maxDistPointB)\n {\n m_curve_a = curveA;\n m_curve_b = curveB;\n m_min_dist_point_a = minDistPointA;\n m_min_dist_point_b = minDistPointB;\n m_max_dist_point_a = maxDistPointA;\n m_max_dist_point_b = maxDistPointB;\n }\n\n protected override void DrawForeground(Rhino.Display.DrawEventArgs e)\n {\n e.Display.DrawCurve(m_curve_a, Color.Red);\n e.Display.DrawCurve(m_curve_b, Color.Red);\n\n e.Display.DrawPoint(m_min_dist_point_a, Color.LawnGreen);\n e.Display.DrawPoint(m_min_dist_point_b, Color.LawnGreen);\n e.Display.DrawLine(new Line(m_min_dist_point_a, m_min_dist_point_b), Color.LawnGreen);\n e.Display.DrawPoint(m_max_dist_point_a, Color.Red);\n e.Display.DrawPoint(m_max_dist_point_b, Color.Red);\n e.Display.DrawLine(new Line(m_max_dist_point_a, m_max_dist_point_b), Color.Red);\n }\n }\n\n\n public class CurveDeviationCommand : Command\n {\n public override string EnglishName { get { return \"csCurveDeviation\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n doc.Objects.UnselectAll();\n\n ObjRef obj_ref1;\n var rc1 = RhinoGet.GetOneObject(\"first curve\", true, ObjectType.Curve, out obj_ref1);\n if (rc1 != Result.Success)\n return rc1;\n Curve curve_a = null;\n if (obj_ref1 != null)\n curve_a = obj_ref1.Curve();\n if (curve_a == null)\n return Result.Failure;\n\n // Since you already selected a curve if you don't unselect it\n // the next GetOneObject won't stop as it considers that curve \n // input, i.e., curveA and curveB will point to the same curve.\n // Another option would be to use an instance of Rhino.Input.Custom.GetObject\n // instead of Rhino.Input.RhinoGet as GetObject has a DisablePreSelect() method.\n doc.Objects.UnselectAll();\n\n ObjRef obj_ref2;\n var rc2 = RhinoGet.GetOneObject(\"second curve\", true, ObjectType.Curve, out obj_ref2);\n if (rc2 != Result.Success)\n return rc2;\n Curve curve_b = null;\n if (obj_ref2 != null)\n curve_b = obj_ref2.Curve();\n if (curve_b == null)\n return Result.Failure;\n\n var tolerance = doc.ModelAbsoluteTolerance;\n\n double max_distance;\n double max_distance_parameter_a;\n double max_distance_parameter_b;\n double min_distance;\n double min_distance_parameter_a;\n double min_distance_parameter_b;\n\n DeviationConduit conduit;\n if (!Curve.GetDistancesBetweenCurves(curve_a, curve_b, tolerance, out max_distance, \n out max_distance_parameter_a, out max_distance_parameter_b,\n out min_distance, out min_distance_parameter_a, out min_distance_parameter_b))\n {\n RhinoApp.WriteLine(\"Unable to find overlap intervals.\");\n return Result.Success;\n }\n else\n {\n if (min_distance <= RhinoMath.ZeroTolerance)\n min_distance = 0.0;\n var max_dist_pt_a = curve_a.PointAt(max_distance_parameter_a);\n var max_dist_pt_b = curve_b.PointAt(max_distance_parameter_b);\n var min_dist_pt_a = curve_a.PointAt(min_distance_parameter_a);\n var min_dist_pt_b = curve_b.PointAt(min_distance_parameter_b);\n\n conduit = new DeviationConduit(curve_a, curve_b, min_dist_pt_a, min_dist_pt_b, max_dist_pt_a, max_dist_pt_b) {Enabled = true};\n doc.Views.Redraw();\n\n RhinoApp.WriteLine(\"Minimum deviation = {0} pointA({1}), pointB({2})\", min_distance, min_dist_pt_a, min_dist_pt_b);\n RhinoApp.WriteLine(\"Maximum deviation = {0} pointA({1}), pointB({2})\", max_distance, max_dist_pt_a, max_dist_pt_b);\n }\n\n var str = \"\";\n RhinoGet.GetString(\"Press Enter when done\", true, ref str);\n conduit.Enabled = false;\n\n return Result.Success;\n }\n }\n}\n",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean GetDistancesBetweenCurves(Curve curveA, Curve curveB, System.Double tolerance, out System.Double maxDistance, out System.Double maxDistanceParameterA, out System.Double maxDistanceParameterB, out System.Double minDistance, out System.Double minDistanceParameterA, out System.Double minDistanceParameterB)"],
- ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 UnselectAll()"]
+ ["Rhino.Geometry.Curve", "bool GetDistancesBetweenCurves(Curve curveA, Curve curveB, double tolerance, out double maxDistance, out double maxDistanceParameterA, out double maxDistanceParameterB, out double minDistance, out double minDistanceParameterA, out double minDistanceParameterB)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "int UnselectAll()"]
]
},
{
"name": "Curveboundingbox.cs",
"code": "partial class Examples\n{\n public static Rhino.Commands.Result CurveBoundingBox(Rhino.RhinoDoc doc)\n {\n // Select a curve object\n Rhino.DocObjects.ObjRef rhObject;\n var rc = Rhino.Input.RhinoGet.GetOneObject(\"Select curve\", false, Rhino.DocObjects.ObjectType.Curve, out rhObject);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n // Validate selection\n var curve = rhObject.Curve();\n if (curve == null)\n return Rhino.Commands.Result.Failure;\n\n // Get the active view's construction plane\n var view = doc.Views.ActiveView;\n if (view == null)\n return Rhino.Commands.Result.Failure;\n var plane = view.ActiveViewport.ConstructionPlane();\n\n // Compute the tight bounding box of the curve in world coordinates\n var bbox = curve.GetBoundingBox(true);\n if (!bbox.IsValid)\n return Rhino.Commands.Result.Failure;\n\n // Print the min and max box coordinates in world coordinates\n Rhino.RhinoApp.WriteLine(\"World min: {0}\", bbox.Min);\n Rhino.RhinoApp.WriteLine(\"World max: {0}\", bbox.Max);\n\n // Compute the tight bounding box of the curve based on the \n // active view's construction plane\n bbox = curve.GetBoundingBox(plane);\n\n // Print the min and max box coordinates in cplane coordinates\n Rhino.RhinoApp.WriteLine(\"CPlane min: {0}\", bbox.Min);\n Rhino.RhinoApp.WriteLine(\"CPlane max: {0}\", bbox.Max);\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
- ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(Plane plane)"],
- ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(System.Boolean accurate)"]
+ ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(bool accurate)"],
+ ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(Plane plane)"]
]
},
{
"name": "Curvebrepbox.cs",
"code": "using Rhino;\nusing Rhino.Geometry;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.DocObjects;\n\nnamespace examples_cs\n{\n public class BrepFromCurveBBoxCommand : Command\n {\n public override string EnglishName { get { return \"csBrepFromCurveBBox\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n Rhino.DocObjects.ObjRef objref;\n var rc = RhinoGet.GetOneObject(\"Select Curve\", false, ObjectType.Curve, out objref);\n if( rc != Result.Success )\n return rc;\n var curve = objref.Curve();\n\n var view = doc.Views.ActiveView;\n var plane = view.ActiveViewport.ConstructionPlane();\n // Create a construction plane aligned bounding box\n var bbox = curve.GetBoundingBox(plane);\n\n if (bbox.IsDegenerate(doc.ModelAbsoluteTolerance) > 0) {\n RhinoApp.WriteLine(\"the curve's bounding box is degenerate (flat) in at least one direction so a box cannot be created.\");\n return Result.Failure;\n }\n var brep = Brep.CreateFromBox(bbox);\n doc.Objects.AddBrep(brep);\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.BoundingBox", "System.Int32 IsDegenerate(System.Double tolerance)"],
+ ["Rhino.Geometry.BoundingBox", "int IsDegenerate(double tolerance)"],
["Rhino.Geometry.Brep", "Brep CreateFromBox(BoundingBox box)"]
]
},
@@ -426,15 +426,15 @@
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.DocObjects;\n\nnamespace examples_cs\n{\n public class ReverseCurveCommand : Command\n {\n public override string EnglishName { get { return \"csReverseCurve\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef[] obj_refs; \n var rc = RhinoGet.GetMultipleObjects(\"Select curves to reverse\", true, ObjectType.Curve, out obj_refs);\n if (rc != Result.Success)\n return rc;\n\n foreach (var obj_ref in obj_refs)\n {\n var curve_copy = obj_ref.Curve().DuplicateCurve();\n if (curve_copy != null)\n {\n curve_copy.Reverse();\n doc.Objects.Replace(obj_ref, curve_copy);\n }\n }\n return Result.Success;\n }\n }\n}",
"members": [
["Rhino.Geometry.Curve", "Curve DuplicateCurve()"],
- ["Rhino.Geometry.Curve", "System.Boolean Reverse()"]
+ ["Rhino.Geometry.Curve", "bool Reverse()"]
]
},
{
"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.DocObjects.Tables.ObjectTable", "int Select(IEnumerable objectIds)"],
+ ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, double tolerance, double overlapTolerance)"],
["Rhino.Geometry.Intersect.IntersectionEvent", "bool IsOverlap"]
]
},
@@ -442,15 +442,15 @@
"name": "Customgeometryfilter.cs",
"code": "using Rhino;\nusing Rhino.Geometry;\nusing Rhino.Commands;\nusing Rhino.Input.Custom;\nusing Rhino.DocObjects;\n\nnamespace examples_cs\n{\n public class CustomGeometryFilterCommand : Command\n {\n private double m_tolerance;\n public override string EnglishName { get { return \"csCustomGeometryFilter\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n m_tolerance = doc.ModelAbsoluteTolerance;\n \n // only use a custom geometry filter if no simpler filter does the job\n\n // only curves\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 if (null == gc.Object(0).Curve())\n return Result.Failure;\n Rhino.RhinoApp.WriteLine(\"curve was selected\");\n\n // only closed curves\n var gcc = new GetObject();\n gcc.SetCommandPrompt(\"select closed curve\");\n gcc.GeometryFilter = ObjectType.Curve;\n gcc.GeometryAttributeFilter = GeometryAttributeFilter.ClosedCurve;\n gcc.DisablePreSelect();\n gcc.SubObjectSelect = false;\n gcc.Get();\n if (gcc.CommandResult() != Result.Success)\n return gcc.CommandResult();\n if (null == gcc.Object(0).Curve())\n return Result.Failure;\n Rhino.RhinoApp.WriteLine(\"closed curve was selected\");\n\n // only circles with a radius of 10\n var gcc10 = new GetObject();\n gcc10.SetCommandPrompt(\"select circle with radius of 10\");\n gc.GeometryFilter = ObjectType.Curve;\n gcc10.SetCustomGeometryFilter(CircleWithRadiusOf10GeometryFilter); // custom geometry filter\n gcc10.DisablePreSelect();\n gcc10.SubObjectSelect = false;\n gcc10.Get();\n if (gcc10.CommandResult() != Result.Success)\n return gcc10.CommandResult();\n if (null == gcc10.Object(0).Curve())\n return Result.Failure;\n RhinoApp.WriteLine(\"circle with radius of 10 was selected\");\n\n return Result.Success;\n }\n\n private bool CircleWithRadiusOf10GeometryFilter (Rhino.DocObjects.RhinoObject rhObject, GeometryBase geometry,\n ComponentIndex componentIndex)\n {\n bool is_circle_with_radius_of10 = false;\n Circle circle;\n if (geometry is Curve && (geometry as Curve).TryGetCircle(out circle))\n is_circle_with_radius_of10 = circle.Radius <= 10.0 + m_tolerance && circle.Radius >= 10.0 - m_tolerance;\n return is_circle_with_radius_of10;\n }\n }\n}\n",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean TryGetCircle(out Circle circle)"],
- ["Rhino.Input.Custom.GetObject", "System.Void SetCustomGeometryFilter(GetObjectGeometryFilter filter)"]
+ ["Rhino.Geometry.Curve", "bool TryGetCircle(out Circle circle)"],
+ ["Rhino.Input.Custom.GetObject", "void SetCustomGeometryFilter(GetObjectGeometryFilter filter)"]
]
},
{
"name": "Customundo.cs",
"code": "using System;\nusing System.Runtime.InteropServices;\nusing Rhino;\n\n[Guid(\"954B8E21-51F2-4115-BD6B-DE67EE874C74\")]\npublic class ex_customundoCommand : Rhino.Commands.Command\n{\n public override string EnglishName { get { return \"cs_CustomUndoCommand\"; } }\n\n double MyFavoriteNumber { get; set; }\n\n protected override Rhino.Commands.Result RunCommand(RhinoDoc doc, Rhino.Commands.RunMode mode)\n {\n // Rhino automatically sets up an undo record when a command is run,\n // but... the undo record is not saved if nothing changes in the\n // document (objects added/deleted, layers changed,...)\n //\n // If we have a command that doesn't change things in the document,\n // but we want to have our own custom undo called then we need to do\n // a little extra work\n\n double d = MyFavoriteNumber;\n if (Rhino.Input.RhinoGet.GetNumber(\"Favorite number\", true, ref d) == Rhino.Commands.Result.Success)\n {\n double current_value = MyFavoriteNumber;\n doc.AddCustomUndoEvent(\"Favorite Number\", OnUndoFavoriteNumber, current_value);\n MyFavoriteNumber = d;\n }\n return Rhino.Commands.Result.Success;\n }\n\n // event handler for custom undo\n void OnUndoFavoriteNumber(object sender, Rhino.Commands.CustomUndoEventArgs e)\n {\n // !!!!!!!!!!\n // NEVER change any setting in the Rhino document or application. Rhino\n // handles ALL changes to the application and document and you will break\n // the Undo/Redo commands if you make any changes to the application or\n // document. This is meant only for your own private plug-in data\n // !!!!!!!!!!\n\n // This function can be called either by undo or redo\n // In order to get redo to work, add another custom undo event with the\n // current value. If you don't want redo to work, just skip adding\n // a custom undo event here\n double current_value = MyFavoriteNumber;\n e.Document.AddCustomUndoEvent(\"Favorite Number\", OnUndoFavoriteNumber, current_value);\n\n double old_value = (double)e.Tag;\n RhinoApp.WriteLine(\"Going back to your favorite = {0}\", old_value);\n MyFavoriteNumber = old_value;\n }\n}\n",
"members": [
- ["Rhino.RhinoDoc", "System.Boolean AddCustomUndoEvent(System.String description, EventHandler handler, System.Object tag)"]
+ ["Rhino.RhinoDoc", "bool AddCustomUndoEvent(string description, EventHandler handler, object tag)"]
]
},
{
@@ -480,32 +480,32 @@
"name": "Dividebylength.cs",
"code": "using Rhino.DocObjects;\n\npartial class Examples\n{\n public static Rhino.Commands.Result DivideByLengthPoints(Rhino.RhinoDoc doc)\n {\n const ObjectType filter = Rhino.DocObjects.ObjectType.Curve; \n Rhino.DocObjects.ObjRef objref;\n Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetOneObject(\"Select curve to divide\", false, filter, out objref);\n if (rc != Rhino.Commands.Result.Success || objref == null)\n return rc;\n\n Rhino.Geometry.Curve crv = objref.Curve();\n if (crv == null || crv.IsShort(Rhino.RhinoMath.ZeroTolerance))\n return Rhino.Commands.Result.Failure;\n\n double crv_length = crv.GetLength();\n string s = string.Format(\"Curve length is {0:f3}. Segment length\", crv_length);\n\n double seg_length = crv_length / 2.0;\n rc = Rhino.Input.RhinoGet.GetNumber(s, false, ref seg_length, 0, crv_length);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n\n Rhino.Geometry.Point3d[] points;\n crv.DivideByLength(seg_length, true, out points);\n if (points == null)\n return Rhino.Commands.Result.Failure;\n\n foreach (Rhino.Geometry.Point3d point in points)\n doc.Objects.AddPoint(point);\n\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
- ["Rhino.Geometry.Curve", "Curve[] JoinCurves(IEnumerable inputCurves, System.Double joinTolerance)"],
- ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, out Point3d[] points)"],
- ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, System.Boolean reverse, out Point3d[] points)"],
- ["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.Geometry.Curve", "Curve[] JoinCurves(IEnumerable inputCurves, double joinTolerance)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, bool reverse, out Point3d[] points)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, bool reverse)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, out Point3d[] points)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds)"],
+ ["Rhino.Geometry.Curve", "bool IsShort(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.DocObjects.Tables.ObjectTable", "bool Select(System.Guid objectId)"],
+ ["Rhino.Input.RhinoGet", "Result GetNumber(string prompt, bool acceptNothing, ref double outputNumber, double lowerLimit, double upperLimit)"],
+ ["Rhino.Input.RhinoGet", "Result GetNumber(string prompt, bool acceptNothing, ref double outputNumber)"],
+ ["Rhino.Input.RhinoGet", "Result GetOneObject(string prompt, bool acceptNothing, ObjectType filter, out ObjRef rhObject)"]
]
},
{
"name": "Drawstring.cs",
"code": "using Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Geometry;\nusing Rhino.Commands;\nusing Rhino.Input.Custom;\n\nnamespace examples_cs\n{\n public class DrawStringCommand : Command\n {\n public override string EnglishName { get { return \"csDrawString\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var gp = new GetDrawStringPoint();\n gp.SetCommandPrompt(\"Point\");\n gp.Get();\n return gp.CommandResult();\n }\n }\n\n public class GetDrawStringPoint : GetPoint\n {\n protected override void OnDynamicDraw(GetPointDrawEventArgs e)\n {\n base.OnDynamicDraw(e);\n var xform = e.Viewport.GetTransform(CoordinateSystem.World, CoordinateSystem.Screen);\n var current_point = e.CurrentPoint;\n current_point.Transform(xform);\n var screen_point = new Point2d(current_point.X, current_point.Y);\n var msg = string.Format(\"screen {0:F}, {1:F}\", current_point.X, current_point.Y);\n e.Display.Draw2dText(msg, System.Drawing.Color.Blue, screen_point, false);\n }\n }\n}",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void Draw2dText(System.String text, System.Drawing.Color color, Point2d screenCoordinate, System.Boolean middleJustified)"]
+ ["Rhino.Display.DisplayPipeline", "void Draw2dText(string text, System.Drawing.Color color, Point2d screenCoordinate, bool middleJustified)"]
]
},
{
"name": "Dupborder.cs",
"code": "using System;\nusing Rhino.DocObjects;\n\npartial class Examples\n{\n public static Rhino.Commands.Result DupBorder(Rhino.RhinoDoc doc)\n {\n const ObjectType filter = Rhino.DocObjects.ObjectType.Surface | Rhino.DocObjects.ObjectType.PolysrfFilter;\n Rhino.DocObjects.ObjRef objref;\n Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetOneObject(\"Select surface or polysurface\", false, filter, out objref);\n if (rc != Rhino.Commands.Result.Success || objref == null)\n return rc;\n\n Rhino.DocObjects.RhinoObject rhobj = objref.Object();\n Rhino.Geometry.Brep brep = objref.Brep();\n if (rhobj == null || brep == null)\n return Rhino.Commands.Result.Failure;\n\n rhobj.Select(false);\n Rhino.Geometry.Curve[] curves = brep.DuplicateEdgeCurves(true);\n double tol = doc.ModelAbsoluteTolerance * 2.1;\n curves = Rhino.Geometry.Curve.JoinCurves(curves, tol);\n for (int i = 0; i < curves.Length; i++)\n {\n Guid id = doc.Objects.AddCurve(curves[i]);\n doc.Objects.Select(id);\n }\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
- ["Rhino.Geometry.Brep", "Curve[] DuplicateEdgeCurves(System.Boolean nakedOnly)"]
+ ["Rhino.Geometry.Brep", "Curve[] DuplicateEdgeCurves(bool nakedOnly)"]
]
},
{
@@ -534,7 +534,7 @@
"code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Rhino;\nusing Rhino.Commands;\nusing Rhino.Geometry;\nusing Rhino.Geometry.Intersect;\nusing Rhino.Input;\nusing Rhino.Input.Custom;\nusing Rhino.DocObjects;\n\nnamespace examples_cs\n{\n public class FurthestZOnSurfaceCommand : Command\n {\n public override string EnglishName { get { return \"csFurthestZOnSurfaceGivenXY\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n #region user input\n // select a surface\n var gs = new GetObject();\n gs.SetCommandPrompt(\"select surface\");\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 // get the brep\n var brep = gs.Object(0).Brep();\n if (brep == null)\n return Result.Failure;\n\n // get X and Y\n double x = 0.0, y = 0.0;\n var rc = RhinoGet.GetNumber(\"value of X coordinate\", true, ref x);\n if (rc != Result.Success)\n return rc;\n rc = RhinoGet.GetNumber(\"value of Y coordinate\", true, ref y);\n if (rc != Result.Success)\n return rc;\n #endregion\n \n // an earlier version of this sample used a curve-brep intersection to find Z\n //var maxZ = maxZIntersectionMethod(brep, x, y, doc.ModelAbsoluteTolerance);\n\n // projecting points is another way to find Z\n var max_z = MaxZProjectionMethod(brep, x, y, doc.ModelAbsoluteTolerance);\n\n if (max_z != null)\n {\n RhinoApp.WriteLine(\"Maximum surface Z coordinate at X={0}, Y={1} is {2}\", x, y, max_z);\n doc.Objects.AddPoint(new Point3d(x, y, max_z.Value));\n doc.Views.Redraw();\n }\n else\n RhinoApp.WriteLine(\"no maximum surface Z coordinate at X={0}, Y={1} found.\", x, y);\n\n return Result.Success;\n }\n\n private static double? MaxZProjectionMethod(Brep brep, double x, double y, double tolerance)\n {\n double? max_z = null;\n var breps = new List {brep};\n var points = new List {new Point3d(x, y, 0)};\n // grab all the points projected in Z dir. Aggregate finds furthest Z from XY plane\n try {\n max_z = (from pt in Intersection.ProjectPointsToBreps(breps, points, new Vector3d(0, 0, 1), tolerance) select pt.Z)\n // Here you might be tempted to use .Max() to get the largest Z value but that doesn't work because\n // Z might be negative. This custom aggregate returns the max Z independant of the sign. If it had a name\n // it could be MaxAbs()\n .Aggregate((z1, z2) => Math.Abs(z1) > Math.Abs(z2) ? z1 : z2);\n } catch (InvalidOperationException) {/*Sequence contains no elements*/}\n return max_z;\n }\n\n private double? MaxZIntersectionMethod(Brep brep, double x, double y, double tolerance)\n {\n double? max_z = null;\n\n var bbox = brep.GetBoundingBox(true);\n var max_dist_from_xy = (from corner in bbox.GetCorners() select corner.Z)\n // furthest Z from XY plane.\n // Here you might be tempted to use .Max() to get the largest Z value but that doesn't work because\n // Z might be negative. This custom aggregate returns the max Z independant of the sign. If it had a name\n // it could be MaxAbs()\n .Aggregate((z1, z2) => Math.Abs(z1) > Math.Abs(z2) ? z1 : z2);\n // multiply distance by 2 to make sure line intersects completely\n var line_curve = new LineCurve(new Point3d(x, y, 0), new Point3d(x, y, max_dist_from_xy*2));\n\n Curve[] overlap_curves;\n Point3d[] inter_points;\n if (Intersection.CurveBrep(line_curve, brep, tolerance, out overlap_curves, out inter_points))\n {\n if (overlap_curves.Length > 0 || inter_points.Length > 0)\n {\n // grab all the points resulting frem the intersection. \n // 1st set: points from overlapping curves, \n // 2nd set: points when there was no overlap\n // .Aggregate: furthest Z from XY plane.\n max_z = (from c in overlap_curves select Math.Abs(c.PointAtEnd.Z) > Math.Abs(c.PointAtStart.Z) ? c.PointAtEnd.Z : c.PointAtStart.Z)\n .Union\n (from p in inter_points select p.Z)\n // Here you might be tempted to use .Max() to get the largest Z value but that doesn't work because\n // Z might be negative. This custom aggregate returns the max Z independant of the sign. If it had a name\n // it could be MaxAbs()\n .Aggregate((z1, z2) => Math.Abs(z1) > Math.Abs(z2) ? z1 : z2);\n }\n }\n return max_z;\n }\n }\n}",
"members": [
["Rhino.Geometry.BoundingBox", "Point3d[] GetCorners()"],
- ["Rhino.Geometry.Intersect.Intersection", "System.Boolean CurveBrep(Curve curve, Brep brep, System.Double tolerance, out Curve[] overlapCurves, out Point3d[] intersectionPoints)"]
+ ["Rhino.Geometry.Intersect.Intersection", "bool CurveBrep(Curve curve, Brep brep, double tolerance, out Curve[] overlapCurves, out Point3d[] intersectionPoints)"]
]
},
{
@@ -542,7 +542,7 @@
"code": "using Rhino;\nusing Rhino.Input.Custom;\nusing Rhino.DocObjects;\nusing Rhino.Commands;\n\nnamespace examples_cs\n{\n public class NormalDirectionOfBrepFaceCommand : Command\n {\n public override string EnglishName { get { return \"csDetermineNormalDirectionOfBrepFace\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n // select a surface\n var gs = new GetObject();\n gs.SetCommandPrompt(\"select surface\");\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 // get the selected face\n var face = gs.Object(0).Face();\n if (face == null)\n return Result.Failure;\n\n // pick a point on the surface. Constain\n // picking to the face.\n var gp = new GetPoint();\n gp.SetCommandPrompt(\"select point on surface\");\n gp.Constrain(face, false);\n gp.Get();\n if (gp.CommandResult() != Result.Success)\n return gp.CommandResult();\n\n // get the parameters of the point on the\n // surface that is clesest to gp.Point()\n double u, v;\n if (face.ClosestPoint(gp.Point(), out u, out v))\n {\n var direction = face.NormalAt(u, v);\n if (face.OrientationIsReversed)\n direction.Reverse();\n RhinoApp.WriteLine(\n string.Format(\n \"Surface normal at uv({0:f},{1:f}) = ({2:f},{3:f},{4:f})\", \n u, v, direction.X, direction.Y, direction.Z));\n }\n return Result.Success;\n }\n }\n}",
"members": [
["Rhino.Geometry.BrepFace", "bool OrientationIsReversed"],
- ["Rhino.Geometry.Surface", "Vector3d NormalAt(System.Double u, System.Double v)"]
+ ["Rhino.Geometry.Surface", "Vector3d NormalAt(double u, double v)"]
]
},
{
@@ -564,22 +564,22 @@
"name": "Extractisocurve.cs",
"code": "using Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.Input.Custom;\nusing Rhino.Geometry;\n\nnamespace examples_cs\n{\n public class ExtractIsocurveCommand : Rhino.Commands.Command\n {\n public override string EnglishName\n {\n get { return \"csExtractIsocurve\"; }\n }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\"Select surface\", false, ObjectType.Surface, out obj_ref);\n if (rc != Result.Success || obj_ref == null)\n return rc;\n var surface = obj_ref.Surface();\n\n var gp = new GetPoint();\n gp.SetCommandPrompt(\"Point on surface\");\n gp.Constrain(surface, false);\n var option_toggle = new OptionToggle(false, \"U\", \"V\");\n gp.AddOptionToggle(\"Direction\", ref option_toggle);\n Point3d point = Point3d.Unset;\n while (true)\n {\n var grc = gp.Get();\n if (grc == GetResult.Option)\n continue;\n else if (grc == GetResult.Point)\n {\n point = gp.Point();\n break;\n }\n else\n return Result.Nothing;\n }\n if (point == Point3d.Unset)\n return Result.Nothing;\n\n int direction = option_toggle.CurrentValue ? 1 : 0; // V : U\n double u_parameter, v_parameter;\n if (!surface.ClosestPoint(point, out u_parameter, out v_parameter)) return Result.Failure;\n\n var iso_curve = surface.IsoCurve(direction, direction == 1 ? u_parameter : v_parameter);\n if (iso_curve == null) return Result.Failure;\n\n doc.Objects.AddCurve(iso_curve);\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Surface", "Curve IsoCurve(System.Int32 direction, System.Double constantParameter)"]
+ ["Rhino.Geometry.Surface", "Curve IsoCurve(int direction, double constantParameter)"]
]
},
{
"name": "Extractthumbnail.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.Input.Custom;\nusing System;\nusing System.Windows;\nusing System.Windows.Controls;\n\nnamespace examples_cs\n{\n public class ExtractThumbnailCommand : Command\n {\n public override string EnglishName { get { return \"csExtractThumbnail\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var gf = RhinoGet.GetFileName(GetFileNameMode.OpenImage, \"*.3dm\", \"select file\", null);\n if (gf == string.Empty || !System.IO.File.Exists(gf))\n return Result.Cancel;\n\n var bitmap = Rhino.FileIO.File3dm.ReadPreviewImage(gf);\n // convert System.Drawing.Bitmap to BitmapSource\n var image_source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(bitmap.GetHbitmap(), IntPtr.Zero,\n Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());\n\n // show in WPF window\n var window = new Window();\n var image = new Image {Source = image_source};\n window.Content = image;\n window.Show();\n\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Input.RhinoGet", "System.String GetFileName(GetFileNameMode mode, System.String defaultName, System.String title, System.Object parent, BitmapFileTypes fileTypes)"],
- ["Rhino.Input.RhinoGet", "System.String GetFileName(GetFileNameMode mode, System.String defaultName, System.String title, System.Object parent)"]
+ ["Rhino.Input.RhinoGet", "string GetFileName(GetFileNameMode mode, string defaultName, string title, object parent, BitmapFileTypes fileTypes)"],
+ ["Rhino.Input.RhinoGet", "string GetFileName(GetFileNameMode mode, string defaultName, string title, object parent)"]
]
},
{
"name": "Filletcurves.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Geometry;\nusing Rhino.Input;\nusing Rhino.DocObjects;\nusing Rhino.Input.Custom;\n\nnamespace examples_cs\n{\n public class FilletCurvesCommand : Command\n {\n public override string EnglishName { get { return \"csFilletCurves\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var gc1 = new GetObject();\n gc1.DisablePreSelect();\n gc1.SetCommandPrompt(\"Select first curve to fillet (close to the end you want to fillet)\");\n gc1.GeometryFilter = ObjectType.Curve;\n gc1.GeometryAttributeFilter = GeometryAttributeFilter.OpenCurve;\n gc1.Get();\n if (gc1.CommandResult() != Result.Success)\n return gc1.CommandResult();\n var curve1_obj_ref = gc1.Object(0);\n var curve1 = curve1_obj_ref.Curve();\n if (curve1 == null) return Result.Failure;\n var curve1_point_near_end = curve1_obj_ref.SelectionPoint();\n if (curve1_point_near_end == Point3d.Unset)\n return Result.Failure;\n\n var gc2 = new GetObject();\n gc2.DisablePreSelect();\n gc2.SetCommandPrompt(\"Select second curve to fillet (close to the end you want to fillet)\");\n gc2.GeometryFilter = ObjectType.Curve;\n gc2.GeometryAttributeFilter = GeometryAttributeFilter.OpenCurve;\n gc2.Get();\n if (gc2.CommandResult() != Result.Success)\n return gc2.CommandResult();\n var curve2_obj_ref = gc2.Object(0);\n var curve2 = curve2_obj_ref.Curve();\n if (curve2 == null) return Result.Failure;\n var curve2_point_near_end = curve2_obj_ref.SelectionPoint();\n if (curve2_point_near_end == Point3d.Unset)\n return Result.Failure;\n\n double radius = 0;\n var rc = RhinoGet.GetNumber(\"fillet radius\", false, ref radius);\n if (rc != Result.Success) return rc;\n\n var join = false;\n var trim = true;\n var arc_extension = true;\n var fillet_curves = Curve.CreateFilletCurves(curve1, curve1_point_near_end, curve2, curve2_point_near_end, radius,\n join, trim, arc_extension, doc.ModelAbsoluteTolerance, doc.ModelAngleToleranceDegrees);\n if (fillet_curves == null /*|| fillet_curves.Length != 3*/)\n return Result.Failure;\n\n foreach(var fillet_curve in fillet_curves)\n doc.Objects.AddCurve(fillet_curve);\n doc.Views.Redraw();\n return rc;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Curve", "Curve[] CreateFilletCurves(Curve curve0, Point3d point0, Curve curve1, Point3d point1, System.Double radius, System.Boolean join, System.Boolean trim, System.Boolean arcExtension, System.Double tolerance, System.Double angleTolerance)"]
+ ["Rhino.Geometry.Curve", "Curve[] CreateFilletCurves(Curve curve0, Point3d point0, Curve curve1, Point3d point1, double radius, bool join, bool trim, bool arcExtension, double tolerance, double angleTolerance)"]
]
},
{
@@ -594,8 +594,8 @@
"name": "Getpointdynamicdraw.cs",
"code": "using Rhino;\nusing Rhino.Geometry;\nusing Rhino.Commands;\nusing Rhino.Input.Custom;\n\nnamespace examples_cs\n{\n public class GetPointDynamicDrawCommand : Command\n {\n public override string EnglishName { get { return \"csGetPointDynamicDraw\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var gp = new GetPoint();\n gp.SetCommandPrompt(\"Center point\");\n gp.Get();\n if (gp.CommandResult() != Result.Success)\n return gp.CommandResult();\n var center_point = gp.Point();\n if (center_point == Point3d.Unset)\n return Result.Failure;\n\n var gcp = new GetCircleRadiusPoint(center_point);\n gcp.SetCommandPrompt(\"Radius\");\n gcp.ConstrainToConstructionPlane(false);\n gcp.SetBasePoint(center_point, true);\n gcp.DrawLineFromPoint(center_point, true);\n gcp.Get();\n if (gcp.CommandResult() != Result.Success)\n return gcp.CommandResult();\n\n var radius = center_point.DistanceTo(gcp.Point());\n var cplane = doc.Views.ActiveView.ActiveViewport.ConstructionPlane();\n doc.Objects.AddCircle(new Circle(cplane, center_point, radius));\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n\n public class GetCircleRadiusPoint : GetPoint\n {\n private Point3d m_center_point;\n \n public GetCircleRadiusPoint(Point3d centerPoint)\n {\n m_center_point = centerPoint;\n }\n\n protected override void OnDynamicDraw(GetPointDrawEventArgs e)\n {\n base.OnDynamicDraw(e);\n var cplane = e.RhinoDoc.Views.ActiveView.ActiveViewport.ConstructionPlane();\n var radius = m_center_point.DistanceTo(e.CurrentPoint);\n var circle = new Circle(cplane, m_center_point, radius);\n e.Display.DrawCircle(circle, System.Drawing.Color.Black);\n }\n }\n}",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawCircle(Circle circle, System.Drawing.Color color)"],
- ["Rhino.Input.Custom.GetPoint", "System.Void OnDynamicDraw(GetPointDrawEventArgs e)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawCircle(Circle circle, System.Drawing.Color color)"],
+ ["Rhino.Input.Custom.GetPoint", "void OnDynamicDraw(GetPointDrawEventArgs e)"]
]
},
{
@@ -611,11 +611,11 @@
"members": [
["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"],
["Rhino.DocObjects.ModelComponent", "string Name"],
- ["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.Geometry.Hatch", "Hatch[] Create(Curve curve, int hatchPatternIndex, double rotationRadians, double scale, double tolerance)"],
+ ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, int hatchPatternIndex, double rotationRadians, double scale)"],
["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.HatchPatternTable", "int Find(string name, bool ignoreDeleted)"],
+ ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(string name)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"]
]
},
@@ -623,10 +623,10 @@
"name": "Insertknot.cs",
"code": "using Rhino.Commands;\nusing Rhino.DocObjects;\n\npartial class Examples\n{\n public static Rhino.Commands.Result InsertKnot(Rhino.RhinoDoc doc)\n {\n const ObjectType filter = Rhino.DocObjects.ObjectType.Curve;\n Rhino.DocObjects.ObjRef objref;\n Result rc = Rhino.Input.RhinoGet.GetOneObject(\"Select curve for knot insertion\", false, filter, out objref);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n Rhino.Geometry.Curve curve = objref.Curve();\n if (null == curve)\n return Rhino.Commands.Result.Failure;\n Rhino.Geometry.NurbsCurve nurb = curve.ToNurbsCurve();\n if (null == nurb)\n return Rhino.Commands.Result.Failure;\n\n Rhino.Input.Custom.GetPoint gp = new Rhino.Input.Custom.GetPoint();\n gp.SetCommandPrompt(\"Point on curve to add knot\");\n gp.Constrain(nurb, false);\n gp.Get();\n if (gp.CommandResult() == Rhino.Commands.Result.Success)\n {\n double t;\n Rhino.Geometry.Curve crv = gp.PointOnCurve(out t);\n if( crv!=null && nurb.Knots.InsertKnot(t) )\n {\n doc.Objects.Replace(objref, nurb);\n doc.Views.Redraw();\n }\n }\n return Rhino.Commands.Result.Success; \n }\n}\n",
"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.Input.Custom.GetPoint", "bool Constrain(Curve curve, bool allowPickingPointOffObject)"],
+ ["Rhino.Input.Custom.GetPoint", "Curve PointOnCurve(out double t)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "bool Replace(ObjRef objref, Curve curve)"],
+ ["Rhino.Geometry.Collections.NurbsCurveKnotList", "bool InsertKnot(double value)"]
]
},
{
@@ -642,16 +642,16 @@
"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.DocObjects.ObjRef", "Curve Curve()"],
- ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"],
- ["Rhino.Geometry.Point3f", "System.Double DistanceTo(Point3f other)"],
- ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, System.Double tolerance, System.Double overlapTolerance)"]
+ ["Rhino.Geometry.Point3d", "double DistanceTo(Point3d other)"],
+ ["Rhino.Geometry.Point3f", "double DistanceTo(Point3f other)"],
+ ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, double tolerance, double overlapTolerance)"]
]
},
{
"name": "Intersectlinecircle.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.Geometry;\nusing Rhino.Geometry.Intersect;\n\nnamespace examples_cs\n{\n public class IntersectLineCircleCommand : Command\n {\n public override string EnglishName { get { return \"csIntersectLineCircle\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n Circle circle;\n var rc = RhinoGet.GetCircle(out circle);\n if (rc != Result.Success)\n return rc;\n doc.Objects.AddCircle(circle);\n doc.Views.Redraw();\n\n Line line;\n rc = RhinoGet.GetLine(out line);\n if (rc != Result.Success)\n return rc;\n doc.Objects.AddLine(line);\n doc.Views.Redraw();\n\n double t1, t2;\n Point3d point1, point2;\n var line_circle_intersect = Intersection.LineCircle(line, circle, out t1, out point1, out t2, out point2);\n string msg = \"\";\n switch (line_circle_intersect) {\n case LineCircleIntersection.None:\n msg = \"line does not intersect circle\";\n break;\n case LineCircleIntersection.Single:\n msg = string.Format(\"line intersects circle at point ({0})\", point1);\n doc.Objects.AddPoint(point1);\n break;\n case LineCircleIntersection.Multiple:\n msg = string.Format(\"line intersects circle at points ({0}) and ({1})\",\n point1, point2);\n doc.Objects.AddPoint(point1);\n doc.Objects.AddPoint(point2);\n break;\n }\n RhinoApp.WriteLine(msg);\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "LineCircleIntersection LineCircle(Line line, Circle circle, out System.Double t1, out Point3d point1, out System.Double t2, out Point3d point2)"]
+ ["Rhino.Geometry.Intersect.Intersection", "LineCircleIntersection LineCircle(Line line, Circle circle, out double t1, out Point3d point1, out double t2, out Point3d point2)"]
]
},
{
@@ -659,9 +659,9 @@
"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.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)"]
+ ["Rhino.Geometry.Line", "Point3d PointAt(double t)"],
+ ["Rhino.Geometry.Vector3d", "int IsParallelTo(Vector3d other)"],
+ ["Rhino.Geometry.Intersect.Intersection", "bool LineLine(Line lineA, Line lineB, out double a, out double b)"]
]
},
{
@@ -669,7 +669,7 @@
"code": "using System;\n\npartial class Examples\n{\n public static bool IsBrepBox(Rhino.Geometry.Brep brep)\n {\n const double zero_tolerance = 1.0e-6; // or whatever\n bool rc = brep.IsSolid;\n if( rc )\n rc = brep.Faces.Count == 6;\n\n var N = new Rhino.Geometry.Vector3d[6];\n for (int i = 0; rc && i < 6; i++)\n {\n Rhino.Geometry.Plane plane;\n rc = brep.Faces[i].TryGetPlane(out plane, zero_tolerance);\n if( rc )\n {\n N[i] = plane.ZAxis;\n N[i].Unitize();\n }\n }\n \n for (int i = 0; rc && i < 6; i++)\n {\n int count = 0;\n for (int j = 0; rc && j < 6; j++)\n {\n double dot = Math.Abs(N[i] * N[j]);\n if (dot <= zero_tolerance)\n continue;\n if (Math.Abs(dot - 1.0) <= zero_tolerance) \n count++;\n else\n rc = false;\n }\n \n if (rc)\n {\n if (2 != count)\n rc = false;\n }\n }\n return rc;\n }\n\n public static Rhino.Commands.Result TestBrepBox(Rhino.RhinoDoc doc)\n {\n Rhino.DocObjects.ObjRef obj_ref;\n var rc = Rhino.Input.RhinoGet.GetOneObject(\"Select Brep\", true, Rhino.DocObjects.ObjectType.Brep, out obj_ref);\n if (rc == Rhino.Commands.Result.Success)\n {\n var brep = obj_ref.Brep();\n if (brep != null)\n {\n Rhino.RhinoApp.WriteLine(IsBrepBox(brep) ? \"Yes it is a box\" : \"No it is not a box\");\n }\n }\n return rc;\n }\n}\n",
"members": [
["Rhino.Geometry.Brep", "bool IsSolid"],
- ["Rhino.Geometry.Surface", "System.Boolean TryGetPlane(out Plane plane, System.Double tolerance)"]
+ ["Rhino.Geometry.Surface", "bool TryGetPlane(out Plane plane, double tolerance)"]
]
},
{
@@ -683,15 +683,15 @@
"name": "Issurfaceinplane.cs",
"code": "using System.Linq;\nusing Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Geometry;\nusing Rhino.Commands;\nusing Rhino.Input;\n\nnamespace examples_cs\n{\n public class IsPlanarSurfaceInPlaneCommand : Command\n {\n public override string EnglishName { get { return \"csIsPlanarSurfaceInPlane\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\"select surface\", true, ObjectType.Surface, out obj_ref);\n if (rc != Result.Success)\n return rc;\n var surface = obj_ref.Surface();\n\n Point3d[] corners;\n rc = RhinoGet.GetRectangle(out corners);\n if (rc != Result.Success)\n return rc;\n\n var plane = new Plane(corners[0], corners[1], corners[2]);\n\n var is_or_isnt = \"\";\n if (IsSurfaceInPlane(surface, plane, doc.ModelAbsoluteTolerance))\n is_or_isnt = \" not \";\n\n RhinoApp.WriteLine(\"Surface is{0} in plane.\", is_or_isnt);\n return Result.Success;\n }\n\n private bool IsSurfaceInPlane(Surface surface, Plane plane, double tolerance)\n {\n if (!surface.IsPlanar(tolerance))\n return false;\n \n var bbox = surface.GetBoundingBox(true);\n return bbox.GetCorners().All(\n corner => System.Math.Abs(plane.DistanceTo(corner)) <= tolerance);\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Plane", "System.Double DistanceTo(Point3d testPoint)"],
- ["Rhino.Geometry.Surface", "System.Boolean IsPlanar()"]
+ ["Rhino.Geometry.Plane", "double DistanceTo(Point3d testPoint)"],
+ ["Rhino.Geometry.Surface", "bool IsPlanar()"]
]
},
{
"name": "Leader.cs",
"code": "using Rhino;\nusing Rhino.Geometry;\nusing Rhino.Commands;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace examples_cs\n{\n public class LeaderCommand : Command\n {\n public override string EnglishName { get { return \"csLeader\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var points = new Point3d[]\n {\n new Point3d(1, 1, 0),\n new Point3d(5, 1, 0),\n new Point3d(5, 5, 0),\n new Point3d(9, 5, 0)\n };\n\n var xy_plane = Plane.WorldXY;\n\n var points2d = new List();\n foreach (var point3d in points)\n {\n double x, y;\n if (xy_plane.ClosestParameter(point3d, out x, out y))\n {\n var point2d = new Point2d(x, y);\n if (points2d.Count < 1 || point2d.DistanceTo(points2d.Last()) > RhinoMath.SqrtEpsilon)\n points2d.Add(point2d);\n }\n }\n\n doc.Objects.AddLeader(xy_plane, points2d);\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Point2d", "System.Double DistanceTo(Point2d other)"],
+ ["Rhino.Geometry.Point2d", "double DistanceTo(Point2d other)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLeader(Plane plane, IEnumerable points)"]
]
},
@@ -701,32 +701,32 @@
"members": [
["Rhino.DocObjects.Layer", "string FullPath"],
["Rhino.DocObjects.Layer", "bool IsLocked"],
- ["Rhino.DocObjects.Layer", "System.Boolean CommitChanges()"]
+ ["Rhino.DocObjects.Layer", "bool CommitChanges()"]
]
},
{
"name": "Loft.cs",
"code": "using System.Linq;\nusing Rhino;\nusing Rhino.Input.Custom;\nusing Rhino.DocObjects;\nusing Rhino.Commands;\nusing Rhino.Geometry;\n\nnamespace examples_cs\n{\n public class LoftCommand : Command\n {\n public override string EnglishName { get { return \"csLoft\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n // select curves to loft\n var gs = new GetObject();\n gs.SetCommandPrompt(\"select curves to loft\");\n gs.GeometryFilter = ObjectType.Curve;\n gs.DisablePreSelect();\n gs.SubObjectSelect = false;\n gs.GetMultiple(2, 0);\n if (gs.CommandResult() != Result.Success)\n return gs.CommandResult();\n\n var curves = gs.Objects().Select(obj => obj.Curve()).ToList();\n\n var breps = Brep.CreateFromLoft(curves, Point3d.Unset, Point3d.Unset, LoftType.Tight, false);\n foreach (var brep in breps)\n doc.Objects.AddBrep(brep);\n\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Brep", "Brep[] CreateFromLoft(IEnumerable curves, Point3d start, Point3d end, LoftType loftType, System.Boolean closed)"]
+ ["Rhino.Geometry.Brep", "Brep[] CreateFromLoft(IEnumerable curves, Point3d start, Point3d end, LoftType loftType, bool closed)"]
]
},
{
"name": "Makerhinocontours.cs",
"code": "using System;\nusing Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Geometry;\nusing Rhino.Input;\nusing Rhino.Input.Custom;\nusing Rhino.Commands;\n\nnamespace examples_cs\n{\n public class ContourCommand : Command\n {\n public override string EnglishName { get { return \"csContour\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var filter = ObjectType.Surface | ObjectType.PolysrfFilter | ObjectType.Mesh;\n ObjRef[] obj_refs;\n var rc = RhinoGet.GetMultipleObjects(\"Select objects to contour\", false, filter, out obj_refs);\n if (rc != Result.Success)\n return rc;\n\n var gp = new GetPoint();\n gp.SetCommandPrompt(\"Contour plane base point\");\n gp.Get();\n if (gp.CommandResult() != Result.Success)\n return gp.CommandResult();\n var base_point = gp.Point();\n\n gp.DrawLineFromPoint(base_point, true);\n gp.SetCommandPrompt(\"Direction perpendicular to contour planes\");\n gp.Get();\n if (gp.CommandResult() != Result.Success)\n return gp.CommandResult();\n var end_point = gp.Point();\n\n if (base_point.DistanceTo(end_point) < RhinoMath.ZeroTolerance)\n return Result.Nothing;\n\n double distance = 1.0;\n rc = RhinoGet.GetNumber(\"Distance between contours\", false, ref distance);\n if (rc != Result.Success)\n return rc;\n\n var interval = Math.Abs(distance);\n\n Curve[] curves = null;\n foreach (var obj_ref in obj_refs)\n {\n var geometry = obj_ref.Geometry();\n if (geometry == null)\n return Result.Failure;\n\n if (geometry is Brep)\n {\n curves = Brep.CreateContourCurves(geometry as Brep, base_point, end_point, interval);\n }\n else\n {\n curves = Mesh.CreateContourCurves(geometry as Mesh, base_point, end_point, interval);\n }\n\n foreach (var curve in curves)\n {\n var curve_object_id = doc.Objects.AddCurve(curve);\n doc.Objects.Select(curve_object_id);\n }\n }\n\n if (curves != null)\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Brep", "Curve[] CreateContourCurves(Brep brepToContour, Point3d contourStart, Point3d contourEnd, System.Double interval)"],
- ["Rhino.Geometry.Mesh", "Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, System.Double interval, System.Double tolerance)"]
+ ["Rhino.Geometry.Brep", "Curve[] CreateContourCurves(Brep brepToContour, Point3d contourStart, Point3d contourEnd, double interval)"],
+ ["Rhino.Geometry.Mesh", "Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, double interval, double tolerance)"]
]
},
{
"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.DisplayPipeline", "void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"],
+ ["Rhino.Display.DisplayPipeline", "void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"],
+ ["Rhino.Display.DisplayConduit", "void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)"],
+ ["Rhino.Display.DisplayConduit", "void PreDrawObjects(DrawEventArgs e)"]
]
},
{
@@ -741,9 +741,9 @@
"name": "Modifylightcolor.cs",
"code": "using Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.UI;\n\nnamespace examples_cs\n{\n public class ChangeLightColorCommand : Rhino.Commands.Command\n {\n public override string EnglishName\n {\n get { return \"csLightColor\"; }\n }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\"Select light to change color\", true,\n ObjectType.Light, out obj_ref);\n if (rc != Result.Success)\n return rc;\n var light = obj_ref.Light();\n if (light == null)\n return Result.Failure;\n\n var diffuse_color = light.Diffuse;\n if (Dialogs.ShowColorDialog(ref diffuse_color))\n {\n light.Diffuse = diffuse_color;\n }\n\n doc.Lights.Modify(obj_ref.ObjectId, light);\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.UI.Dialogs", "System.Boolean ShowColorDialog(ref System.Drawing.Color color)"],
+ ["Rhino.UI.Dialogs", "bool ShowColorDialog(ref System.Drawing.Color color)"],
["Rhino.Geometry.Light", "Color Diffuse"],
- ["Rhino.DocObjects.Tables.LightTable", "System.Boolean Modify(System.Guid id, Geometry.Light light)"]
+ ["Rhino.DocObjects.Tables.LightTable", "bool Modify(System.Guid id, Geometry.Light light)"]
]
},
{
@@ -767,22 +767,22 @@
"code": "using System;\n\nusing Rhino;\nusing Rhino.Geometry;\n\npartial class Examples\n{\n public static Rhino.Commands.Result AddNestedBlock(RhinoDoc doc)\n {\n var circle = new Circle(Point3d.Origin, 5);\n Curve[] curveList = { new ArcCurve(circle) };\n var circleIndex = doc.InstanceDefinitions.Add(\"Circle\", \"Circle with radius of 5\", Point3d.Origin, curveList);\n var transform = Transform.Identity;\n var irefId = doc.InstanceDefinitions[circleIndex].Id;\n var iref = new InstanceReferenceGeometry(irefId, transform);\n circle.Radius = circle.Radius * 2.0;\n GeometryBase[] blockList = { iref, new ArcCurve(circle) };\n var circle2Index = doc.InstanceDefinitions.Add(\"TwoCircles\", \"Nested block test\", Point3d.Origin, blockList);\n doc.Objects.AddInstanceObject(circle2Index, transform);\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
["Rhino.Geometry.InstanceReferenceGeometry", "InstanceReferenceGeometry(Guid instanceDefinitionId, Transform transform)"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "System.Int32 Add(System.String name, System.String description, Point3d basePoint, IEnumerable geometry)"]
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "int Add(string name, string description, Point3d basePoint, IEnumerable geometry)"]
]
},
{
"name": "Nurbscurveincreasedegree.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.DocObjects;\n\nnamespace examples_cs\n{\n public class NurbsCurveIncreaseDegreeCommand : Command\n {\n public override string EnglishName { get { return \"csNurbsCrvIncreaseDegree\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\n \"Select curve\", false, ObjectType.Curve, out obj_ref);\n if (rc != Result.Success) return rc;\n if (obj_ref == null) return Result.Failure;\n var curve = obj_ref.Curve();\n if (curve == null) return Result.Failure;\n var nurbs_curve = curve.ToNurbsCurve();\n\n int new_degree = -1;\n rc = RhinoGet.GetInteger(string.Format(\"New degree <{0}...11>\", nurbs_curve.Degree), true, ref new_degree,\n nurbs_curve.Degree, 11);\n if (rc != Result.Success) return rc;\n\n rc = Result.Failure;\n if (nurbs_curve.IncreaseDegree(new_degree))\n if (doc.Objects.Replace(obj_ref.ObjectId, nurbs_curve))\n rc = Result.Success;\n\n RhinoApp.WriteLine(\"Result: {0}\", rc.ToString());\n doc.Views.Redraw();\n return rc;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.NurbsCurve", "System.Boolean IncreaseDegree(System.Int32 desiredDegree)"]
+ ["Rhino.Geometry.NurbsCurve", "bool IncreaseDegree(int desiredDegree)"]
]
},
{
"name": "Nurbssurfaceincreasedegree.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.Input;\nusing Rhino.DocObjects;\n\nnamespace examples_cs\n{\n public class NurbsSurfaceIncreaseDegreeCommand : Command\n {\n public override string EnglishName { get { return \"csNurbsSrfIncreaseDegree\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\n \"Select surface\", false, ObjectType.Surface, out obj_ref);\n if (rc != Result.Success) return rc;\n if (obj_ref == null) return Result.Failure;\n var surface = obj_ref.Surface();\n if (surface == null) return Result.Failure;\n var nurbs_surface = surface.ToNurbsSurface();\n\n int new_u_degree = -1;\n rc = RhinoGet.GetInteger(string.Format(\"New U degree <{0}...11>\", nurbs_surface.Degree(0)), true, ref new_u_degree,\n nurbs_surface.Degree(0), 11);\n if (rc != Result.Success) return rc;\n \n int new_v_degree = -1;\n rc = RhinoGet.GetInteger(string.Format(\"New V degree <{0}...11>\", nurbs_surface.Degree(1)), true, ref new_v_degree,\n nurbs_surface.Degree(1), 11);\n if (rc != Result.Success) return rc;\n\n rc = Result.Failure;\n if (nurbs_surface.IncreaseDegreeU(new_u_degree))\n if (nurbs_surface.IncreaseDegreeV(new_v_degree))\n if (doc.Objects.Replace(obj_ref.ObjectId, nurbs_surface))\n rc = Result.Success;\n\n RhinoApp.WriteLine(\"Result: {0}\", rc.ToString());\n doc.Views.Redraw();\n return rc;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.NurbsSurface", "System.Boolean IncreaseDegreeU(System.Int32 desiredDegree)"],
- ["Rhino.Geometry.NurbsSurface", "System.Boolean IncreaseDegreeV(System.Int32 desiredDegree)"]
+ ["Rhino.Geometry.NurbsSurface", "bool IncreaseDegreeU(int desiredDegree)"],
+ ["Rhino.Geometry.NurbsSurface", "bool IncreaseDegreeV(int desiredDegree)"]
]
},
{
@@ -796,11 +796,11 @@
"name": "Objectdisplaymode.cs",
"code": "using System;\nusing Rhino;\nusing Rhino.Commands;\nusing Rhino.DocObjects;\n\npartial class Examples\n{\n public static Rhino.Commands.Result ObjectDisplayMode(Rhino.RhinoDoc doc)\n {\n const ObjectType filter = ObjectType.Mesh | ObjectType.Brep;\n ObjRef objref;\n Result rc = Rhino.Input.RhinoGet.GetOneObject(\"Select mesh or surface\", true, filter, out objref);\n if (rc != Rhino.Commands.Result.Success)\n return rc;\n Guid viewportId = doc.Views.ActiveView.ActiveViewportID;\n\n ObjectAttributes attr = objref.Object().Attributes;\n if (attr.HasDisplayModeOverride(viewportId))\n {\n RhinoApp.WriteLine(\"Removing display mode override from object\");\n attr.RemoveDisplayModeOverride(viewportId);\n }\n else\n {\n Rhino.Display.DisplayModeDescription[] modes = Rhino.Display.DisplayModeDescription.GetDisplayModes();\n Rhino.Display.DisplayModeDescription mode = null;\n if (modes.Length == 1)\n mode = modes[0];\n else\n {\n Rhino.Input.Custom.GetOption go = new Rhino.Input.Custom.GetOption();\n go.SetCommandPrompt(\"Select display mode\");\n string[] str_modes = new string[modes.Length];\n for (int i = 0; i < modes.Length; i++)\n str_modes[i] = modes[i].EnglishName.Replace(\" \", \"\").Replace(\"-\", \"\");\n go.AddOptionList(\"DisplayMode\", str_modes, 0);\n if (go.Get() == Rhino.Input.GetResult.Option)\n mode = modes[go.Option().CurrentListOptionIndex];\n }\n if (mode == null)\n return Rhino.Commands.Result.Cancel;\n attr.SetDisplayModeOverride(mode, viewportId);\n }\n doc.Objects.ModifyAttributes(objref, attr, false);\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
- ["Rhino.DocObjects.ObjectAttributes", "System.Boolean HasDisplayModeOverride(System.Guid viewportId)"],
- ["Rhino.DocObjects.ObjectAttributes", "System.Void RemoveDisplayModeOverride(System.Guid rhinoViewportId)"],
- ["Rhino.DocObjects.ObjectAttributes", "System.Boolean SetDisplayModeOverride(Display.DisplayModeDescription mode, System.Guid rhinoViewportId)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionList(LocalizeStringPair optionName, IEnumerable listValues, System.Int32 listCurrentIndex)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionList(System.String englishOptionName, IEnumerable listValues, System.Int32 listCurrentIndex)"]
+ ["Rhino.DocObjects.ObjectAttributes", "bool HasDisplayModeOverride(System.Guid viewportId)"],
+ ["Rhino.DocObjects.ObjectAttributes", "void RemoveDisplayModeOverride(System.Guid rhinoViewportId)"],
+ ["Rhino.DocObjects.ObjectAttributes", "bool SetDisplayModeOverride(Display.DisplayModeDescription mode, System.Guid rhinoViewportId)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionList(LocalizeStringPair optionName, IEnumerable listValues, int listCurrentIndex)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionList(string englishOptionName, IEnumerable listValues, int listCurrentIndex)"]
]
},
{
@@ -815,19 +815,19 @@
"name": "Orientonsrf.cs",
"code": "partial class Examples\n{\n public static Rhino.Commands.Result OrientOnSrf(Rhino.RhinoDoc doc)\n {\n // Select objects to orient\n Rhino.Input.Custom.GetObject go = new Rhino.Input.Custom.GetObject();\n go.SetCommandPrompt(\"Select objects to orient\");\n go.SubObjectSelect = false;\n go.GroupSelect = true;\n go.GetMultiple(1, 0);\n if (go.CommandResult() != Rhino.Commands.Result.Success)\n return go.CommandResult();\n\n // Point to orient from\n Rhino.Input.Custom.GetPoint gp = new Rhino.Input.Custom.GetPoint();\n gp.SetCommandPrompt(\"Point to orient from\");\n gp.Get();\n if (gp.CommandResult() != Rhino.Commands.Result.Success)\n return gp.CommandResult();\n\n // Define source plane\n Rhino.Display.RhinoView 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 Rhino.Geometry.Plane source_plane = view.ActiveViewport.ConstructionPlane();\n source_plane.Origin = gp.Point();\n\n // Surface to orient on\n Rhino.Input.Custom.GetObject gs = new Rhino.Input.Custom.GetObject();\n gs.SetCommandPrompt(\"Surface to orient on\");\n gs.GeometryFilter = Rhino.DocObjects.ObjectType.Surface;\n gs.SubObjectSelect = true;\n gs.DeselectAllBeforePostSelect = false;\n gs.OneByOnePostSelect = true;\n gs.Get();\n if (gs.CommandResult() != Rhino.Commands.Result.Success)\n return gs.CommandResult();\n\n Rhino.DocObjects.ObjRef objref = gs.Object(0);\n // get selected surface object\n Rhino.DocObjects.RhinoObject obj = objref.Object();\n if (obj == null)\n return Rhino.Commands.Result.Failure;\n // get selected surface (face)\n Rhino.Geometry.Surface surface = objref.Surface();\n if (surface == null)\n return Rhino.Commands.Result.Failure;\n // Unselect surface\n obj.Select(false);\n\n // Point on surface to orient to\n gp.SetCommandPrompt(\"Point on surface to orient to\");\n gp.Constrain(surface, false);\n gp.Get();\n if (gp.CommandResult() != Rhino.Commands.Result.Success)\n return gp.CommandResult();\n\n // Do transformation\n Rhino.Commands.Result rc = Rhino.Commands.Result.Failure;\n double u, v;\n if (surface.ClosestPoint(gp.Point(), out u, out v))\n {\n Rhino.Geometry.Plane target_plane;\n if (surface.FrameAt(u, v, out target_plane))\n {\n // Build transformation\n Rhino.Geometry.Transform xform = Rhino.Geometry.Transform.PlaneToPlane(source_plane, target_plane);\n\n // Do the transformation. In this example, we will copy the original objects\n const bool delete_original = false;\n for (int i = 0; i < go.ObjectCount; i++)\n doc.Objects.Transform(go.Object(i), xform, delete_original);\n\n doc.Views.Redraw();\n rc = Rhino.Commands.Result.Success;\n }\n }\n return rc;\n }\n}\n",
"members": [
- ["Rhino.DocObjects.RhinoObject", "System.Int32 Select(System.Boolean on)"],
+ ["Rhino.DocObjects.RhinoObject", "int Select(bool on)"],
["Rhino.DocObjects.ObjRef", "RhinoObject Object()"],
["Rhino.DocObjects.ObjRef", "Surface Surface()"],
- ["Rhino.Geometry.Surface", "System.Boolean ClosestPoint(Point3d testPoint, out System.Double u, out System.Double v)"],
- ["Rhino.Geometry.Surface", "System.Boolean FrameAt(System.Double u, System.Double v, out Plane frame)"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"],
+ ["Rhino.Geometry.Surface", "bool ClosestPoint(Point3d testPoint, out double u, out double v)"],
+ ["Rhino.Geometry.Surface", "bool FrameAt(double u, double v, out Plane frame)"],
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Surface surface, bool 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.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, System.Boolean deleteOriginal)"]
+ ["Rhino.Input.Custom.GetObject", "ObjRef Object(int index)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, bool deleteOriginal)"]
]
},
{
@@ -849,7 +849,7 @@
"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", "void Transform(Transform xform)"]
]
},
{
@@ -860,9 +860,9 @@
["Rhino.Geometry.SurfaceCurvature", "double Mean"],
["Rhino.Geometry.SurfaceCurvature", "Vector3d Normal"],
["Rhino.Geometry.SurfaceCurvature", "Point3d Point"],
- ["Rhino.Geometry.SurfaceCurvature", "Vector3d Direction(System.Int32 direction)"],
- ["Rhino.Geometry.SurfaceCurvature", "System.Double Kappa(System.Int32 direction)"],
- ["Rhino.Geometry.Surface", "SurfaceCurvature CurvatureAt(System.Double u, System.Double v)"]
+ ["Rhino.Geometry.SurfaceCurvature", "Vector3d Direction(int direction)"],
+ ["Rhino.Geometry.SurfaceCurvature", "double Kappa(int direction)"],
+ ["Rhino.Geometry.Surface", "SurfaceCurvature CurvatureAt(double u, double v)"]
]
},
{
@@ -870,23 +870,23 @@
"code": "using Rhino;\nusing Rhino.DocObjects;\nusing Rhino.FileIO;\nusing Rhino.Commands;\n\nnamespace examples_cs\n{\n public class InstanceDefinitionTreeCommand : Command\n {\n public override string EnglishName { get { return \"csInstanceDefinitionTree\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var instance_definitions = doc.InstanceDefinitions;\n var instance_definition_count = instance_definitions.Count;\n\n if (instance_definition_count == 0)\n {\n RhinoApp.WriteLine(\"Document contains no instance definitions.\");\n return Result.Nothing;\n }\n\n var dump = new TextLog();\n dump.IndentSize = 4;\n\n for (int i = 0; i < instance_definition_count; i++)\n DumpInstanceDefinition(instance_definitions[i], ref dump, true);\n\n RhinoApp.WriteLine(dump.ToString());\n\n return Result.Success;\n }\n\n private void DumpInstanceDefinition(InstanceDefinition instanceDefinition, ref TextLog dump, bool isRoot)\n {\n if (instanceDefinition != null && !instanceDefinition.IsDeleted)\n {\n string node = isRoot ? \"─\" : \"└\";\n dump.Print(string.Format(\"{0} Instance definition {1} = {2}\\n\", node, instanceDefinition.Index, instanceDefinition.Name));\n\n if (instanceDefinition.ObjectCount > 0)\n {\n dump.PushIndent();\n for (int i = 0; i < instanceDefinition.ObjectCount ; i++)\n {\n var obj = instanceDefinition.Object(i);\n if (obj == null) continue;\n if (obj is InstanceObject)\n DumpInstanceDefinition((obj as InstanceObject).InstanceDefinition, ref dump, false); // Recursive...\n else\n dump.Print(\"\\u2514 Object {0} = {1}\\n\", i, obj.ShortDescription(false));\n }\n dump.PopIndent();\n }\n }\n }\n }\n}\n\n",
"members": [
["Rhino.RhinoDoc", "InstanceDefinitionTable InstanceDefinitions"],
- ["Rhino.FileIO.TextLog", "System.Void PopIndent()"],
- ["Rhino.FileIO.TextLog", "System.Void Print(System.String text)"],
- ["Rhino.FileIO.TextLog", "System.Void PushIndent()"]
+ ["Rhino.FileIO.TextLog", "void PopIndent()"],
+ ["Rhino.FileIO.TextLog", "void Print(string text)"],
+ ["Rhino.FileIO.TextLog", "void PushIndent()"]
]
},
{
"name": "Projectpointstobreps.cs",
"code": "using Rhino;\nusing Rhino.DocObjects;\nusing Rhino.Input.Custom;\nusing Rhino.Commands;\nusing System.Collections.Generic;\nusing Rhino.Geometry;\nusing Rhino.Geometry.Intersect;\n\nnamespace examples_cs\n{\n public class ProjectPointsToBrepsCommand : Command\n {\n public override string EnglishName { get { return \"csProjectPtointsToBreps\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var gs = new GetObject();\n gs.SetCommandPrompt(\"select surface\");\n gs.GeometryFilter = ObjectType.Surface | ObjectType.PolysrfFilter;\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 if (brep == null)\n return Result.Failure;\n\n var points = Intersection.ProjectPointsToBreps(\n new List {brep}, // brep on which to project\n new List {new Point3d(0, 0, 0), new Point3d(3,0,3), new Point3d(-2,0,-2)}, // some random points to project\n new Vector3d(0, 1, 0), // project on Y axis\n doc.ModelAbsoluteTolerance);\n\n if (points != null && points.Length > 0)\n {\n foreach (var point in points)\n {\n doc.Objects.AddPoint(point);\n }\n }\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToBreps(IEnumerable breps, IEnumerable points, Vector3d direction, System.Double tolerance)"]
+ ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToBreps(IEnumerable breps, IEnumerable points, Vector3d direction, double tolerance)"]
]
},
{
"name": "Projectpointstomeshesex.cs",
"code": "using System.Collections.Generic;\nusing Rhino;\nusing Rhino.Commands;\nusing Rhino.Geometry;\nusing Rhino.Geometry.Intersect;\nusing Rhino.Input;\nusing Rhino.DocObjects;\n\nnamespace examples_cs\n{\n public class ProjectPointsToMeshesExCommand : Command\n {\n public override string EnglishName { get { return \"csProjectPointsToMeshesEx\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\"mesh\", false, ObjectType.Mesh, out obj_ref);\n if (rc != Result.Success) return rc;\n var mesh = obj_ref.Mesh();\n\n ObjRef[] obj_ref_pts;\n rc = RhinoGet.GetMultipleObjects(\"points\", false, ObjectType.Point, out obj_ref_pts);\n if (rc != Result.Success) return rc;\n var points = new List();\n foreach (var obj_ref_pt in obj_ref_pts)\n {\n var pt = obj_ref_pt.Point().Location;\n points.Add(pt);\n }\n\n int[] indices;\n var prj_points = Intersection.ProjectPointsToMeshesEx(new[] {mesh}, points, new Vector3d(0, 1, 0), 0, out indices);\n foreach (var prj_pt in prj_points) doc.Objects.AddPoint(prj_pt);\n doc.Views.Redraw();\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToMeshesEx(IEnumerable meshes, IEnumerable points, Vector3d direction, System.Double tolerance, out System.Int32[] indices)"]
+ ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToMeshesEx(IEnumerable meshes, IEnumerable points, Vector3d direction, double tolerance, out int indices)"]
]
},
{
@@ -895,14 +895,14 @@
"members": [
["Rhino.DocObjects.InstanceDefinition", "bool IsDeleted"],
["Rhino.DocObjects.InstanceDefinition", "bool IsReference"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "System.Boolean Modify(System.Int32 idefIndex, System.String newName, System.String newDescription, System.Boolean quiet)"]
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "bool Modify(int idefIndex, string newName, string newDescription, bool quiet)"]
]
},
{
"name": "Replacecolordialog.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing Rhino.UI;\nusing System.Windows.Forms;\n\nnamespace examples_cs\n{\n public class ReplaceColorDialogCommand : Command\n {\n public override string EnglishName { get { return \"csReplaceColorDialog\"; } }\n\n private ColorDialog m_dlg = null;\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n Dialogs.SetCustomColorDialog(OnSetCustomColorDialog);\n return Result.Success;\n }\n\n void OnSetCustomColorDialog(object sender, GetColorEventArgs e)\n {\n m_dlg = new ColorDialog();\n if (m_dlg.ShowDialog(null) == DialogResult.OK)\n {\n var c = m_dlg.Color;\n e.SelectedColor = c;\n }\n }\n }\n}",
"members": [
- ["Rhino.UI.Dialogs", "System.Void SetCustomColorDialog(EventHandler handler)"]
+ ["Rhino.UI.Dialogs", "void SetCustomColorDialog(EventHandler handler)"]
]
},
{
@@ -932,12 +932,12 @@
"name": "Screencaptureview.cs",
"code": "using System;\nusing System.Windows.Forms;\nusing Rhino;\nusing Rhino.Commands;\n\nnamespace examples_cs\n{\n public class CaptureViewToBitmapCommand : Rhino.Commands.Command\n {\n public override string EnglishName\n {\n get { return \"csCaptureViewToBitmap\"; }\n }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n var file_name = \"\";\n\n var bitmap = doc.Views.ActiveView.CaptureToBitmap(true, true, true);\n bitmap.MakeTransparent();\n\n // copy bitmap to clipboard\n Clipboard.SetImage(bitmap);\n\n // save bitmap to file\n var save_file_dialog = new Rhino.UI.SaveFileDialog\n {\n Filter = \"*.bmp\",\n InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)\n };\n if (save_file_dialog.ShowDialog() == DialogResult.OK)\n {\n file_name = save_file_dialog.FileName;\n }\n\n if (file_name != \"\")\n bitmap.Save(file_name);\n\n return Rhino.Commands.Result.Success;\n }\n }\n}\n",
"members": [
- ["Rhino.Display.RhinoView", "System.Drawing.Bitmap CaptureToBitmap(System.Boolean grid, System.Boolean worldAxes, System.Boolean cplaneAxes)"],
+ ["Rhino.Display.RhinoView", "System.Drawing.Bitmap CaptureToBitmap(bool grid, bool worldAxes, bool cplaneAxes)"],
["Rhino.UI.SaveFileDialog", "SaveFileDialog()"],
["Rhino.UI.SaveFileDialog", "string FileName"],
["Rhino.UI.SaveFileDialog", "string Filter"],
["Rhino.UI.SaveFileDialog", "string InitialDirectory"],
- ["Rhino.UI.SaveFileDialog", "System.Boolean ShowSaveDialog()"]
+ ["Rhino.UI.SaveFileDialog", "bool ShowSaveDialog()"]
]
},
{
@@ -946,7 +946,7 @@
"members": [
["Rhino.DocObjects.Layer", "string Name"],
["Rhino.DocObjects.Tables.LayerTable", "Layer CurrentLayer"],
- ["Rhino.DocObjects.Tables.ObjectTable", "RhinoObject[] FindByLayer(System.String layerName)"]
+ ["Rhino.DocObjects.Tables.ObjectTable", "RhinoObject[] FindByLayer(string layerName)"]
]
},
{
@@ -978,7 +978,7 @@
"members": [
["Rhino.Geometry.TextEntity", "TextEntity()"],
["Rhino.Geometry.TextEntity", "TextJustification Justification"],
- ["Rhino.DocObjects.Tables.FontTable", "System.Int32 FindOrCreate(System.String face, System.Boolean bold, System.Boolean italic)"],
+ ["Rhino.DocObjects.Tables.FontTable", "int FindOrCreate(string face, bool bold, bool italic)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddText(Text3d text3d)"]
]
},
@@ -986,7 +986,7 @@
"name": "Tightboundingbox.cs",
"code": "using Rhino;\nusing Rhino.Commands;\nusing System.Linq;\nusing Rhino.Geometry;\nusing Rhino.Input;\nusing Rhino.DocObjects;\nusing System.Collections.Generic;\n\nnamespace examples_cs\n{\n public class TightBoundingBoxCommand : Command\n {\n public override string EnglishName { get { return \"csTightBoundingBox\"; } }\n\n protected override Result RunCommand(RhinoDoc doc, RunMode mode)\n {\n ObjRef obj_ref;\n var rc = RhinoGet.GetOneObject(\n \"Select surface to split\", true, ObjectType.Surface, out obj_ref);\n if (rc != Result.Success)\n return rc;\n var surface = obj_ref.Surface();\n if (surface == null)\n return Result.Failure;\n\n obj_ref = null;\n rc = RhinoGet.GetOneObject(\n \"Select cutting curve\", true, ObjectType.Curve, out obj_ref);\n if (rc != Result.Success)\n return rc;\n var curve = obj_ref.Curve();\n if (curve == null)\n return Result.Failure;\n\n var brep_face = surface as BrepFace;\n if (brep_face == null)\n return Result.Failure;\n\n var split_brep = brep_face.Split(\n new List {curve}, doc.ModelAbsoluteTolerance);\n if (split_brep == null)\n {\n RhinoApp.WriteLine(\"Unable to split surface.\");\n return Result.Nothing;\n }\n\n var meshes = Mesh.CreateFromBrep(split_brep);\n\n foreach (var mesh in meshes)\n {\n var bbox = mesh.GetBoundingBox(true);\n switch (bbox.IsDegenerate(doc.ModelAbsoluteTolerance))\n {\n case 3:\n case 2:\n return Result.Failure;\n case 1:\n // rectangle\n // box with 8 corners flattened to rectangle with 4 corners\n var rectangle_corners = bbox.GetCorners().Distinct().ToList();\n // add 1st point as last to close the loop\n rectangle_corners.Add(rectangle_corners[0]);\n doc.Objects.AddPolyline(rectangle_corners);\n doc.Views.Redraw();\n break;\n case 0: \n // box\n var brep_box = new Box(bbox).ToBrep();\n doc.Objects.AddBrep(brep_box);\n doc.Views.Redraw();\n break;\n }\n }\n\n return Result.Success;\n }\n }\n}",
"members": [
- ["Rhino.Geometry.BrepFace", "Brep Split(IEnumerable curves, System.Double tolerance)"],
+ ["Rhino.Geometry.BrepFace", "Brep Split(IEnumerable curves, double tolerance)"],
["Rhino.Geometry.Mesh", "Mesh[] CreateFromBrep(Brep brep)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPolyline(IEnumerable points)"]
]
@@ -995,7 +995,7 @@
"name": "Transformbrep.cs",
"code": "using Rhino.Input;\n\npartial class Examples\n{\n public static Rhino.Commands.Result TransformBrep(Rhino.RhinoDoc doc)\n {\n Rhino.DocObjects.ObjRef rhobj;\n var rc = RhinoGet.GetOneObject(\"Select brep\", true, Rhino.DocObjects.ObjectType.Brep, out rhobj);\n if(rc!= Rhino.Commands.Result.Success)\n return rc;\n\n // Simple translation transformation\n var xform = Rhino.Geometry.Transform.Translation(18,-18,25);\n doc.Objects.Transform(rhobj, xform, true);\n doc.Views.Redraw();\n return Rhino.Commands.Result.Success;\n }\n}\n",
"members": [
- ["Rhino.Geometry.Transform", "Transform Translation(System.Double dx, System.Double dy, System.Double dz)"]
+ ["Rhino.Geometry.Transform", "Transform Translation(double dx, double dy, double dz)"]
]
},
{
@@ -1018,20 +1018,20 @@
"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.RhinoView", "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.RhinoViewport", "bool SetTraceImage(string bitmapFileName, Plane plane, double width, double height, bool grayscale, bool filtered)"],
["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.UI.OpenFileDialog", "bool ShowOpenDialog()"],
+ ["Rhino.Input.Custom.GetPoint", "bool ConstrainToConstructionPlane(bool throughBasePoint)"],
["Rhino.Input.Custom.GetBaseClass", "Result CommandResult()"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Double Number()"],
+ ["Rhino.Input.Custom.GetBaseClass", "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.Input.Custom.GetNumber", "void SetLowerLimit(double lowerLimit, bool strictlyGreaterThan)"],
["Rhino.DocObjects.Tables.ViewTable", "RhinoView ActiveView"]
]
},
@@ -1049,7 +1049,7 @@
"code": "import Rhino\nimport scriptcontext\nimport System.Drawing.Color\n\ndef AddChildLayer():\n # Get an existing layer\n default_name = scriptcontext.doc.Layers.CurrentLayer.Name\n # Prompt the user to enter a layer name\n gs = Rhino.Input.Custom.GetString()\n gs.SetCommandPrompt(\"Name of existing layer\")\n gs.SetDefaultString(default_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 index = scriptcontext.doc.Layers.Find(layer_name, True)\n if index<0: return Rhino.Commands.Result.Cancel\n\n parent_layer = scriptcontext.doc.Layers[index]\n\n # Create a child layer\n child_name = parent_layer.Name + \"_child\"\n childlayer = Rhino.DocObjects.Layer()\n childlayer.ParentLayerId = parent_layer.Id\n childlayer.Name = child_name\n childlayer.Color = System.Drawing.Color.Red\n\n index = scriptcontext.doc.Layers.Add(childlayer)\n if index<0:\n print \"Unable to add\", child_name, \"layer.\"\n return Rhino.Commands.Result.Failure\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n AddChildLayer()",
"members": [
["Rhino.DocObjects.Layer", "Guid ParentLayerId"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Add(Layer layer)"]
+ ["Rhino.DocObjects.Tables.LayerTable", "int Add(Layer layer)"]
]
},
{
@@ -1058,7 +1058,7 @@
"members": [
["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"],
["Rhino.Geometry.Point3d", "Point3d(double x, double y, double z)"],
- ["Rhino.DocObjects.Tables.ViewTable", "System.Void Redraw()"],
+ ["Rhino.DocObjects.Tables.ViewTable", "void Redraw()"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddCircle(Circle circle)"]
]
},
@@ -1067,8 +1067,8 @@
"code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddClippingPlane():\n # Define the corners of the clipping plane\n rc, corners = Rhino.Input.RhinoGet.GetRectangle()\n if rc!=Rhino.Commands.Result.Success: return rc\n\n # Get the active view\n view = scriptcontext.doc.Views.ActiveView\n if view is None: return Rhino.Commands.Result.Failure\n\n p0, p1, p2, p3 = corners\n # Create a plane from the corner points\n plane = Rhino.Geometry.Plane(p0, p1, p3)\n\n # Add a clipping plane object to the document\n id = scriptcontext.doc.Objects.AddClippingPlane(plane, p0.DistanceTo(p1), p0.DistanceTo(p3), view.ActiveViewportID)\n if id!=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 AddClippingPlane()\n",
"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.FileIO.File3dmObjectTable", "System.Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, System.Guid clippedViewportId)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, System.Guid clippedViewportId)"],
["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"]
]
},
@@ -1078,26 +1078,26 @@
"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(bool capBottom, bool capTop)"]
]
},
{
"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.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.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.RhinoApp", "void WriteLine(string format, object arg0)"],
+ ["Rhino.RhinoApp", "void WriteLine(string message)"],
+ ["Rhino.DocObjects.Layer", "bool IsValidName(string name)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void AcceptNothing(bool enable)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void SetDefaultString(string defaultValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "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)"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.String GetUnusedLayerName()"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.String GetUnusedLayerName(System.Boolean ignoreDeleted)"]
+ ["Rhino.DocObjects.Tables.LayerTable", "int Add(string layerName, System.Drawing.Color layerColor)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "int Find(string layerName, bool ignoreDeletedLayers)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "Layer FindName(string layerName)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "string GetUnusedLayerName()"],
+ ["Rhino.DocObjects.Tables.LayerTable", "string GetUnusedLayerName(bool ignoreDeleted)"]
]
},
{
@@ -1105,14 +1105,14 @@
"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.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.DocObjects.RhinoObject", "bool CommitChanges()"],
+ ["Rhino.Display.RhinoPageView", "DetailViewObject AddDetailView(string title, Geometry.Point2d corner0, Geometry.Point2d corner1, DefinedViewportProjection initialProjection)"],
+ ["Rhino.Display.RhinoPageView", "bool SetActiveDetail(System.Guid detailId)"],
+ ["Rhino.Display.RhinoPageView", "void SetPageAsActive()"],
+ ["Rhino.Display.RhinoViewport", "bool 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.Tables.ViewTable", "RhinoPageView AddPageView(System.String title, System.Double pageWidth, System.Double pageHeight)"],
+ ["Rhino.Geometry.DetailView", "bool SetScale(double modelLength, Rhino.UnitSystem modelUnits, double pageLength, Rhino.UnitSystem pageUnits)"],
+ ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView AddPageView(string title, double pageWidth, double pageHeight)"],
["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView[] GetPageViews()"]
]
},
@@ -1120,14 +1120,14 @@
"name": "Addline.py",
"code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddLine():\n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Start of line\")\n gp.Get()\n if gp.CommandResult()!=Rhino.Commands.Result.Success:\n return gp.CommandResult()\n pt_start = gp.Point()\n\n gp.SetCommandPrompt(\"End of line\")\n gp.SetBasePoint(pt_start, False)\n gp.DrawLineFromPoint(pt_start, True)\n gp.Get()\n if gp.CommandResult() != Rhino.Commands.Result.Success:\n return gp.CommandResult()\n pt_end = gp.Point()\n v = pt_end - pt_start\n if v.IsTiny(Rhino.RhinoMath.ZeroTolerance):\n return Rhino.Commands.Result.Nothing\n \n id = scriptcontext.doc.Objects.AddLine(pt_start, pt_end)\n if id!=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 AddLine()\n",
"members": [
- ["Rhino.Geometry.Vector2d", "System.Boolean IsTiny(System.Double tolerance)"],
- ["Rhino.Geometry.Vector3d", "System.Boolean IsTiny(System.Double tolerance)"],
+ ["Rhino.Geometry.Vector2d", "bool IsTiny(double tolerance)"],
+ ["Rhino.Geometry.Vector3d", "bool IsTiny(double tolerance)"],
["Rhino.Input.Custom.GetPoint", "GetPoint()"],
- ["Rhino.Input.Custom.GetPoint", "System.Void DrawLineFromPoint(Point3d startPoint, System.Boolean showDistanceInStatusBar)"],
+ ["Rhino.Input.Custom.GetPoint", "void DrawLineFromPoint(Point3d startPoint, bool showDistanceInStatusBar)"],
["Rhino.Input.Custom.GetPoint", "GetResult Get()"],
- ["Rhino.Input.Custom.GetPoint", "System.Void SetBasePoint(Point3d basePoint, System.Boolean showDistanceInStatusBar)"],
+ ["Rhino.Input.Custom.GetPoint", "void SetBasePoint(Point3d basePoint, bool showDistanceInStatusBar)"],
["Rhino.Input.Custom.GetBaseClass", "Point3d Point()"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Void SetCommandPrompt(System.String prompt)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void SetCommandPrompt(string prompt)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLine(Point3d from, Point3d to)"]
]
},
@@ -1144,7 +1144,7 @@
"code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddLinearDimension2():\n origin = Rhino.Geometry.Point3d(1,1,0)\n offset = Rhino.Geometry.Point3d(11,1,0)\n pt = Rhino.Geometry.Point3d((offset.X-origin.X)/2.0,3,0)\n plane = Rhino.Geometry.Plane.WorldXY\n plane.Origin = origin\n \n rc, u, v = plane.ClosestParameter(origin)\n ext1 = Rhino.Geometry.Point2d(u,v)\n rc, u, v = plane.ClosestParameter(offset)\n ext2 = Rhino.Geometry.Point2d(u,v)\n rc, u, v = plane.ClosestParameter(pt)\n linePt = Rhino.Geometry.Point2d(u,v)\n \n dimension = Rhino.Geometry.LinearDimension(plane, ext1, ext2, linePt)\n if scriptcontext.doc.Objects.AddLinearDimension(dimension)!=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 AddLinearDimension2()\n",
"members": [
["Rhino.Geometry.LinearDimension", "LinearDimension(Plane dimensionPlane, Point2d extensionLine1End, Point2d extensionLine2End, Point2d pointOnDimensionLine)"],
- ["Rhino.Geometry.Plane", "System.Boolean ClosestParameter(Point3d testPoint, out System.Double s, out System.Double t)"]
+ ["Rhino.Geometry.Plane", "bool ClosestParameter(Point3d testPoint, out double s, out double t)"]
]
},
{
@@ -1155,12 +1155,12 @@
["Rhino.Geometry.Mesh", "MeshFaceList Faces"],
["Rhino.Geometry.Mesh", "MeshVertexNormalList Normals"],
["Rhino.Geometry.Mesh", "MeshVertexList Vertices"],
- ["Rhino.Geometry.Mesh", "System.Boolean Compact()"],
+ ["Rhino.Geometry.Mesh", "bool 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.MeshVertexList", "int Add(double x, double y, double z)"],
+ ["Rhino.Geometry.Collections.MeshVertexList", "int Add(float x, float y, float z)"],
+ ["Rhino.Geometry.Collections.MeshVertexNormalList", "bool ComputeNormals()"],
+ ["Rhino.Geometry.Collections.MeshFaceList", "int AddFace(int vertex1, int vertex2, int vertex3, int vertex4)"]
]
},
{
@@ -1170,14 +1170,14 @@
["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.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.Display.RhinoViewport", "bool PopViewProjection()"],
+ ["Rhino.Display.RhinoViewport", "void PushViewProjection()"],
+ ["Rhino.Display.RhinoViewport", "void SetCameraDirection(Vector3d cameraDirection, bool updateTargetLocation)"],
+ ["Rhino.Display.RhinoViewport", "void SetCameraLocation(Point3d cameraLocation, bool updateTargetLocation)"],
+ ["Rhino.DocObjects.Tables.NamedViewTable", "int Add(string name, System.Guid viewportId)"],
+ ["Rhino.Input.RhinoGet", "Result GetPoint(string prompt, bool acceptNothing, out Point3d point)"],
+ ["Rhino.Input.RhinoGet", "Result GetString(string prompt, bool acceptNothing, ref string outputString)"],
+ ["Rhino.Input.RhinoGet", "Result GetView(string commandPrompt, out RhinoView view)"]
]
},
{
@@ -1193,9 +1193,9 @@
"name": "Addnurbscurve.py",
"code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddNurbsCurve():\n points = Rhino.Collections.Point3dList(5)\n points.Add(0, 0, 0)\n points.Add(0, 2, 0)\n points.Add(2, 3, 0)\n points.Add(4, 2, 0)\n points.Add(4, 0, 0)\n\n nc = Rhino.Geometry.NurbsCurve.Create(False, 3, points)\n rc = Rhino.Commands.Result.Failure\n if nc and nc.IsValid:\n if scriptcontext.doc.Objects.AddCurve(nc)!=System.Guid.Empty:\n scriptcontext.doc.Views.Redraw()\n rc = Rhino.Commands.Result.Success\n return rc\n\nif __name__==\"__main__\":\n AddNurbsCurve()\n",
"members": [
- ["Rhino.Geometry.NurbsCurve", "NurbsCurve Create(System.Boolean periodic, System.Int32 degree, IEnumerable points)"],
+ ["Rhino.Geometry.NurbsCurve", "NurbsCurve Create(bool periodic, int degree, IEnumerable points)"],
["Rhino.Collections.Point3dList", "Point3dList(int initialCapacity)"],
- ["Rhino.Collections.Point3dList", "System.Void Add(System.Double x, System.Double y, System.Double z)"]
+ ["Rhino.Collections.Point3dList", "void Add(double x, double y, double z)"]
]
},
{
@@ -1204,20 +1204,20 @@
"members": [
["Rhino.RhinoDoc", "GroupTable Groups"],
["Rhino.Input.Custom.GetObject", "GetObject()"],
- ["Rhino.Input.Custom.GetObject", "GetResult GetMultiple(System.Int32 minimumNumber, System.Int32 maximumNumber)"],
- ["Rhino.DocObjects.Tables.GroupTable", "System.Int32 Add(IEnumerable objectIds)"]
+ ["Rhino.Input.Custom.GetObject", "GetResult GetMultiple(int minimumNumber, int maximumNumber)"],
+ ["Rhino.DocObjects.Tables.GroupTable", "int Add(IEnumerable objectIds)"]
]
},
{
"name": "Addradialdimension.py",
"code": "from Rhino import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Commands import *\nfrom Rhino.Geometry import *\nfrom Rhino.Input import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n rc, obj_ref = RhinoGet.GetOneObject(\"Select curve for radius dimension\", \n True, ObjectType.Curve)\n if rc != Result.Success:\n return rc\n curve, curve_parameter = obj_ref.CurveParameter()\n if curve == None:\n return Result.Failure\n\n if curve.IsLinear() or curve.IsPolyline():\n print \"Curve must be non-linear.\"\n return Result.Nothing\n\n # in this example just deal with planar curves\n if not curve.IsPlanar():\n print \"Curve must be planar.\"\n return Result.Nothing\n\n point_on_curve = curve.PointAt(curve_parameter)\n curvature_vector = curve.CurvatureAt(curve_parameter)\n len = curvature_vector.Length\n if len < RhinoMath.SqrtEpsilon:\n print \"Curve is almost linear and therefore has no curvature.\"\n return Result.Nothing\n\n center = point_on_curve + (curvature_vector/(len*len))\n _, plane = curve.TryGetPlane()\n radial_dimension = \\\n RadialDimension(center, point_on_curve, plane.XAxis, plane.Normal, 5.0)\n doc.Objects.AddRadialDimension(radial_dimension)\n doc.Views.Redraw()\n return Result.Success\n\nif __name__==\"__main__\":\n RunCommand()",
"members": [
- ["Rhino.DocObjects.ObjRef", "Curve CurveParameter(out System.Double parameter)"],
- ["Rhino.Geometry.Curve", "Vector3d CurvatureAt(System.Double t)"],
- ["Rhino.Geometry.Curve", "System.Boolean IsLinear()"],
- ["Rhino.Geometry.Curve", "System.Boolean IsPlanar()"],
- ["Rhino.Geometry.Curve", "System.Boolean IsPolyline()"],
- ["Rhino.Geometry.Curve", "Point3d PointAt(System.Double t)"],
+ ["Rhino.DocObjects.ObjRef", "Curve CurveParameter(out double parameter)"],
+ ["Rhino.Geometry.Curve", "Vector3d CurvatureAt(double t)"],
+ ["Rhino.Geometry.Curve", "bool IsLinear()"],
+ ["Rhino.Geometry.Curve", "bool IsPlanar()"],
+ ["Rhino.Geometry.Curve", "bool IsPolyline()"],
+ ["Rhino.Geometry.Curve", "Point3d PointAt(double t)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddRadialDimension(RadialDimension dimension)"]
]
},
@@ -1233,7 +1233,7 @@
"name": "Addtext.py",
"code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef AddAnnotationText():\n pt = Rhino.Geometry.Point3d(10, 0, 0)\n text = \"Hello RhinoCommon\"\n height = 2.0\n font = \"Arial\"\n plane = scriptcontext.doc.Views.ActiveView.ActiveViewport.ConstructionPlane()\n plane.Origin = pt\n id = scriptcontext.doc.Objects.AddText(text, plane, height, font, False, False)\n if id!=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 AddAnnotationText()\n",
"members": [
- ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddText(System.String text, Plane plane, System.Double height, System.String fontName, System.Boolean bold, System.Boolean italic)"]
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic)"]
]
},
{
@@ -1252,7 +1252,7 @@
["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"],
["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"],
["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"],
- ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, System.Boolean capStart, System.Boolean capEnd)"]
+ ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, bool capStart, bool capEnd)"]
]
},
{
@@ -1261,28 +1261,28 @@
"members": [
["Rhino.Display.DisplayModeDescription", "DisplayPipelineAttributes DisplayAttributes"],
["Rhino.Display.DisplayModeDescription", "DisplayModeDescription[] GetDisplayModes()"],
- ["Rhino.Display.DisplayModeDescription", "System.Boolean UpdateDisplayMode(DisplayModeDescription displayMode)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOption(System.String englishOption)"]
+ ["Rhino.Display.DisplayModeDescription", "bool UpdateDisplayMode(DisplayModeDescription displayMode)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOption(string englishOption)"]
]
},
{
"name": "Arclengthpoint.py",
"code": "import Rhino\nimport scriptcontext\n\ndef ArcLengthPoint():\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select curve\", True, Rhino.DocObjects.ObjectType.Curve)\n if rc!=Rhino.Commands.Result.Success: return rc\n crv = objref.Curve()\n if not crv: return Rhino.Commands.Result.Failure\n crv_length = crv.GetLength()\n length = 0\n rc, length = Rhino.Input.RhinoGet.GetNumber(\"Length from start\", True, length, 0, crv_length)\n if rc!=Rhino.Commands.Result.Success: return rc\n pt = crv.PointAtLength(length)\n if pt.IsValid:\n scriptcontext.doc.Objects.AddPoint(pt)\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n ArcLengthPoint()\n",
"members": [
- ["Rhino.Geometry.Curve", "System.Double GetLength()"],
- ["Rhino.Geometry.Curve", "Point3d PointAtLength(System.Double length)"]
+ ["Rhino.Geometry.Curve", "double GetLength()"],
+ ["Rhino.Geometry.Curve", "Point3d PointAtLength(double length)"]
]
},
{
"name": "Arraybydistance.py",
"code": "import Rhino\nimport scriptcontext\n\ndef dynamic_array():\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select object\", True, Rhino.DocObjects.ObjectType.AnyObject)\n if rc!=Rhino.Commands.Result.Success: return\n \n rc, pt_start = Rhino.Input.RhinoGet.GetPoint(\"Start point\", False)\n if rc!=Rhino.Commands.Result.Success: return\n \n obj = objref.Object()\n if not obj: return\n \n dist = 1\n if scriptcontext.sticky.has_key(\"dynamic_array_distance\"):\n dist = scriptcontext.sticky[\"dynamic_array_distance\"]\n # This is a function that is called whenever the GetPoint's\n # DynamicDraw event occurs\n def ArrayByDistanceDraw( sender, args ):\n rhobj = args.Source.Tag\n if not rhobj: return\n vec = args.CurrentPoint - pt_start\n length = vec.Length\n vec.Unitize()\n count = int(length / dist)\n for i in range(1,count):\n translate = vec * (i*dist)\n xf = Rhino.Geometry.Transform.Translation(translate)\n args.Display.DrawObject(rhobj, xf)\n\n # Create an instance of a GetPoint class and add a delegate\n # for the DynamicDraw event\n gp = Rhino.Input.Custom.GetPoint()\n gp.DrawLineFromPoint(pt_start, True)\n optdouble = Rhino.Input.Custom.OptionDouble(dist)\n constrain = False\n optconstrain = Rhino.Input.Custom.OptionToggle(constrain,\"Off\", \"On\")\n gp.AddOptionDouble(\"Distance\", optdouble)\n gp.AddOptionToggle(\"Constrain\", optconstrain)\n gp.DynamicDraw += ArrayByDistanceDraw\n gp.Tag = obj\n while gp.Get()==Rhino.Input.GetResult.Option:\n dist = optdouble.CurrentValue\n if constrain!=optconstrain.CurrentValue:\n constrain = optconstrain.CurrentValue\n if constrain:\n gp2 = Rhino.Input.Custom.GetPoint()\n gp2.DrawLineFromPoint(pt_start, True)\n gp2.SetCommandPrompt(\"Second point on constraint line\")\n if gp2.Get()==Rhino.Input.GetResult.Point:\n gp.Constrain(pt_start, gp2.Point())\n else:\n gp.ClearCommandOptions()\n optconstrain.CurrentValue = False\n constrain = False\n gp.AddOptionDouble(\"Distance\", optdouble)\n gp.AddOptionToggle(\"Constrain\", optconstrain)\n else:\n gp.ClearConstraints()\n continue\n if gp.CommandResult()==Rhino.Commands.Result.Success:\n scriptcontext.sticky[\"dynamic_array_distance\"] = dist\n pt = gp.Point()\n vec = pt - pt_start\n length = vec.Length\n vec.Unitize()\n count = int(length / dist)\n for i in range(1, count):\n translate = vec * (i*dist)\n xf = Rhino.Geometry.Transform.Translation(translate)\n scriptcontext.doc.Objects.Transform(obj,xf,False)\n scriptcontext.doc.Views.Redraw()\n\n\nif( __name__ == \"__main__\" ):\n dynamic_array()",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawObject(DocObjects.RhinoObject rhinoObject, Transform xform)"],
+ ["Rhino.Display.DisplayPipeline", "void DrawObject(DocObjects.RhinoObject rhinoObject, Transform xform)"],
["Rhino.Input.Custom.GetPoint", "object Tag"],
- ["Rhino.Input.Custom.GetPoint", "System.Void ClearConstraints()"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Point3d from, Point3d to)"],
+ ["Rhino.Input.Custom.GetPoint", "void ClearConstraints()"],
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Point3d from, Point3d to)"],
["Rhino.Input.Custom.GetPointDrawEventArgs", "GetPoint Source"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Void ClearCommandOptions()"]
+ ["Rhino.Input.Custom.GetBaseClass", "void ClearCommandOptions()"]
]
},
{
@@ -1297,16 +1297,16 @@
"code": "import Rhino\nimport scriptcontext\n\ndef BooleanDifference():\n filter = Rhino.DocObjects.ObjectType.PolysrfFilter\n rc, objrefs = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select first set of polysurfaces\", False, filter)\n if rc != Rhino.Commands.Result.Success: return rc\n if not objrefs: return Rhino.Commands.Result.Failure\n\n in_breps0 = []\n for objref in objrefs:\n brep = objref.Brep()\n if brep: in_breps0.append(brep)\n\n scriptcontext.doc.Objects.UnselectAll()\n rc, objrefs = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select second set of polysurfaces\", False, filter)\n if rc != Rhino.Commands.Result.Success: return rc\n if not objrefs: return Rhino.Commands.Result.Failure\n\n in_breps1 = []\n for objref in objrefs:\n brep = objref.Brep()\n if brep: in_breps1.append(brep)\n\n tolerance = scriptcontext.doc.ModelAbsoluteTolerance\n breps = Rhino.Geometry.Brep.CreateBooleanDifference(in_breps0, in_breps1, tolerance)\n if not breps: return Rhino.Commands.Result.Nothing\n for brep in breps: scriptcontext.doc.Objects.AddBrep(brep)\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n BooleanDifference()",
"members": [
["Rhino.DocObjects.ObjRef", "Brep Brep()"],
- ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, System.Double tolerance, System.Boolean manifoldOnly)"],
- ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, System.Double tolerance)"],
- ["Rhino.Input.RhinoGet", "Result GetMultipleObjects(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef[] rhObjects)"]
+ ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, double tolerance, bool manifoldOnly)"],
+ ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, double tolerance)"],
+ ["Rhino.Input.RhinoGet", "Result GetMultipleObjects(string prompt, bool acceptNothing, ObjectType filter, out ObjRef[] rhObjects)"]
]
},
{
"name": "Circlecenter.py",
"code": "import Rhino\nimport scriptcontext\n\ndef CircleCenter():\n go = Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select objects\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve\n go.GetMultiple(1, 0)\n if go.CommandResult()!=Rhino.Commands.Result.Success:\n return go.CommandResult()\n\n objrefs = go.Objects()\n if not objrefs: return Rhino.Commands.Result.Nothing\n\n tolerance = scriptcontext.doc.ModelAbsoluteTolerance\n for i, objref in enumerate(objrefs):\n # get the curve geometry\n curve = objref.Curve()\n if not curve: continue\n rc, circle = curve.TryGetCircle( tolerance )\n if rc:\n print \"Circle\", i+1, \": center = \", circle.Center\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n CircleCenter()",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean TryGetCircle(out Circle circle, System.Double tolerance)"],
+ ["Rhino.Geometry.Curve", "bool TryGetCircle(out Circle circle, double tolerance)"],
["Rhino.Input.Custom.GetObject", "GeometryAttributeFilter GeometryAttributeFilter"]
]
},
@@ -1315,20 +1315,20 @@
"code": "import Rhino\nimport rhinoscriptsyntax as rs\n\n# data passed to the RTree's SearchCallback function that\n# we can use for recording what is going on\nclass SearchData:\n def __init__(self, mesh, point):\n self.HitCount = 0\n self.Mesh = mesh\n self.Point = point\n self.Index = -1\n self.Distance = 0\n \n\ndef SearchCallback(sender, e):\n data = e.Tag\n data.HitCount += 1\n vertex = data.Mesh.Vertices[e.Id]\n distance = data.Point.DistanceTo(vertex)\n if data.Index == -1 or data.Distance > distance:\n # shrink the sphere to help improve the test\n e.SearchSphere = Rhino.Geometry.Sphere(data.Point, distance)\n data.Index = e.Id\n data.Distance = distance\n\ndef RunSearch():\n id = rs.GetObject(\"select mesh\", rs.filter.mesh)\n mesh = rs.coercemesh(id)\n if mesh:\n rs.UnselectObject(id)\n tree = Rhino.Geometry.RTree()\n # I can add a RhinoCommon function that just builds an rtree from the\n # vertices in one quick shot, but for now...\n for i,vertex in enumerate(mesh.Vertices): tree.Insert(vertex, i)\n \n while(True):\n point = rs.GetPoint(\"test point\")\n if not point: break\n \n data = SearchData(mesh, point)\n # Use the first vertex in the mesh to define a start sphere\n distance = point.DistanceTo(mesh.Vertices[0])\n sphere = Rhino.Geometry.Sphere(point, distance * 1.1)\n if tree.Search(sphere, SearchCallback, data):\n rs.AddPoint(mesh.Vertices[data.Index])\n print \"Found point in {0} tests\".format(data.HitCount)\n\nif __name__==\"__main__\":\n RunSearch()\n",
"members": [
["Rhino.Geometry.RTree", "RTree()"],
- ["Rhino.Geometry.RTree", "System.Boolean Insert(Point3d point, System.Int32 elementId)"],
- ["Rhino.Geometry.RTree", "System.Boolean Search(Sphere sphere, EventHandler callback, System.Object tag)"]
+ ["Rhino.Geometry.RTree", "bool Insert(Point3d point, int elementId)"],
+ ["Rhino.Geometry.RTree", "bool Search(Sphere sphere, EventHandler callback, object tag)"]
]
},
{
"name": "Commandlineoptions.py",
"code": "import Rhino\nimport scriptcontext\n\ndef CommandLineOptions():\n # For this example we will use a GetPoint class, but all of the custom\n # \"Get\" classes support command line options.\n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"GetPoint with options\")\n \n # set up the options\n intOption = Rhino.Input.Custom.OptionInteger(1, 1, 99)\n dblOption = Rhino.Input.Custom.OptionDouble(2.2, 0, 99.9)\n boolOption = Rhino.Input.Custom.OptionToggle(True, \"Off\", \"On\")\n listValues = \"Item0\", \"Item1\", \"Item2\", \"Item3\", \"Item4\"\n \n gp.AddOptionInteger(\"Integer\", intOption)\n gp.AddOptionDouble(\"Double\", dblOption)\n gp.AddOptionToggle(\"Boolean\", boolOption)\n listIndex = 3\n opList = gp.AddOptionList(\"List\", listValues, listIndex)\n while True:\n # perform the get operation. This will prompt the user to\n # input a point, but also allow for command line options\n # defined above\n get_rc = gp.Get()\n if gp.CommandResult()!=Rhino.Commands.Result.Success:\n return gp.CommandResult()\n if get_rc==Rhino.Input.GetResult.Point:\n point = gp.Point()\n scriptcontext.doc.Objects.AddPoint(point)\n scriptcontext.doc.Views.Redraw()\n print \"Command line option values are\"\n print \" Integer =\", intOption.CurrentValue\n print \" Double =\", dblOption.CurrentValue\n print \" Boolean =\", boolOption.CurrentValue\n print \" List =\", listValues[listIndex]\n elif get_rc==Rhino.Input.GetResult.Option:\n if gp.OptionIndex()==opList:\n listIndex = gp.Option().CurrentListOptionIndex\n continue\n break\n return Rhino.Commands.Result.Success\n\n\nif __name__ == \"__main__\":\n CommandLineOptions()\n\n",
"members": [
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionDouble(System.String englishName, ref OptionDouble numberValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionInteger(System.String englishName, ref OptionInteger intValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionToggle(LocalizeStringPair optionName, ref OptionToggle toggleValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionToggle(System.String englishName, ref OptionToggle toggleValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionDouble(string englishName, ref OptionDouble numberValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionInteger(string englishName, ref OptionInteger intValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionToggle(LocalizeStringPair optionName, ref OptionToggle toggleValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionToggle(string englishName, ref OptionToggle toggleValue)"],
["Rhino.Input.Custom.CommandLineOption", "int CurrentListOptionIndex"],
["Rhino.Input.Custom.OptionToggle", "OptionToggle(bool initialValue, string offValue, string onValue)"],
["Rhino.Input.Custom.OptionToggle", "bool CurrentValue"],
@@ -1342,14 +1342,14 @@
"name": "Conduitarrowheads.py",
"code": "import Rhino\nimport System.Drawing\nimport scriptcontext\nimport rhinoscriptsyntax as rs\n\nclass DrawArrowHeadsConduit(Rhino.Display.DisplayConduit):\n def __init__(self, line, screenSize, worldSize):\n self.line = line\n self.screenSize = screenSize\n self.worldSize = worldSize\n\n def DrawForeground(self, e):\n e.Display.DrawArrow(self.line, System.Drawing.Color.Black, self.screenSize, self.worldSize)\n\ndef RunCommand():\n # get arrow head size\n go = Rhino.Input.Custom.GetOption()\n go.SetCommandPrompt(\"ArrowHead length in screen size (pixles) or world size (percentage of arrow lenght)?\")\n go.AddOption(\"screen\")\n go.AddOption(\"world\")\n go.Get()\n if (go.CommandResult() != Rhino.Commands.Result.Success):\n return go.CommandResult()\n\n screenSize = 0\n worldSize = 0.0\n if (go.Option().EnglishName == \"screen\"):\n gi = Rhino.Input.Custom.GetInteger()\n gi.SetLowerLimit(0,True)\n gi.SetCommandPrompt(\"Length of arrow head in pixels\")\n gi.Get()\n if (gi.CommandResult() != Rhino.Commands.Result.Success):\n return gi.CommandResult()\n screenSize = gi.Number()\n else:\n gi = Rhino.Input.Custom.GetInteger()\n gi.SetLowerLimit(0, True)\n gi.SetUpperLimit(100, False)\n gi.SetCommandPrompt(\"Lenght of arrow head in percentage of total arrow lenght\")\n gi.Get()\n if (gi.CommandResult() != Rhino.Commands.Result.Success):\n return gi.CommandResult()\n worldSize = gi.Number()/100.0\n\n\n # get arrow start and end points\n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Start of line\")\n gp.Get()\n if (gp.CommandResult() != Rhino.Commands.Result.Success):\n return gp.CommandResult()\n ptStart = gp.Point()\n\n gp.SetCommandPrompt(\"End of line\")\n gp.SetBasePoint(ptStart, False)\n gp.DrawLineFromPoint(ptStart, True)\n gp.Get()\n if (gp.CommandResult() != Rhino.Commands.Result.Success):\n return gp.CommandResult()\n ptEnd = gp.Point()\n\n\n v = ptEnd - ptStart\n if (v.IsTiny(Rhino.RhinoMath.ZeroTolerance)):\n return Rhino.Commands.Result.Nothing\n\n line = Rhino.Geometry.Line(ptStart, ptEnd)\n\n conduit = DrawArrowHeadsConduit(line, screenSize, worldSize)\n conduit.Enabled = True\n scriptcontext.doc.Views.Redraw()\n rs.GetString(\"Pausing for user input\")\n conduit.Enabled = False\n scriptcontext.doc.Views.Redraw()\n\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n RunCommand()\n",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawArrow(Line line, System.Drawing.Color color, System.Double screenSize, System.Double relativeSize)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawArrow(Line line, System.Drawing.Color color, double screenSize, double relativeSize)"]
]
},
{
"name": "Conduitbitmap.py",
"code": "import Rhino\nfrom Rhino.Geometry import *\nimport System.Drawing\nimport Rhino.Display\nimport scriptcontext\nimport rhinoscriptsyntax as rs\n\nclass CustomConduit(Rhino.Display.DisplayConduit):\n def __init__(self):\n flag = System.Drawing.Bitmap(100,100)\n for x in range(0,100):\n for y in range(0,100):\n flag.SetPixel(x, y, System.Drawing.Color.Red)\n g = System.Drawing.Graphics.FromImage(flag)\n g.FillEllipse(System.Drawing.Brushes.Blue, 25, 25, 50, 50)\n self.display_bitmap = Rhino.Display.DisplayBitmap(flag)\n\n def DrawForeground(self, e):\n e.Display.DrawBitmap(self.display_bitmap, 50, 50)\n\nif __name__== \"__main__\":\n conduit = CustomConduit()\n conduit.Enabled = True\n scriptcontext.doc.Views.Redraw()\n rs.GetString(\"Pausing for user input\")\n conduit.Enabled = False\n scriptcontext.doc.Views.Redraw()",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawBitmap(DisplayBitmap bitmap, System.Int32 left, System.Int32 top)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawBitmap(DisplayBitmap bitmap, int left, int top)"]
]
},
{
@@ -1357,9 +1357,9 @@
"code": "import Rhino\nimport scriptcontext\n\ndef constrainedcopy():\n #get a single closed curve\n go = Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select curve\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve\n go.Get()\n if go.CommandResult() != Rhino.Commands.Result.Success: return\n objref = go.Object(0)\n base_curve = objref.Curve()\n first_point = objref.SelectionPoint()\n if not base_curve or not first_point.IsValid:\n return\n isplanar, plane = base_curve.TryGetPlane()\n if not isplanar: return\n \n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Offset point\")\n gp.DrawLineFromPoint(first_point, True)\n line = Rhino.Geometry.Line(first_point, first_point + plane.Normal)\n gp.Constrain(line)\n gp.Get()\n if gp.CommandResult() != Rhino.Commands.Result.Success:\n return\n second_point = gp.Point()\n vec = second_point - first_point\n if vec.Length > 0.001:\n xf = Rhino.Geometry.Transform.Translation(vec)\n id = scriptcontext.doc.Objects.Transform(objref, xf, False)\n scriptcontext.doc.Views.Redraw()\n return id\n\nif __name__==\"__main__\":\n constrainedcopy()\n",
"members": [
["Rhino.DocObjects.ObjRef", "Point3d SelectionPoint()"],
- ["Rhino.Geometry.Curve", "System.Boolean TryGetPlane(out Plane plane)"],
+ ["Rhino.Geometry.Curve", "bool TryGetPlane(out Plane plane)"],
["Rhino.Geometry.Transform", "Transform Translation(Vector3d motion)"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Line line)"]
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Line line)"]
]
},
{
@@ -1367,9 +1367,9 @@
"code": "import Rhino\nimport scriptcontext\n\ndef CreateBlock():\n # Select objects to define block\n go = Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt( \"Select objects to define block\" )\n go.ReferenceObjectSelect = False\n go.SubObjectSelect = False\n go.GroupSelect = True\n\n # Phantoms, grips, lights, etc., cannot be in blocks.\n forbidden_geometry_filter = Rhino.DocObjects.ObjectType.Light | Rhino.DocObjects.ObjectType.Grip | Rhino.DocObjects.ObjectType.Phantom\n geometry_filter = forbidden_geometry_filter ^ Rhino.DocObjects.ObjectType.AnyObject\n go.GeometryFilter = geometry_filter\n go.GetMultiple(1, 0)\n if go.CommandResult() != Rhino.Commands.Result.Success:\n return go.CommandResult()\n\n # Block base point\n rc, base_point = Rhino.Input.RhinoGet.GetPoint(\"Block base point\", False)\n if rc != Rhino.Commands.Result.Success: return rc\n\n # Block definition name\n rc, idef_name = Rhino.Input.RhinoGet.GetString(\"Block definition name\", False, \"\")\n if rc != Rhino.Commands.Result.Success: return rc\n # Validate block name\n idef_name = idef_name.strip()\n if not idef_name: return Rhino.Commands.Result.Nothing\n\n # See if block name already exists\n existing_idef = scriptcontext.doc.InstanceDefinitions.Find(idef_name, True)\n if existing_idef:\n print \"Block definition\", idef_name, \"already exists\"\n return Rhino.Commands.Result.Nothing\n\n # Gather all of the selected objects\n objrefs = go.Objects()\n geometry = [item.Object().Geometry for item in objrefs]\n attributes = [item.Object().Attributes for item in objrefs]\n\n # Add the instance definition\n idef_index = scriptcontext.doc.InstanceDefinitions.Add(idef_name, \"\", base_point, geometry, attributes)\n\n if idef_index<0:\n print \"Unable to create block definition\", idef_name\n return Rhino.Commands.Result.Failure\n return Rhino.Commands.Result.Failure\n\n\nif __name__==\"__main__\":\n CreateBlock()\n",
"members": [
["Rhino.Input.Custom.GetObject", "bool ReferenceObjectSelect"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "System.Int32 Add(System.String name, System.String description, Point3d basePoint, IEnumerable geometry, IEnumerable attributes)"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(System.String instanceDefinitionName, System.Boolean ignoreDeletedInstanceDefinitions)"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(System.String instanceDefinitionName)"]
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "int Add(string name, string description, Point3d basePoint, IEnumerable geometry, IEnumerable attributes)"],
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(string instanceDefinitionName, bool ignoreDeletedInstanceDefinitions)"],
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(string instanceDefinitionName)"]
]
},
{
@@ -1381,7 +1381,7 @@
["Rhino.Geometry.MeshingParameters", "MeshingParameters Minimal"],
["Rhino.Geometry.MeshingParameters", "MeshingParameters Smooth"],
["Rhino.Geometry.Mesh", "Mesh[] CreateFromBrep(Brep brep, MeshingParameters meshingParameters)"],
- ["Rhino.Geometry.Mesh", "System.Void Append(Mesh other)"]
+ ["Rhino.Geometry.Mesh", "void Append(Mesh other)"]
]
},
{
@@ -1391,30 +1391,30 @@
["Rhino.Geometry.NurbsSurface", "NurbsSurfaceKnotList KnotsU"],
["Rhino.Geometry.NurbsSurface", "NurbsSurfaceKnotList KnotsV"],
["Rhino.Geometry.NurbsSurface", "NurbsSurfacePointList Points"],
- ["Rhino.Geometry.NurbsSurface", "NurbsSurface Create(System.Int32 dimension, System.Boolean isRational, System.Int32 order0, System.Int32 order1, System.Int32 controlPointCount0, System.Int32 controlPointCount1)"]
+ ["Rhino.Geometry.NurbsSurface", "NurbsSurface Create(int dimension, bool isRational, int order0, int order1, int controlPointCount0, int controlPointCount1)"]
]
},
{
"name": "Crvdeviation.py",
"code": "import rhinoscriptsyntax as rs\nimport scriptcontext\nimport Rhino\n\ndef RunCommand():\n crvA = rs.GetCurveObject(\"first curve\")[0]\n crvA = rs.coercecurve(crvA)\n crvB = rs.GetCurveObject(\"second curve\")[0]\n crvB = rs.coercecurve(crvB)\n if crvA == None or crvB == None:\n return Rhino.Commands.Result.Failure\n \n maxa, maxb, maxd, mina, minb, mind = rs.CurveDeviation(crvA, crvB)\n \n if mind <= Rhino.RhinoMath.ZeroTolerance:\n mind = 0.0;\n maxDistPtA = crvA.PointAt(maxa)\n maxDistPtB = crvB.PointAt(maxb)\n minDistPtA = crvA.PointAt(mina)\n minDistPtB = crvB.PointAt(minb)\n\n print \"Minimum deviation = {0} pointA({1}, {2}, {3}), pointB({4}, {5}, {6})\".format(\n mind, minDistPtA.X, minDistPtA.Y, minDistPtA.Z, minDistPtB.X, minDistPtB.Y, minDistPtB.Z)\n print \"Maximum deviation = {0} pointA({1}, {2}, {3}), pointB({4}, {5}, {6})\".format(\n maxd, maxDistPtA.X, maxDistPtA.Y, maxDistPtA.Z, maxDistPtB.X, maxDistPtB.Y, maxDistPtB.Z)\n\nif __name__==\"__main__\":\n RunCommand()\n",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean GetDistancesBetweenCurves(Curve curveA, Curve curveB, System.Double tolerance, out System.Double maxDistance, out System.Double maxDistanceParameterA, out System.Double maxDistanceParameterB, out System.Double minDistance, out System.Double minDistanceParameterA, out System.Double minDistanceParameterB)"],
- ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 UnselectAll()"]
+ ["Rhino.Geometry.Curve", "bool GetDistancesBetweenCurves(Curve curveA, Curve curveB, double tolerance, out double maxDistance, out double maxDistanceParameterA, out double maxDistanceParameterB, out double minDistance, out double minDistanceParameterA, out double minDistanceParameterB)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "int UnselectAll()"]
]
},
{
"name": "Curveboundingbox.py",
"code": "import Rhino\nimport scriptcontext\n\ndef CurveBoundingBox():\n # Select a curve object\n rc, rhobject = Rhino.Input.RhinoGet.GetOneObject(\"Select curve\", False, Rhino.DocObjects.ObjectType.Curve)\n if rc!=Rhino.Commands.Result.Success: return\n\n # Validate selection\n curve = rhobject.Curve()\n if not curve: return\n\n ## Get the active view's construction plane\n view = scriptcontext.doc.Views.ActiveView\n if not view: return\n plane = view.ActiveViewport.ConstructionPlane()\n\n # Compute the tight bounding box of the curve in world coordinates\n bbox = curve.GetBoundingBox(True)\n if not bbox.IsValid: return\n\n # Print the min and max box coordinates in world coordinates\n print \"World min:\", bbox.Min\n print \"World max:\", bbox.Max\n\n # Compute the tight bounding box of the curve based on the \n # active view's construction plane\n bbox = curve.GetBoundingBox(plane)\n\n # Print the min and max box coordinates in cplane coordinates\n print \"CPlane min:\", bbox.Min\n print \"CPlane max:\", bbox.Max\n\nif __name__==\"__main__\":\n CurveBoundingBox()",
"members": [
- ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(Plane plane)"],
- ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(System.Boolean accurate)"]
+ ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(bool accurate)"],
+ ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(Plane plane)"]
]
},
{
"name": "Curvebrepbox.py",
"code": "import Rhino\nfrom Rhino.Geometry import *\nfrom Rhino.Commands import Result\nfrom Rhino.Input import RhinoGet\nfrom Rhino.DocObjects import ObjectType\nimport rhinoscriptsyntax as rs\nfrom scriptcontext import doc\n\ndef RunCommand():\n rc, objRef = RhinoGet.GetOneObject(\"Select curve\", False, ObjectType.Curve)\n if rc <> Result.Success:\n return rc\n curve = objRef.Curve()\n if None == curve:\n return Result.Failure\n\n view = doc.Views.ActiveView\n plane = view.ActiveViewport.ConstructionPlane()\n # Create a construction plane aligned bounding box\n bbox = curve.GetBoundingBox(plane)\n\n if bbox.IsDegenerate(doc.ModelAbsoluteTolerance) > 0:\n print \"the curve's bounding box is degenerate (flat) in at least one direction so a box cannot be created.\"\n return Result.Failure\n\n brep = Brep.CreateFromBox(bbox)\n doc.Objects.AddBrep(brep)\n doc.Views.Redraw()\n\n return Result.Success\n\nif __name__ == \"__main__\":\n print RunCommand()\n",
"members": [
- ["Rhino.Geometry.BoundingBox", "System.Int32 IsDegenerate(System.Double tolerance)"],
+ ["Rhino.Geometry.BoundingBox", "int IsDegenerate(double tolerance)"],
["Rhino.Geometry.Brep", "Brep CreateFromBox(BoundingBox box)"]
]
},
@@ -1423,15 +1423,15 @@
"code": "import rhinoscriptsyntax as rs\nfrom scriptcontext import *\nimport Rhino\n\ndef ReverseCurves():\n crvs = rs.GetObjects(\"Select curves to reverse\", rs.filter.curve)\n if not crvs: return\n \n for crvid in crvs:\n crv = rs.coercecurve(crvid)\n if not crv: continue\n dup = crv.DuplicateCurve()\n if dup:\n dup.Reverse()\n doc.Objects.Replace(crvid, dup)\n\nif __name__ == \"__main__\":\n ReverseCurves()",
"members": [
["Rhino.Geometry.Curve", "Curve DuplicateCurve()"],
- ["Rhino.Geometry.Curve", "System.Boolean Reverse()"]
+ ["Rhino.Geometry.Curve", "bool Reverse()"]
]
},
{
"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.DocObjects.Tables.ObjectTable", "int Select(IEnumerable objectIds)"],
+ ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, double tolerance, double overlapTolerance)"],
["Rhino.Geometry.Intersect.IntersectionEvent", "bool IsOverlap"]
]
},
@@ -1439,15 +1439,15 @@
"name": "Customgeometryfilter.py",
"code": "import rhinoscriptsyntax as rs\nfrom scriptcontext import *\nimport Rhino\n\ndef circleWithRadiusOf10GeometryFilter (rhObject, geometry, componentIndex):\n isCircleWithRadiusOf10 = False\n c = rs.coercecurve(geometry)\n if c:\n b, circle = c.TryGetCircle()\n if b:\n isCircleWithRadiusOf10 = circle.Radius <= 10.0 + Rhino.RhinoMath.ZeroTolerance and circle.Radius >= 10.0 - Rhino.RhinoMath.ZeroTolerance\n return isCircleWithRadiusOf10\n\ndef RunCommand():\n # only use a custom geometry filter if no simpler filter does the job\n\n # for curves - only a simple filter is needed\n if rs.GetObject(\"select curve\", rs.filter.curve): #Rhino.DocObjects.ObjectType.Curve):\n print \"curve vas selected\"\n\n # for circles with a radius of 10 - a custom geometry filter is needed\n if rs.GetObject(\"select circle with radius of 10\", rs.filter.curve, False, False, circleWithRadiusOf10GeometryFilter):\n print \"circle with radius of 10 was selected\"\n\nif __name__==\"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean TryGetCircle(out Circle circle)"],
- ["Rhino.Input.Custom.GetObject", "System.Void SetCustomGeometryFilter(GetObjectGeometryFilter filter)"]
+ ["Rhino.Geometry.Curve", "bool TryGetCircle(out Circle circle)"],
+ ["Rhino.Input.Custom.GetObject", "void SetCustomGeometryFilter(GetObjectGeometryFilter filter)"]
]
},
{
"name": "Customundo.py",
"code": "import Rhino\nimport scriptcontext\n\n\ndef OnUndoFavoriteNumber(sender, e):\n \"\"\"!!!!!!!!!!\n NEVER change any setting in the Rhino document or application. Rhino\n handles ALL changes to the application and document and you will break\n the Undo/Redo commands if you make any changes to the application or\n document. This is meant only for your own private plug-in data\n !!!!!!!!!!\n\n This function can be called either by undo or redo\n In order to get redo to work, add another custom undo event with the\n current value. If you don't want redo to work, just skip adding\n a custom undo event here\n \"\"\"\n current_value = scriptcontext.sticky[\"FavoriteNumber\"]\n e.Document.AddCustomUndoEvent(\"Favorite Number\", OnUndoFavoriteNumber, current_value)\n\n old_value = e.Tag\n print \"Going back to your favorite =\", old_value\n scriptcontext.sticky[\"FavoriteNumber\"]= old_value;\n\n\ndef TestCustomUndo():\n \"\"\"Rhino automatically sets up an undo record when a command is run,\n but... the undo record is not saved if nothing changes in the\n document (objects added/deleted, layers changed,...)\n \n If we have a command that doesn't change things in the document,\n but we want to have our own custom undo called then we need to do\n a little extra work\n \"\"\"\n current_value = 0\n if scriptcontext.sticky.has_key(\"FavoriteNumber\"):\n current_value = scriptcontext.sticky[\"FavoriteNumber\"]\n rc, new_value = Rhino.Input.RhinoGet.GetNumber(\"Favorite number\", True, current_value)\n if rc!=Rhino.Commands.Result.Success: return\n\n scriptcontext.doc.AddCustomUndoEvent(\"Favorite Number\", OnUndoFavoriteNumber, current_value);\n scriptcontext.sticky[\"FavoriteNumber\"] = new_value\n\nif __name__==\"__main__\":\n TestCustomUndo()\n\n",
"members": [
- ["Rhino.RhinoDoc", "System.Boolean AddCustomUndoEvent(System.String description, EventHandler handler, System.Object tag)"]
+ ["Rhino.RhinoDoc", "bool AddCustomUndoEvent(string description, EventHandler handler, object tag)"]
]
},
{
@@ -1477,32 +1477,32 @@
"name": "Dividebylength.py",
"code": "import Rhino\nimport scriptcontext\n\ndef DivideByLengthPoints():\n filter = Rhino.DocObjects.ObjectType.Curve\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select curve to divide\", False, filter)\n if not objref or rc!=Rhino.Commands.Result.Success: return rc\n \n crv = objref.Curve()\n if not crv or crv.IsShort(Rhino.RhinoMath.ZeroTolerance):\n return Rhino.Commands.Result.Failure\n \n crv_length = crv.GetLength()\n s = \"Curve length is {0:.3f}. Segment length\".format(crv_length)\n seg_length = crv_length / 2.0\n rc, length = Rhino.Input.RhinoGet.GetNumber(s, False, seg_length, 0, crv_length)\n if rc!=Rhino.Commands.Result.Success: return rc\n t_vals = crv.DivideByLength(length, True)\n if not t_vals:\n return Rhino.Commands.Result.Failure\n \n [scriptcontext.doc.Objects.AddPoint(crv.PointAt(t)) for t in t_vals]\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n DivideByLengthPoints()\n",
"members": [
- ["Rhino.Geometry.Curve", "Curve[] JoinCurves(IEnumerable inputCurves, System.Double joinTolerance)"],
- ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, out Point3d[] points)"],
- ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, System.Boolean reverse, out Point3d[] points)"],
- ["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.Geometry.Curve", "Curve[] JoinCurves(IEnumerable inputCurves, double joinTolerance)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, bool reverse, out Point3d[] points)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, bool reverse)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, out Point3d[] points)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds)"],
+ ["Rhino.Geometry.Curve", "bool IsShort(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.DocObjects.Tables.ObjectTable", "bool Select(System.Guid objectId)"],
+ ["Rhino.Input.RhinoGet", "Result GetNumber(string prompt, bool acceptNothing, ref double outputNumber, double lowerLimit, double upperLimit)"],
+ ["Rhino.Input.RhinoGet", "Result GetNumber(string prompt, bool acceptNothing, ref double outputNumber)"],
+ ["Rhino.Input.RhinoGet", "Result GetOneObject(string prompt, bool acceptNothing, ObjectType filter, out ObjRef rhObject)"]
]
},
{
"name": "Drawstring.py",
"code": "from Rhino import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Geometry import *\nfrom Rhino.Commands import *\nfrom Rhino.Input.Custom import *\nfrom System.Drawing import Color\n\ndef RunCommand():\n gp = GetDrawStringPoint()\n gp.SetCommandPrompt(\"Point\")\n gp.Get()\n return gp.CommandResult()\n\nclass GetDrawStringPoint(GetPoint):\n def OnDynamicDraw(self, e):\n xform = e.Viewport.GetTransform(\n CoordinateSystem.World, CoordinateSystem.Screen) \n\n current_point = e.CurrentPoint\n current_point.Transform(xform)\n screen_point = Point2d(current_point.X, current_point.Y)\n\n msg = \"screen {0}, {1}\".format(screen_point.X, screen_point.Y)\n e.Display.Draw2dText(msg, Color.Blue, screen_point, False)\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void Draw2dText(System.String text, System.Drawing.Color color, Point2d screenCoordinate, System.Boolean middleJustified)"]
+ ["Rhino.Display.DisplayPipeline", "void Draw2dText(string text, System.Drawing.Color color, Point2d screenCoordinate, bool middleJustified)"]
]
},
{
"name": "Dupborder.py",
"code": "import Rhino\nimport scriptcontext\n\ndef DupBorder():\n filter = Rhino.DocObjects.ObjectType.Surface | Rhino.DocObjects.ObjectType.PolysrfFilter\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select surface or polysurface\", False, filter)\n if rc != Rhino.Commands.Result.Success: return rc\n\n rhobj = objref.Object()\n brep = objref.Brep()\n if not rhobj or not brep: return Rhino.Commands.Result.Failure\n rhobj.Select(False)\n curves = brep.DuplicateEdgeCurves(True)\n tol = scriptcontext.doc.ModelAbsoluteTolerance * 2.1\n curves = Rhino.Geometry.Curve.JoinCurves(curves, tol)\n for curve in curves:\n id = scriptcontext.doc.Objects.AddCurve(curve)\n scriptcontext.doc.Objects.Select(id)\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n DupBorder()",
"members": [
- ["Rhino.Geometry.Brep", "Curve[] DuplicateEdgeCurves(System.Boolean nakedOnly)"]
+ ["Rhino.Geometry.Brep", "Curve[] DuplicateEdgeCurves(bool nakedOnly)"]
]
},
{
@@ -1531,7 +1531,7 @@
"code": "import rhinoscriptsyntax as rs\nfrom Rhino.Geometry import Intersect, Point3d, Vector3d\nfrom scriptcontext import doc\n\ndef RunCommand():\n # select a surface\n srfid = rs.GetObject(\"select serface\", rs.filter.surface | rs.filter.polysurface)\n if not srfid: return\n # get the brep\n brep = rs.coercebrep(srfid)\n if not brep: return\n\n x = rs.GetReal(\"value of x\", 0)\n y = rs.GetReal(\"value of y\", 0)\n\n pts = [(abs(point.Z), point.Z) for point in Intersect.Intersection.ProjectPointsToBreps(\n [brep], [Point3d(x, y, 0)], Vector3d(0, 0, 1), doc.ModelAbsoluteTolerance)]\n \n pts.sort(reverse=True)\n \n if pts == []:\n print \"no Z for given X, Y\"\n else:\n rs.AddPoint(Point3d(x, y, pts[0][1]))\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
["Rhino.Geometry.BoundingBox", "Point3d[] GetCorners()"],
- ["Rhino.Geometry.Intersect.Intersection", "System.Boolean CurveBrep(Curve curve, Brep brep, System.Double tolerance, out Curve[] overlapCurves, out Point3d[] intersectionPoints)"]
+ ["Rhino.Geometry.Intersect.Intersection", "bool CurveBrep(Curve curve, Brep brep, double tolerance, out Curve[] overlapCurves, out Point3d[] intersectionPoints)"]
]
},
{
@@ -1539,7 +1539,7 @@
"code": "import rhinoscriptsyntax as rs\nfrom scriptcontext import *\nimport Rhino\nfrom Rhino.Commands import Result\n\ndef RunCommand():\n # select a surface\n gs = Rhino.Input.Custom.GetObject()\n gs.SetCommandPrompt(\"select surface\")\n gs.GeometryFilter = Rhino.DocObjects.ObjectType.Surface\n gs.DisablePreSelect()\n gs.SubObjectSelect = False\n gs.Get()\n if gs.CommandResult() != Result.Success:\n return gs.CommandResult()\n\n # get the selected face\n face = gs.Object(0).Face()\n if face == None:\n return\n\n # pick a point on the surface. Constain\n # picking to the face.\n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"select point on surface\")\n gp.Constrain(face, False)\n gp.Get()\n if gp.CommandResult() != Result.Success:\n return gp.CommandResult()\n\n # get the parameters of the point on the\n # surface that is clesest to gp.Point()\n b, u, v = face.ClosestPoint(gp.Point())\n if b:\n dir = face.NormalAt(u, v)\n if face.OrientationIsReversed:\n dir.Reverse()\n print \"Surface normal at uv({0:f},{1:f}) = ({2:f},{3:f},{4:f})\".format(\n u, v, dir.X, dir.Y, dir.Z)\n\nif __name__ == \"__main__\":\n RunCommand()\n",
"members": [
["Rhino.Geometry.BrepFace", "bool OrientationIsReversed"],
- ["Rhino.Geometry.Surface", "Vector3d NormalAt(System.Double u, System.Double v)"]
+ ["Rhino.Geometry.Surface", "Vector3d NormalAt(double u, double v)"]
]
},
{
@@ -1561,22 +1561,22 @@
"name": "Extractisocurve.py",
"code": "from Rhino import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Commands import *\nfrom Rhino.Input import *\nfrom Rhino.Input.Custom import *\nfrom Rhino.Geometry import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n rc, obj_ref = RhinoGet.GetOneObject(\"Select surface\", False, ObjectType.Surface)\n if rc <> Result.Success or obj_ref == None:\n return rc\n surface = obj_ref.Surface()\n\n gp = GetPoint()\n gp.SetCommandPrompt(\"Point on surface\")\n gp.Constrain(surface, False)\n option_toggle = OptionToggle(False, \"U\", \"V\")\n gp.AddOptionToggle(\"Direction\", option_toggle)\n point = Point3d.Unset\n\n while True:\n grc = gp.Get()\n if grc == GetResult.Option:\n continue\n elif grc == GetResult.Point:\n point = gp.Point()\n break\n else:\n return Result.Nothing\n\n if point == Point3d.Unset:\n return Result.Nothing\n\n direction = 1 if option_toggle.CurrentValue else 0\n b, u_parameter, v_parameter = surface.ClosestPoint(point)\n if not b: return Result.Failure\n\n iso_curve = surface.IsoCurve(direction, u_parameter if direction == 1 else v_parameter)\n if iso_curve == None: \n return Result.Failure\n\n doc.Objects.AddCurve(iso_curve)\n doc.Views.Redraw()\n return Result.Success\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Surface", "Curve IsoCurve(System.Int32 direction, System.Double constantParameter)"]
+ ["Rhino.Geometry.Surface", "Curve IsoCurve(int direction, double constantParameter)"]
]
},
{
"name": "Extractthumbnail.py",
"code": "import Rhino\nimport rhinoscriptsyntax as rs\nfrom scriptcontext import doc\n\nimport clr\nclr.AddReference(\"System.Windows.Forms\")\nimport System.Windows.Forms\n\ndef RunCommand():\n\n fn = rs.OpenFileName(title=\"select file\", filter=\"Rhino files|*.3dm||\")\n if fn == None:\n return\n\n bitmap = doc.ExtractPreviewImage(fn)\n\n f = System.Windows.Forms.Form()\n f.Height = bitmap.Height\n f.Width = bitmap.Width\n pb = System.Windows.Forms.PictureBox()\n pb.Image = bitmap\n pb.Height = bitmap.Height #SizeMode = System.Windows.Forms.PictueBoxSizeMode.AutoSize\n pb.Width = bitmap.Width\n f.Controls.Add(pb);\n f.Show();\n\nif __name__ == \"__main__\":\n RunCommand()\n",
"members": [
- ["Rhino.Input.RhinoGet", "System.String GetFileName(GetFileNameMode mode, System.String defaultName, System.String title, System.Object parent, BitmapFileTypes fileTypes)"],
- ["Rhino.Input.RhinoGet", "System.String GetFileName(GetFileNameMode mode, System.String defaultName, System.String title, System.Object parent)"]
+ ["Rhino.Input.RhinoGet", "string GetFileName(GetFileNameMode mode, string defaultName, string title, object parent, BitmapFileTypes fileTypes)"],
+ ["Rhino.Input.RhinoGet", "string GetFileName(GetFileNameMode mode, string defaultName, string title, object parent)"]
]
},
{
"name": "Filletcurves.py",
"code": "from Rhino import *\nfrom Rhino.Commands import *\nfrom Rhino.Geometry import *\nfrom Rhino.Input import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Input.Custom import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n gc1 = GetObject()\n gc1.DisablePreSelect()\n gc1.SetCommandPrompt(\"Select first curve to fillet (close to the end you want to fillet)\")\n gc1.GeometryFilter = ObjectType.Curve\n gc1.GeometryAttributeFilter = GeometryAttributeFilter.OpenCurve\n gc1.Get()\n if gc1.CommandResult() != Result.Success:\n return gc1.CommandResult()\n curve1_obj_ref = gc1.Object(0)\n curve1 = curve1_obj_ref.Curve()\n if curve1 == None: return Result.Failure\n curve1_point_near_end = curve1_obj_ref.SelectionPoint()\n if curve1_point_near_end == Point3d.Unset:\n return Result.Failure\n\n gc2 = GetObject()\n gc2.DisablePreSelect()\n gc2.SetCommandPrompt(\"Select second curve to fillet (close to the end you want to fillet)\")\n gc2.GeometryFilter = ObjectType.Curve\n gc2.GeometryAttributeFilter = GeometryAttributeFilter.OpenCurve\n gc2.Get()\n if gc2.CommandResult() != Result.Success:\n return gc2.CommandResult()\n curve2_obj_ref = gc2.Object(0)\n curve2 = curve2_obj_ref.Curve()\n if curve2 == None: return Result.Failure\n curve2_point_near_end = curve2_obj_ref.SelectionPoint()\n if curve2_point_near_end == Point3d.Unset:\n return Result.Failure\n\n radius = 0.0\n rc, radius = RhinoGet.GetNumber(\"fillet radius\", False, radius)\n if rc != Result.Success: return rc\n\n fillet_curve = Curve.CreateFilletCurves(curve1, curve1_point_near_end, curve2, curve2_point_near_end, radius,\n True, True, True, doc.ModelAbsoluteTolerance, doc.ModelAngleToleranceDegrees)\n if fillet_curve == None or fillet_curve.Length != 1:\n return Result.Failure\n\n doc.Objects.AddCurve(fillet_curve[0])\n doc.Views.Redraw()\n return rc\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Curve", "Curve[] CreateFilletCurves(Curve curve0, Point3d point0, Curve curve1, Point3d point1, System.Double radius, System.Boolean join, System.Boolean trim, System.Boolean arcExtension, System.Double tolerance, System.Double angleTolerance)"]
+ ["Rhino.Geometry.Curve", "Curve[] CreateFilletCurves(Curve curve0, Point3d point0, Curve curve1, Point3d point1, double radius, bool join, bool trim, bool arcExtension, double tolerance, double angleTolerance)"]
]
},
{
@@ -1591,8 +1591,8 @@
"name": "Getpointdynamicdraw.py",
"code": "from Rhino import *\nfrom Rhino.Geometry import *\nfrom Rhino.Commands import *\nfrom Rhino.Input.Custom import *\nfrom scriptcontext import doc\nfrom System.Drawing import *\n\ndef RunCommand():\n gp = GetPoint()\n gp.SetCommandPrompt(\"Center point\")\n gp.Get()\n if gp.CommandResult() <> Result.Success:\n return gp.CommandResult()\n center_point = gp.Point()\n if center_point == Point3d.Unset:\n return Result.Failure\n\n gcp = GetCircleRadiusPoint(center_point)\n gcp.SetCommandPrompt(\"Radius\")\n gcp.ConstrainToConstructionPlane(False)\n gcp.SetBasePoint(center_point, True)\n gcp.DrawLineFromPoint(center_point, True)\n gcp.Get()\n if gcp.CommandResult() <> Result.Success:\n return gcp.CommandResult()\n\n radius = center_point.DistanceTo(gcp.Point())\n cplane = doc.Views.ActiveView.ActiveViewport.ConstructionPlane()\n doc.Objects.AddCircle(Circle(cplane, center_point, radius))\n doc.Views.Redraw()\n return Result.Success\n\nclass GetCircleRadiusPoint (GetPoint):\n def __init__(self, centerPoint):\n self.m_center_point = centerPoint\n \n def OnDynamicDraw(self, e):\n cplane = e.RhinoDoc.Views.ActiveView.ActiveViewport.ConstructionPlane()\n radius = self.m_center_point.DistanceTo(e.CurrentPoint)\n circle = Circle(cplane, self.m_center_point, radius)\n e.Display.DrawCircle(circle, Color.Black)\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawCircle(Circle circle, System.Drawing.Color color)"],
- ["Rhino.Input.Custom.GetPoint", "System.Void OnDynamicDraw(GetPointDrawEventArgs e)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawCircle(Circle circle, System.Drawing.Color color)"],
+ ["Rhino.Input.Custom.GetPoint", "void OnDynamicDraw(GetPointDrawEventArgs e)"]
]
},
{
@@ -1608,11 +1608,11 @@
"members": [
["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"],
["Rhino.DocObjects.ModelComponent", "string Name"],
- ["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.Geometry.Hatch", "Hatch[] Create(Curve curve, int hatchPatternIndex, double rotationRadians, double scale, double tolerance)"],
+ ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, int hatchPatternIndex, double rotationRadians, double scale)"],
["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.HatchPatternTable", "int Find(string name, bool ignoreDeleted)"],
+ ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(string name)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"]
]
},
@@ -1620,10 +1620,10 @@
"name": "Insertknot.py",
"code": "import Rhino\nimport scriptcontext\n\ndef InsertKnot():\n filter = Rhino.DocObjects.ObjectType.Curve\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select curve for knot insertion\", False, filter)\n if rc != Rhino.Commands.Result.Success: return rc\n \n curve = objref.Curve()\n if not curve: return Rhino.Commands.Result.Failure\n nurb = curve.ToNurbsCurve()\n if not nurb: return Rhino.Commands.Result.Failure\n\n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Point on curve to add knot\")\n gp.Constrain(nurb, False)\n gp.Get()\n if gp.CommandResult() == Rhino.Commands.Result.Success:\n crv, t = gp.PointOnCurve()\n if crv and nurb.Knots.InsertKnot(t):\n scriptcontext.doc.Objects.Replace(objref, nurb)\n scriptcontext.doc.Views.Redraw()\n return Rhino.Commands.Result.Success\n\nif __name__==\"__main__\":\n InsertKnot()",
"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.Input.Custom.GetPoint", "bool Constrain(Curve curve, bool allowPickingPointOffObject)"],
+ ["Rhino.Input.Custom.GetPoint", "Curve PointOnCurve(out double t)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "bool Replace(ObjRef objref, Curve curve)"],
+ ["Rhino.Geometry.Collections.NurbsCurveKnotList", "bool InsertKnot(double value)"]
]
},
{
@@ -1639,16 +1639,16 @@
"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.DocObjects.ObjRef", "Curve Curve()"],
- ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"],
- ["Rhino.Geometry.Point3f", "System.Double DistanceTo(Point3f other)"],
- ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, System.Double tolerance, System.Double overlapTolerance)"]
+ ["Rhino.Geometry.Point3d", "double DistanceTo(Point3d other)"],
+ ["Rhino.Geometry.Point3f", "double DistanceTo(Point3f other)"],
+ ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, double tolerance, double overlapTolerance)"]
]
},
{
"name": "Intersectlinecircle.py",
"code": "import rhinoscriptsyntax as rs\nfrom scriptcontext import doc\nimport Rhino\nfrom Rhino.Geometry.Intersect import Intersection, LineCircleIntersection\n\ndef RunCommand():\n rc, circle = Rhino.Input.RhinoGet.GetCircle()\n if rc != Rhino.Commands.Result.Success:\n return rc\n doc.Objects.AddCircle(circle)\n doc.Views.Redraw()\n\n rc, line = Rhino.Input.RhinoGet.GetLine()\n if rc != Rhino.Commands.Result.Success:\n return rc\n doc.Objects.AddLine(line)\n doc.Views.Redraw()\n\n lineCircleIntersect, t1, point1, t2, point2 = Intersection.LineCircle(line, circle)\n message = \"\"\n if lineCircleIntersect == LineCircleIntersection.None:\n message = \"line does not intersect circle\"\n elif lineCircleIntersect == LineCircleIntersection.Single:\n message = \"line intersects circle at point ({0},{1},{2})\".format(point1.X, point1.Y, point1.Z)\n doc.Objects.AddPoint(point1)\n elif lineCircleIntersect == LineCircleIntersection.Multiple:\n message = \"line intersects circle at points ({0},{1},{2}) and ({3},{4},{5})\".format(\n point1.X, point1.Y, point1.Z, point2.X, point2.Y, point2.Z)\n doc.Objects.AddPoint(point1)\n doc.Objects.AddPoint(point2)\n \n print message\n doc.Views.Redraw()\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "LineCircleIntersection LineCircle(Line line, Circle circle, out System.Double t1, out Point3d point1, out System.Double t2, out Point3d point2)"]
+ ["Rhino.Geometry.Intersect.Intersection", "LineCircleIntersection LineCircle(Line line, Circle circle, out double t1, out Point3d point1, out double t2, out Point3d point2)"]
]
},
{
@@ -1656,9 +1656,9 @@
"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.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)"]
+ ["Rhino.Geometry.Line", "Point3d PointAt(double t)"],
+ ["Rhino.Geometry.Vector3d", "int IsParallelTo(Vector3d other)"],
+ ["Rhino.Geometry.Intersect.Intersection", "bool LineLine(Line lineA, Line lineB, out double a, out double b)"]
]
},
{
@@ -1666,7 +1666,7 @@
"code": "import Rhino\n\ndef IsBrepBox(brep):\n zero_tolerance = 1.0e-6 #or whatever\n rc = brep.IsSolid\n if rc: rc = brep.Faces.Count == 6\n\n N = []\n for i in range(6):\n if not rc: break\n rc, plane = brep.Faces[i].TryGetPlane(zero_tolerance)\n if rc:\n v = plane.ZAxis\n v.Unitize()\n N.append(v)\n \n for i in range(6):\n count = 0\n for j in range(6):\n if not rc: break\n dot = abs(N[i] * N[j])\n if dot<=zero_tolerance: continue\n if abs(dot-1.0)<=zero_tolerance:\n count += 1\n else:\n rc = False\n\n if rc:\n if 2!=count: rc = False\n return rc\n\n\nif __name__==\"__main__\":\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select Brep\", True, Rhino.DocObjects.ObjectType.Brep)\n if rc==Rhino.Commands.Result.Success:\n brep = objref.Brep()\n if brep:\n if IsBrepBox(brep): print \"Yes it is a box\"\n else: print \"No it is not a box\"\n",
"members": [
["Rhino.Geometry.Brep", "bool IsSolid"],
- ["Rhino.Geometry.Surface", "System.Boolean TryGetPlane(out Plane plane, System.Double tolerance)"]
+ ["Rhino.Geometry.Surface", "bool TryGetPlane(out Plane plane, double tolerance)"]
]
},
{
@@ -1680,15 +1680,15 @@
"name": "Issurfaceinplane.py",
"code": "import Rhino\nfrom Rhino.Geometry import *\nimport rhinoscriptsyntax as rs\nfrom scriptcontext import doc\nimport math\n\ndef RunCommand():\n surface_id = rs.GetSurfaceObject()[0]\n if surface_id == None:\n return\n surface = rs.coercesurface(surface_id)\n\n corners = rs.GetRectangle()\n if corners == None:\n return\n \n plane = Plane(corners[0], corners[1], corners[2])\n\n is_or_isnt = \"\" if IsSurfaceInPlane(surface, plane, doc.ModelAbsoluteTolerance) else \" not \"\n print \"Surface is{0} in plane.\".format(is_or_isnt)\n\ndef IsSurfaceInPlane(surface, plane, tolerance):\n if not surface.IsPlanar(tolerance):\n return False\n \n bbox = surface.GetBoundingBox(True)\n rc = True\n for corner in bbox.GetCorners():\n if math.fabs(plane.DistanceTo(corner)) > tolerance:\n rc = False\n break\n \n return rc\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Plane", "System.Double DistanceTo(Point3d testPoint)"],
- ["Rhino.Geometry.Surface", "System.Boolean IsPlanar()"]
+ ["Rhino.Geometry.Plane", "double DistanceTo(Point3d testPoint)"],
+ ["Rhino.Geometry.Surface", "bool IsPlanar()"]
]
},
{
"name": "Leader.py",
"code": "import rhinoscriptsyntax as rs\n\ndef RunCommand():\n points = [(1,1,0), (5,1,0), (5,5,0), (9,5,0)]\n rs.AddLeader(points)\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Point2d", "System.Double DistanceTo(Point2d other)"],
+ ["Rhino.Geometry.Point2d", "double DistanceTo(Point2d other)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLeader(Plane plane, IEnumerable points)"]
]
},
@@ -1698,32 +1698,32 @@
"members": [
["Rhino.DocObjects.Layer", "string FullPath"],
["Rhino.DocObjects.Layer", "bool IsLocked"],
- ["Rhino.DocObjects.Layer", "System.Boolean CommitChanges()"]
+ ["Rhino.DocObjects.Layer", "bool CommitChanges()"]
]
},
{
"name": "Loft.py",
"code": "import rhinoscriptsyntax as rs\n\ndef RunCommand():\n crvids = rs.GetObjects(message=\"select curves to loft\", filter=rs.filter.curve, minimum_count=2)\n if not crvids: return\n\n rs.AddLoftSrf(object_ids=crvids, loft_type = 3) #3 = tight\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Brep", "Brep[] CreateFromLoft(IEnumerable curves, Point3d start, Point3d end, LoftType loftType, System.Boolean closed)"]
+ ["Rhino.Geometry.Brep", "Brep[] CreateFromLoft(IEnumerable curves, Point3d start, Point3d end, LoftType loftType, bool closed)"]
]
},
{
"name": "Makerhinocontours.py",
"code": "from System import *\nfrom Rhino import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Geometry import *\nfrom Rhino.Input import *\nfrom Rhino.Input.Custom import *\nfrom Rhino.Commands import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n filter = ObjectType.Surface | ObjectType.PolysrfFilter | ObjectType.Mesh\n rc, obj_refs = RhinoGet.GetMultipleObjects(\"Select objects to contour\", False, filter)\n if rc <> Result.Success:\n return rc\n\n gp = GetPoint()\n gp.SetCommandPrompt(\"Contour plane base point\")\n gp.Get()\n if gp.CommandResult() <> Result.Success:\n return gp.CommandResult()\n base_point = gp.Point()\n\n gp.DrawLineFromPoint(base_point, True)\n gp.SetCommandPrompt(\"Direction perpendicular to contour planes\")\n gp.Get()\n if gp.CommandResult() <> Result.Success:\n return gp.CommandResult()\n end_point = gp.Point()\n\n if base_point.DistanceTo(end_point) < RhinoMath.ZeroTolerance:\n return Result.Nothing\n\n distance = 1.0\n rc, distance = RhinoGet.GetNumber(\"Distance between contours\", False, distance)\n if rc <> Result.Success:\n return rc\n\n interval = Math.Abs(distance)\n\n for obj_ref in obj_refs:\n geometry = obj_ref.Geometry()\n if geometry == None:\n return Result.Failure\n\n if type(geometry) == Brep:\n curves = Brep.CreateContourCurves(geometry, base_point, end_point, interval)\n else:\n curves = Mesh.CreateContourCurves(geometry, base_point, end_point, interval)\n\n for curve in curves:\n curve_object_id = doc.Objects.AddCurve(curve)\n doc.Objects.Select(curve_object_id)\n\n if curves <> None:\n doc.Views.Redraw()\n return Result.Success\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Brep", "Curve[] CreateContourCurves(Brep brepToContour, Point3d contourStart, Point3d contourEnd, System.Double interval)"],
- ["Rhino.Geometry.Mesh", "Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, System.Double interval, System.Double tolerance)"]
+ ["Rhino.Geometry.Brep", "Curve[] CreateContourCurves(Brep brepToContour, Point3d contourStart, Point3d contourEnd, double interval)"],
+ ["Rhino.Geometry.Mesh", "Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, double interval, double tolerance)"]
]
},
{
"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.DisplayPipeline", "void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"],
+ ["Rhino.Display.DisplayPipeline", "void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"],
+ ["Rhino.Display.DisplayConduit", "void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)"],
+ ["Rhino.Display.DisplayConduit", "void PreDrawObjects(DrawEventArgs e)"]
]
},
{
@@ -1738,9 +1738,9 @@
"name": "Modifylightcolor.py",
"code": "from Rhino import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Input import *\nfrom Rhino.UI import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n rc, obj_ref = RhinoGet.GetOneObject(\n \"Select light to change color\", \n True,\n ObjectType.Light)\n if rc != Result.Success:\n return rc\n light = obj_ref.Light()\n if light == None:\n return Result.Failure\n\n b, color = Dialogs.ShowColorDialog(light.Diffuse)\n if b:\n light.Diffuse = color\n \n doc.Lights.Modify(obj_ref.ObjectId, light)\n return Result.Success\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.UI.Dialogs", "System.Boolean ShowColorDialog(ref System.Drawing.Color color)"],
+ ["Rhino.UI.Dialogs", "bool ShowColorDialog(ref System.Drawing.Color color)"],
["Rhino.Geometry.Light", "Color Diffuse"],
- ["Rhino.DocObjects.Tables.LightTable", "System.Boolean Modify(System.Guid id, Geometry.Light light)"]
+ ["Rhino.DocObjects.Tables.LightTable", "bool Modify(System.Guid id, Geometry.Light light)"]
]
},
{
@@ -1763,15 +1763,15 @@
"name": "Nurbscurveincreasedegree.py",
"code": "from Rhino import *\nfrom Rhino.Commands import *\nfrom Rhino.Input import *\nfrom Rhino.DocObjects import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n rc, obj_ref = RhinoGet.GetOneObject(\"Select curve\", False, ObjectType.Curve)\n if rc != Result.Success: return rc\n if obj_ref == None: return Result.Failure\n curve = obj_ref.Curve()\n if curve == None: return Result.Failure\n nurbs_curve = curve.ToNurbsCurve()\n\n new_degree = -1\n rc, new_degree = RhinoGet.GetInteger(\n \"New degree <{0}...11>\".format(nurbs_curve.Degree), True, new_degree, nurbs_curve.Degree, 11)\n if rc != Result.Success: return rc\n\n rc = Result.Failure\n if nurbs_curve.IncreaseDegree(new_degree):\n if doc.Objects.Replace(obj_ref.ObjectId, nurbs_curve):\n rc = Result.Success\n\n print \"Result: {0}\".format(rc)\n doc.Views.Redraw()\n return rc\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.NurbsCurve", "System.Boolean IncreaseDegree(System.Int32 desiredDegree)"]
+ ["Rhino.Geometry.NurbsCurve", "bool IncreaseDegree(int desiredDegree)"]
]
},
{
"name": "Nurbssurfaceincreasedegree.py",
"code": "from Rhino import *\nfrom Rhino.Commands import *\nfrom Rhino.Input import *\nfrom Rhino.DocObjects import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n rc, obj_ref = RhinoGet.GetOneObject(\"Select surface\", False, ObjectType.Surface)\n if rc != Result.Success: return rc\n if obj_ref == None: return Result.Failure\n surface = obj_ref.Surface()\n if surface == None: return Result.Failure\n nurbs_surface = surface.ToNurbsSurface()\n\n new_u_degree = -1\n rc, new_u_degree = RhinoGet.GetInteger(\n \"New U degree <{0}...11>\".format(nurbs_surface.Degree(0)), True, new_u_degree, nurbs_surface.Degree(0), 11)\n if rc != Result.Success: return rc\n \n new_v_degree = -1\n rc, new_v_degree = RhinoGet.GetInteger(\n \"New V degree <{0}...11>\".format(nurbs_surface.Degree(1)), True, new_v_degree, nurbs_surface.Degree(1), 11)\n if rc != Result.Success: return rc\n\n rc = Result.Failure\n if nurbs_surface.IncreaseDegreeU(new_u_degree):\n if nurbs_surface.IncreaseDegreeV(new_v_degree):\n if doc.Objects.Replace(obj_ref.ObjectId, nurbs_surface):\n rc = Result.Success\n\n print \"Result: {0}\".format(rc)\n doc.Views.Redraw()\n return rc\n\nif __name__==\"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.NurbsSurface", "System.Boolean IncreaseDegreeU(System.Int32 desiredDegree)"],
- ["Rhino.Geometry.NurbsSurface", "System.Boolean IncreaseDegreeV(System.Int32 desiredDegree)"]
+ ["Rhino.Geometry.NurbsSurface", "bool IncreaseDegreeU(int desiredDegree)"],
+ ["Rhino.Geometry.NurbsSurface", "bool IncreaseDegreeV(int desiredDegree)"]
]
},
{
@@ -1785,11 +1785,11 @@
"name": "Objectdisplaymode.py",
"code": "import Rhino\nimport scriptcontext\n\ndef ObjectDisplayMode():\n filter = Rhino.DocObjects.ObjectType.Brep | Rhino.DocObjects.ObjectType.Mesh\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select mesh or surface\", True, filter)\n if rc != Rhino.Commands.Result.Success: return rc;\n viewportId = scriptcontext.doc.Views.ActiveView.ActiveViewportID\n\n attr = objref.Object().Attributes\n if attr.HasDisplayModeOverride(viewportId):\n print \"Removing display mode override from object\"\n attr.RemoveDisplayModeOverride(viewportId)\n else:\n modes = Rhino.Display.DisplayModeDescription.GetDisplayModes()\n mode = None\n if len(modes) == 1:\n mode = modes[0]\n else:\n go = Rhino.Input.Custom.GetOption()\n go.SetCommandPrompt(\"Select display mode\")\n str_modes = []\n for m in modes:\n s = m.EnglishName.replace(\" \",\"\").replace(\"-\",\"\")\n str_modes.append(s)\n go.AddOptionList(\"DisplayMode\", str_modes, 0)\n if go.Get()==Rhino.Input.GetResult.Option:\n mode = modes[go.Option().CurrentListOptionIndex]\n if not mode: return Rhino.Commands.Result.Cancel\n attr.SetDisplayModeOverride(mode, viewportId)\n scriptcontext.doc.Objects.ModifyAttributes(objref, attr, False)\n scriptcontext.doc.Views.Redraw()\n\n\nif __name__==\"__main__\":\n ObjectDisplayMode()",
"members": [
- ["Rhino.DocObjects.ObjectAttributes", "System.Boolean HasDisplayModeOverride(System.Guid viewportId)"],
- ["Rhino.DocObjects.ObjectAttributes", "System.Void RemoveDisplayModeOverride(System.Guid rhinoViewportId)"],
- ["Rhino.DocObjects.ObjectAttributes", "System.Boolean SetDisplayModeOverride(Display.DisplayModeDescription mode, System.Guid rhinoViewportId)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionList(LocalizeStringPair optionName, IEnumerable listValues, System.Int32 listCurrentIndex)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionList(System.String englishOptionName, IEnumerable listValues, System.Int32 listCurrentIndex)"]
+ ["Rhino.DocObjects.ObjectAttributes", "bool HasDisplayModeOverride(System.Guid viewportId)"],
+ ["Rhino.DocObjects.ObjectAttributes", "void RemoveDisplayModeOverride(System.Guid rhinoViewportId)"],
+ ["Rhino.DocObjects.ObjectAttributes", "bool SetDisplayModeOverride(Display.DisplayModeDescription mode, System.Guid rhinoViewportId)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionList(LocalizeStringPair optionName, IEnumerable listValues, int listCurrentIndex)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionList(string englishOptionName, IEnumerable listValues, int listCurrentIndex)"]
]
},
{
@@ -1804,19 +1804,19 @@
"name": "Orientonsrf.py",
"code": "import Rhino\nimport scriptcontext\nimport System.Guid\n\ndef OrientOnSrf():\n # Select objects to orient\n go = Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select objects to orient\")\n go.SubObjectSelect = False\n go.GroupSelect = True\n go.GetMultiple(1, 0)\n if go.CommandResult()!=Rhino.Commands.Result.Success:\n return go.CommandResult()\n\n # Point to orient from\n gp = Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Point to orient from\")\n gp.Get()\n if gp.CommandResult()!=Rhino.Commands.Result.Success:\n return gp.CommandResult()\n \n # Define source plane\n view = gp.View()\n if not view:\n view = doc.Views.ActiveView\n if not view: return Rhino.Commands.Result.Failure\n\n source_plane = view.ActiveViewport.ConstructionPlane()\n source_plane.Origin = gp.Point()\n\n # Surface to orient on\n gs = Rhino.Input.Custom.GetObject()\n gs.SetCommandPrompt(\"Surface to orient on\")\n gs.GeometryFilter = Rhino.DocObjects.ObjectType.Surface\n gs.SubObjectSelect = True\n gs.DeselectAllBeforePostSelect = False\n gs.OneByOnePostSelect = True\n gs.Get()\n if gs.CommandResult()!=Rhino.Commands.Result.Success:\n return gs.CommandResult()\n\n objref = gs.Object(0)\n # get selected surface object\n obj = objref.Object()\n if not obj: return Rhino.Commands.Result.Failure\n # get selected surface (face)\n surface = objref.Surface()\n if not surface: return Rhino.Commands.Result.Failure\n # Unselect surface\n obj.Select(False)\n\n # Point on surface to orient to\n gp.SetCommandPrompt(\"Point on surface to orient to\")\n gp.Constrain(surface, False)\n gp.Get()\n if gp.CommandResult()!=Rhino.Commands.Result.Success:\n return gp.CommandResult()\n\n # Do transformation\n rc = Rhino.Commands.Result.Failure\n getrc, u, v = surface.ClosestPoint(gp.Point())\n if getrc:\n getrc, target_plane = surface.FrameAt(u,v)\n if getrc:\n # Build transformation\n xform = Rhino.Geometry.Transform.PlaneToPlane(source_plane, target_plane)\n # Do the transformation. In this example, we will copy the original objects\n delete_original = False\n for i in range(go.ObjectCount):\n rhobj = go.Object(i)\n scriptcontext.doc.Objects.Transform(rhobj, xform, delete_original)\n scriptcontext.doc.Views.Redraw()\n rc = Rhino.Commands.Result.Success\n return rc\n\n\nif __name__==\"__main__\":\n OrientOnSrf()\n",
"members": [
- ["Rhino.DocObjects.RhinoObject", "System.Int32 Select(System.Boolean on)"],
+ ["Rhino.DocObjects.RhinoObject", "int Select(bool on)"],
["Rhino.DocObjects.ObjRef", "RhinoObject Object()"],
["Rhino.DocObjects.ObjRef", "Surface Surface()"],
- ["Rhino.Geometry.Surface", "System.Boolean ClosestPoint(Point3d testPoint, out System.Double u, out System.Double v)"],
- ["Rhino.Geometry.Surface", "System.Boolean FrameAt(System.Double u, System.Double v, out Plane frame)"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"],
+ ["Rhino.Geometry.Surface", "bool ClosestPoint(Point3d testPoint, out double u, out double v)"],
+ ["Rhino.Geometry.Surface", "bool FrameAt(double u, double v, out Plane frame)"],
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Surface surface, bool 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.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, System.Boolean deleteOriginal)"]
+ ["Rhino.Input.Custom.GetObject", "ObjRef Object(int index)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, bool deleteOriginal)"]
]
},
{
@@ -1841,9 +1841,9 @@
["Rhino.Geometry.SurfaceCurvature", "double Mean"],
["Rhino.Geometry.SurfaceCurvature", "Vector3d Normal"],
["Rhino.Geometry.SurfaceCurvature", "Point3d Point"],
- ["Rhino.Geometry.SurfaceCurvature", "Vector3d Direction(System.Int32 direction)"],
- ["Rhino.Geometry.SurfaceCurvature", "System.Double Kappa(System.Int32 direction)"],
- ["Rhino.Geometry.Surface", "SurfaceCurvature CurvatureAt(System.Double u, System.Double v)"]
+ ["Rhino.Geometry.SurfaceCurvature", "Vector3d Direction(int direction)"],
+ ["Rhino.Geometry.SurfaceCurvature", "double Kappa(int direction)"],
+ ["Rhino.Geometry.Surface", "SurfaceCurvature CurvatureAt(double u, double v)"]
]
},
{
@@ -1851,23 +1851,23 @@
"code": "from scriptcontext import doc\nimport Rhino\n\ndef RunCommand():\n instanceDefinitions = doc.InstanceDefinitions\n instanceDefinitionCount = instanceDefinitions.Count\n\n if instanceDefinitionCount == 0:\n print \"Document contains no instance definitions.\"\n return\n\n dump = Rhino.FileIO.TextLog()\n dump.IndentSize = 4\n\n for i in range(0, instanceDefinitionCount):\n DumpInstanceDefinition(instanceDefinitions[i], dump, True)\n\n print dump.ToString()\n\ndef DumpInstanceDefinition(instanceDefinition, dump, isRoot):\n if instanceDefinition != None and not instanceDefinition.IsDeleted:\n if isRoot:\n node = '-'\n else:\n node = '+'\n dump.Print(u\"{0} Instance definition {1} = {2}\\n\".format(node, instanceDefinition.Index, instanceDefinition.Name))\n\n if instanceDefinition.ObjectCount > 0:\n dump.PushIndent()\n for i in range(0, instanceDefinition.ObjectCount):\n obj = instanceDefinition.Object(i)\n if obj != None and type(obj) == Rhino.DocObjects.InstanceObject:\n DumpInstanceDefinition(obj.InstanceDefinition, dump, False) # Recursive...\n else:\n dump.Print(u\"+ Object {0} = {1}\\n\".format(i, obj.ShortDescription(False)))\n dump.PopIndent()\n\nif __name__ == \"__main__\":\n RunCommand()\n",
"members": [
["Rhino.RhinoDoc", "InstanceDefinitionTable InstanceDefinitions"],
- ["Rhino.FileIO.TextLog", "System.Void PopIndent()"],
- ["Rhino.FileIO.TextLog", "System.Void Print(System.String text)"],
- ["Rhino.FileIO.TextLog", "System.Void PushIndent()"]
+ ["Rhino.FileIO.TextLog", "void PopIndent()"],
+ ["Rhino.FileIO.TextLog", "void Print(string text)"],
+ ["Rhino.FileIO.TextLog", "void PushIndent()"]
]
},
{
"name": "Projectpointstobreps.py",
"code": "import rhinoscriptsyntax as rs\nfrom scriptcontext import *\nfrom Rhino.Geometry import *\n\ndef RunCommand():\n srfid = rs.GetObject(\"select surface\", rs.filter.surface | rs.filter.polysurface)\n if not srfid: return\n brep = rs.coercebrep(srfid)\n if not brep: return\n \n pts = Intersect.Intersection.ProjectPointsToBreps(\n [brep], # brep on which to project\n [Point3d(0, 0, 0), Point3d(3,0,3), Point3d(-2,0,-2)], # points to project\n Vector3d(0, 1, 0), # project on Y axis\n doc.ModelAbsoluteTolerance)\n\n if pts != None and pts.Length > 0:\n for pt in pts:\n doc.Objects.AddPoint(pt)\n\n doc.Views.Redraw()\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToBreps(IEnumerable breps, IEnumerable points, Vector3d direction, System.Double tolerance)"]
+ ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToBreps(IEnumerable breps, IEnumerable points, Vector3d direction, double tolerance)"]
]
},
{
"name": "Projectpointstomeshesex.py",
"code": "from System.Collections.Generic import *\nfrom Rhino import *\nfrom Rhino.Commands import *\nfrom Rhino.Geometry import *\nfrom Rhino.Geometry.Intersect import *\nfrom Rhino.Input import *\nfrom Rhino.DocObjects import *\nfrom scriptcontext import doc\n\ndef RunCommand():\n rc, obj_ref = RhinoGet.GetOneObject(\"mesh\", False, ObjectType.Mesh)\n if rc != Result.Success: return rc\n mesh = obj_ref.Mesh()\n\n rc, obj_ref_pts = RhinoGet.GetMultipleObjects(\"points\", False, ObjectType.Point)\n if rc != Result.Success: return rc\n points = []\n for obj_ref_pt in obj_ref_pts:\n pt = obj_ref_pt.Point().Location\n points.append(pt)\n\n prj_points, indices = Intersection.ProjectPointsToMeshesEx({mesh}, points, Vector3d(0, 1, 0), 0)\n for prj_pt in prj_points: \n doc.Objects.AddPoint(prj_pt)\n doc.Views.Redraw()\n return Result.Success\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToMeshesEx(IEnumerable meshes, IEnumerable points, Vector3d direction, System.Double tolerance, out System.Int32[] indices)"]
+ ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToMeshesEx(IEnumerable meshes, IEnumerable points, Vector3d direction, double tolerance, out int indices)"]
]
},
{
@@ -1876,14 +1876,14 @@
"members": [
["Rhino.DocObjects.InstanceDefinition", "bool IsDeleted"],
["Rhino.DocObjects.InstanceDefinition", "bool IsReference"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "System.Boolean Modify(System.Int32 idefIndex, System.String newName, System.String newDescription, System.Boolean quiet)"]
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "bool Modify(int idefIndex, string newName, string newDescription, bool quiet)"]
]
},
{
"name": "Replacecolordialog.py",
"code": "from Rhino import *\nfrom Rhino.Commands import *\nfrom Rhino.UI import *\nfrom System.Windows.Forms import *\n\nm_dlg = None\n\ndef RunCommand():\n Dialogs.SetCustomColorDialog(OnSetCustomColorDialog)\n return Result.Success\n\ndef OnSetCustomColorDialog(sender, e):\n m_dlg = ColorDialog()\n if m_dlg.ShowDialog(None) == DialogResult.OK:\n c = m_dlg.Color\n e.SelectedColor = c\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.UI.Dialogs", "System.Void SetCustomColorDialog(EventHandler handler)"]
+ ["Rhino.UI.Dialogs", "void SetCustomColorDialog(EventHandler handler)"]
]
},
{
@@ -1906,12 +1906,12 @@
"name": "Screencaptureview.py",
"code": "from scriptcontext import doc\nfrom System.Windows.Forms import *\nimport Rhino.UI\nfrom System import Environment\n\ndef RunCommand():\n file_name = \"\";\n\n bitmap = doc.Views.ActiveView.CaptureToBitmap(True, True, True)\n\n # copy bitmap to clipboard\n Clipboard.SetImage(bitmap)\n\n\n # save bitmap to file\n save_file_dialog = Rhino.UI.SaveFileDialog()\n save_file_dialog.Filter = \"*.bmp\"\n save_file_dialog.InitialDirectory = \\\n Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)\n\n if save_file_dialog.ShowDialog() == DialogResult.OK:\n file_name = save_file_dialog.FileName\n\n if file_name != \"\":\n bitmap.Save(file_name)\n\n return Rhino.Commands.Result.Success\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Display.RhinoView", "System.Drawing.Bitmap CaptureToBitmap(System.Boolean grid, System.Boolean worldAxes, System.Boolean cplaneAxes)"],
+ ["Rhino.Display.RhinoView", "System.Drawing.Bitmap CaptureToBitmap(bool grid, bool worldAxes, bool cplaneAxes)"],
["Rhino.UI.SaveFileDialog", "SaveFileDialog()"],
["Rhino.UI.SaveFileDialog", "string FileName"],
["Rhino.UI.SaveFileDialog", "string Filter"],
["Rhino.UI.SaveFileDialog", "string InitialDirectory"],
- ["Rhino.UI.SaveFileDialog", "System.Boolean ShowSaveDialog()"]
+ ["Rhino.UI.SaveFileDialog", "bool ShowSaveDialog()"]
]
},
{
@@ -1920,7 +1920,7 @@
"members": [
["Rhino.DocObjects.Layer", "string Name"],
["Rhino.DocObjects.Tables.LayerTable", "Layer CurrentLayer"],
- ["Rhino.DocObjects.Tables.ObjectTable", "RhinoObject[] FindByLayer(System.String layerName)"]
+ ["Rhino.DocObjects.Tables.ObjectTable", "RhinoObject[] FindByLayer(string layerName)"]
]
},
{
@@ -1952,7 +1952,7 @@
"members": [
["Rhino.Geometry.TextEntity", "TextEntity()"],
["Rhino.Geometry.TextEntity", "TextJustification Justification"],
- ["Rhino.DocObjects.Tables.FontTable", "System.Int32 FindOrCreate(System.String face, System.Boolean bold, System.Boolean italic)"],
+ ["Rhino.DocObjects.Tables.FontTable", "int FindOrCreate(string face, bool bold, bool italic)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddText(Text3d text3d)"]
]
},
@@ -1960,7 +1960,7 @@
"name": "Tightboundingbox.py",
"code": "from scriptcontext import doc\nimport rhinoscriptsyntax as rs\nfrom Rhino.Geometry import *\nfrom Rhino.Input import *\nfrom Rhino.DocObjects import *\nfrom Rhino.Commands import *\nfrom System.Collections.Generic import *\n\ndef RunCommand():\n rc, obj_ref = RhinoGet.GetOneObject(\n \"Select surface to split\", True, ObjectType.Surface)\n if rc != Result.Success:\n return rc\n brep_face = obj_ref.Surface()\n if brep_face == None:\n return Result.Failure\n\n rc, obj_ref = RhinoGet.GetOneObject(\n \"Select cutting curve\", True, ObjectType.Curve)\n if rc != Result.Success:\n return rc\n curve = obj_ref.Curve()\n if curve == None:\n return Result.Failure\n\n curves = List[Curve]([curve])\n split_brep = brep_face.Split(\n curves, doc.ModelAbsoluteTolerance)\n\n if split_brep == None:\n RhinoApp.WriteLine(\"Unable to split surface.\")\n return Result.Nothing\n\n meshes = Mesh.CreateFromBrep(split_brep)\n print type(meshes)\n for mesh in meshes:\n bbox = mesh.GetBoundingBox(True)\n bbox_type = bbox.IsDegenerate(doc.ModelAbsoluteTolerance)\n if bbox_type == 1: # rectangle\n # box with 8 corners flattened to rectangle with 4 corners\n box_corners = bbox.GetCorners()\n rectangle_corners = []\n for corner_point in box_corners:\n if corner_point not in rectangle_corners:\n rectangle_corners.append(corner_point)\n # add 1st point as last to close the loop\n rectangle_corners.append(rectangle_corners[0])\n doc.Objects.AddPolyline(rectangle_corners)\n doc.Views.Redraw()\n elif bbox_type == 0: # box\n brep_box = Box(bbox).ToBrep()\n doc.Objects.AddBrep(brep_box)\n doc.Views.Redraw()\n else: # bbox invalid, point, or line\n return Result.Failure\n\n return Result.Success\n\nif __name__ == \"__main__\":\n RunCommand()",
"members": [
- ["Rhino.Geometry.BrepFace", "Brep Split(IEnumerable curves, System.Double tolerance)"],
+ ["Rhino.Geometry.BrepFace", "Brep Split(IEnumerable curves, double tolerance)"],
["Rhino.Geometry.Mesh", "Mesh[] CreateFromBrep(Brep brep)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPolyline(IEnumerable points)"]
]
@@ -1969,7 +1969,7 @@
"name": "Transformbrep.py",
"code": "import Rhino\nimport scriptcontext\n\ndef TransformBrep():\n rc, objref = Rhino.Input.RhinoGet.GetOneObject(\"Select brep\", True, Rhino.DocObjects.ObjectType.Brep)\n if rc!=Rhino.Commands.Result.Success: return\n \n # Simple translation transformation\n xform = Rhino.Geometry.Transform.Translation(18,-18,25)\n scriptcontext.doc.Objects.Transform(objref, xform, True)\n scriptcontext.doc.Views.Redraw()\n\nif __name__==\"__main__\":\n TransformBrep()",
"members": [
- ["Rhino.Geometry.Transform", "Transform Translation(System.Double dx, System.Double dy, System.Double dz)"]
+ ["Rhino.Geometry.Transform", "Transform Translation(double dx, double dy, double dz)"]
]
},
{
@@ -1992,20 +1992,20 @@
"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.RhinoView", "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.RhinoViewport", "bool SetTraceImage(string bitmapFileName, Plane plane, double width, double height, bool grayscale, bool filtered)"],
["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.UI.OpenFileDialog", "bool ShowOpenDialog()"],
+ ["Rhino.Input.Custom.GetPoint", "bool ConstrainToConstructionPlane(bool throughBasePoint)"],
["Rhino.Input.Custom.GetBaseClass", "Result CommandResult()"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Double Number()"],
+ ["Rhino.Input.Custom.GetBaseClass", "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.Input.Custom.GetNumber", "void SetLowerLimit(double lowerLimit, bool strictlyGreaterThan)"],
["Rhino.DocObjects.Tables.ViewTable", "RhinoView ActiveView"]
]
},
@@ -2023,7 +2023,7 @@
"code": "Partial Class Examples\n Public Shared Function AddChildLayer(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Get an existing layer\n Dim default_name As String = doc.Layers.CurrentLayer.Name\n\n ' Prompt the user to enter a layer name\n Dim gs As New Rhino.Input.Custom.GetString()\n gs.SetCommandPrompt(\"Name of existing layer\")\n gs.SetDefaultString(default_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 Dim index As Integer = doc.Layers.Find(layer_name, True)\n If index < 0 Then\n Return Rhino.Commands.Result.Cancel\n End If\n\n Dim parent_layer As Rhino.DocObjects.Layer = doc.Layers(index)\n\n ' Create a child layer\n Dim child_name As String = parent_layer.Name + \"_child\"\n Dim childlayer As New Rhino.DocObjects.Layer()\n childlayer.ParentLayerId = parent_layer.Id\n childlayer.Name = child_name\n childlayer.Color = System.Drawing.Color.Red\n\n index = doc.Layers.Add(childlayer)\n If index < 0 Then\n Rhino.RhinoApp.WriteLine(\"Unable to add {0} layer.\", child_name)\n Return Rhino.Commands.Result.Failure\n End If\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class",
"members": [
["Rhino.DocObjects.Layer", "Guid ParentLayerId"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.Int32 Add(Layer layer)"]
+ ["Rhino.DocObjects.Tables.LayerTable", "int Add(Layer layer)"]
]
},
{
@@ -2032,7 +2032,7 @@
"members": [
["Rhino.Geometry.Circle", "Circle(Plane plane, double radius)"],
["Rhino.Geometry.Point3d", "Point3d(double x, double y, double z)"],
- ["Rhino.DocObjects.Tables.ViewTable", "System.Void Redraw()"],
+ ["Rhino.DocObjects.Tables.ViewTable", "void Redraw()"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddCircle(Circle circle)"]
]
},
@@ -2041,8 +2041,8 @@
"code": "Partial Class Examples\n Public Shared Function AddClippingPlane(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Define the corners of the clipping plane\n Dim corners As Rhino.Geometry.Point3d() = Nothing\n Dim rc As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetRectangle(corners)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n ' Get the active view\n Dim view As Rhino.Display.RhinoView = doc.Views.ActiveView\n If view Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim p0 As Rhino.Geometry.Point3d = corners(0)\n Dim p1 As Rhino.Geometry.Point3d = corners(1)\n Dim p3 As Rhino.Geometry.Point3d = corners(3)\n\n ' Create a plane from the corner points\n Dim plane As New Rhino.Geometry.Plane(p0, p1, p3)\n\n ' Add a clipping plane object to the document\n Dim id As Guid = doc.Objects.AddClippingPlane(plane, p0.DistanceTo(p1), p0.DistanceTo(p3), view.ActiveViewportID)\n If id <> 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.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.FileIO.File3dmObjectTable", "System.Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, System.Guid clippedViewportId)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddClippingPlane(Plane plane, double uMagnitude, double vMagnitude, System.Guid clippedViewportId)"],
["Rhino.Input.RhinoGet", "Result GetRectangle(out Point3d[] corners)"]
]
},
@@ -2052,26 +2052,26 @@
"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(bool capBottom, bool capTop)"]
]
},
{
"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.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.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.RhinoApp", "void WriteLine(string format, object arg0)"],
+ ["Rhino.RhinoApp", "void WriteLine(string message)"],
+ ["Rhino.DocObjects.Layer", "bool IsValidName(string name)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void AcceptNothing(bool enable)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void SetDefaultString(string defaultValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "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)"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.String GetUnusedLayerName()"],
- ["Rhino.DocObjects.Tables.LayerTable", "System.String GetUnusedLayerName(System.Boolean ignoreDeleted)"]
+ ["Rhino.DocObjects.Tables.LayerTable", "int Add(string layerName, System.Drawing.Color layerColor)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "int Find(string layerName, bool ignoreDeletedLayers)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "Layer FindName(string layerName)"],
+ ["Rhino.DocObjects.Tables.LayerTable", "string GetUnusedLayerName()"],
+ ["Rhino.DocObjects.Tables.LayerTable", "string GetUnusedLayerName(bool ignoreDeleted)"]
]
},
{
@@ -2079,14 +2079,14 @@
"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.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.DocObjects.RhinoObject", "bool CommitChanges()"],
+ ["Rhino.Display.RhinoPageView", "DetailViewObject AddDetailView(string title, Geometry.Point2d corner0, Geometry.Point2d corner1, DefinedViewportProjection initialProjection)"],
+ ["Rhino.Display.RhinoPageView", "bool SetActiveDetail(System.Guid detailId)"],
+ ["Rhino.Display.RhinoPageView", "void SetPageAsActive()"],
+ ["Rhino.Display.RhinoViewport", "bool 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.Tables.ViewTable", "RhinoPageView AddPageView(System.String title, System.Double pageWidth, System.Double pageHeight)"],
+ ["Rhino.Geometry.DetailView", "bool SetScale(double modelLength, Rhino.UnitSystem modelUnits, double pageLength, Rhino.UnitSystem pageUnits)"],
+ ["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView AddPageView(string title, double pageWidth, double pageHeight)"],
["Rhino.DocObjects.Tables.ViewTable", "RhinoPageView[] GetPageViews()"]
]
},
@@ -2094,14 +2094,14 @@
"name": "Addline.vb",
"code": "Partial Class Examples\n Public Shared Function AddLine(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim gp As New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Start of line\")\n gp.Get()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n\n Dim pt_start As Rhino.Geometry.Point3d = gp.Point()\n\n gp.SetCommandPrompt(\"End of line\")\n gp.SetBasePoint(pt_start, False)\n gp.DrawLineFromPoint(pt_start, True)\n gp.Get()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n\n Dim pt_end As Rhino.Geometry.Point3d = gp.Point()\n Dim v As Rhino.Geometry.Vector3d = pt_end - pt_start\n If v.IsTiny(Rhino.RhinoMath.ZeroTolerance) Then\n Return Rhino.Commands.Result.[Nothing]\n End If\n\n If doc.Objects.AddLine(pt_start, pt_end) <> 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.Vector2d", "System.Boolean IsTiny(System.Double tolerance)"],
- ["Rhino.Geometry.Vector3d", "System.Boolean IsTiny(System.Double tolerance)"],
+ ["Rhino.Geometry.Vector2d", "bool IsTiny(double tolerance)"],
+ ["Rhino.Geometry.Vector3d", "bool IsTiny(double tolerance)"],
["Rhino.Input.Custom.GetPoint", "GetPoint()"],
- ["Rhino.Input.Custom.GetPoint", "System.Void DrawLineFromPoint(Point3d startPoint, System.Boolean showDistanceInStatusBar)"],
+ ["Rhino.Input.Custom.GetPoint", "void DrawLineFromPoint(Point3d startPoint, bool showDistanceInStatusBar)"],
["Rhino.Input.Custom.GetPoint", "GetResult Get()"],
- ["Rhino.Input.Custom.GetPoint", "System.Void SetBasePoint(Point3d basePoint, System.Boolean showDistanceInStatusBar)"],
+ ["Rhino.Input.Custom.GetPoint", "void SetBasePoint(Point3d basePoint, bool showDistanceInStatusBar)"],
["Rhino.Input.Custom.GetBaseClass", "Point3d Point()"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Void SetCommandPrompt(System.String prompt)"],
+ ["Rhino.Input.Custom.GetBaseClass", "void SetCommandPrompt(string prompt)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLine(Point3d from, Point3d to)"]
]
},
@@ -2118,7 +2118,7 @@
"code": "Imports Rhino.Geometry\n\nPartial Class Examples\n Public Shared Function AddLinearDimension2(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim origin As New Point3d(1, 1, 0)\n Dim offset As New Point3d(11, 1, 0)\n Dim pt As New Point3d((offset.X - origin.X) / 2, 3, 0)\n\n Dim plane__1 As Plane = Plane.WorldXY\n plane__1.Origin = origin\n\n Dim u As Double, v As Double\n plane__1.ClosestParameter(origin, u, v)\n Dim ext1 As New Point2d(u, v)\n\n plane__1.ClosestParameter(offset, u, v)\n Dim ext2 As New Point2d(u, v)\n\n plane__1.ClosestParameter(pt, u, v)\n Dim linePt As New Point2d(u, v)\n\n Dim dimension As New LinearDimension(plane__1, ext1, ext2, linePt)\n If doc.Objects.AddLinearDimension(dimension) <> 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.LinearDimension", "LinearDimension(Plane dimensionPlane, Point2d extensionLine1End, Point2d extensionLine2End, Point2d pointOnDimensionLine)"],
- ["Rhino.Geometry.Plane", "System.Boolean ClosestParameter(Point3d testPoint, out System.Double s, out System.Double t)"]
+ ["Rhino.Geometry.Plane", "bool ClosestParameter(Point3d testPoint, out double s, out double t)"]
]
},
{
@@ -2129,12 +2129,12 @@
["Rhino.Geometry.Mesh", "MeshFaceList Faces"],
["Rhino.Geometry.Mesh", "MeshVertexNormalList Normals"],
["Rhino.Geometry.Mesh", "MeshVertexList Vertices"],
- ["Rhino.Geometry.Mesh", "System.Boolean Compact()"],
+ ["Rhino.Geometry.Mesh", "bool 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.MeshVertexList", "int Add(double x, double y, double z)"],
+ ["Rhino.Geometry.Collections.MeshVertexList", "int Add(float x, float y, float z)"],
+ ["Rhino.Geometry.Collections.MeshVertexNormalList", "bool ComputeNormals()"],
+ ["Rhino.Geometry.Collections.MeshFaceList", "int AddFace(int vertex1, int vertex2, int vertex3, int vertex4)"]
]
},
{
@@ -2144,14 +2144,14 @@
["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.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.Display.RhinoViewport", "bool PopViewProjection()"],
+ ["Rhino.Display.RhinoViewport", "void PushViewProjection()"],
+ ["Rhino.Display.RhinoViewport", "void SetCameraDirection(Vector3d cameraDirection, bool updateTargetLocation)"],
+ ["Rhino.Display.RhinoViewport", "void SetCameraLocation(Point3d cameraLocation, bool updateTargetLocation)"],
+ ["Rhino.DocObjects.Tables.NamedViewTable", "int Add(string name, System.Guid viewportId)"],
+ ["Rhino.Input.RhinoGet", "Result GetPoint(string prompt, bool acceptNothing, out Point3d point)"],
+ ["Rhino.Input.RhinoGet", "Result GetString(string prompt, bool acceptNothing, ref string outputString)"],
+ ["Rhino.Input.RhinoGet", "Result GetView(string commandPrompt, out RhinoView view)"]
]
},
{
@@ -2167,9 +2167,9 @@
"name": "Addnurbscurve.vb",
"code": "Partial Class Examples\n Public Shared Function AddNurbsCurve(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim points As New Rhino.Collections.Point3dList(5)\n points.Add(0, 0, 0)\n points.Add(0, 2, 0)\n points.Add(2, 3, 0)\n points.Add(4, 2, 0)\n points.Add(4, 0, 0)\n Dim nc As Rhino.Geometry.NurbsCurve = Rhino.Geometry.NurbsCurve.Create(False, 3, points)\n Dim rc As Rhino.Commands.Result = Rhino.Commands.Result.Failure\n If nc IsNot Nothing AndAlso nc.IsValid Then\n If doc.Objects.AddCurve(nc) <> Guid.Empty Then\n doc.Views.Redraw()\n rc = Rhino.Commands.Result.Success\n End If\n End If\n Return rc\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Geometry.NurbsCurve", "NurbsCurve Create(System.Boolean periodic, System.Int32 degree, IEnumerable points)"],
+ ["Rhino.Geometry.NurbsCurve", "NurbsCurve Create(bool periodic, int degree, IEnumerable points)"],
["Rhino.Collections.Point3dList", "Point3dList(int initialCapacity)"],
- ["Rhino.Collections.Point3dList", "System.Void Add(System.Double x, System.Double y, System.Double z)"]
+ ["Rhino.Collections.Point3dList", "void Add(double x, double y, double z)"]
]
},
{
@@ -2178,20 +2178,20 @@
"members": [
["Rhino.RhinoDoc", "GroupTable Groups"],
["Rhino.Input.Custom.GetObject", "GetObject()"],
- ["Rhino.Input.Custom.GetObject", "GetResult GetMultiple(System.Int32 minimumNumber, System.Int32 maximumNumber)"],
- ["Rhino.DocObjects.Tables.GroupTable", "System.Int32 Add(IEnumerable objectIds)"]
+ ["Rhino.Input.Custom.GetObject", "GetResult GetMultiple(int minimumNumber, int maximumNumber)"],
+ ["Rhino.DocObjects.Tables.GroupTable", "int Add(IEnumerable objectIds)"]
]
},
{
"name": "Addradialdimension.vb",
"code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.Commands\nImports Rhino.Geometry\nImports Rhino.Input\n\nNamespace examples_vb\n Public Class AddRadialDimensionCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbAddRadialDimension\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef = Nothing\n Dim rc = RhinoGet.GetOneObject(\"Select curve for radius dimension\", True, ObjectType.Curve, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim curve_parameter As Double\n Dim curve = obj_ref.CurveParameter(curve_parameter)\n If curve Is Nothing Then\n Return Result.Failure\n End If\n\n If curve.IsLinear() OrElse curve.IsPolyline() Then\n RhinoApp.WriteLine(\"Curve must be non-linear.\")\n Return Result.[Nothing]\n End If\n\n ' in this example just deal with planar curves\n If Not curve.IsPlanar() Then\n RhinoApp.WriteLine(\"Curve must be planar.\")\n Return Result.[Nothing]\n End If\n\n Dim point_on_curve = curve.PointAt(curve_parameter)\n Dim curvature_vector = curve.CurvatureAt(curve_parameter)\n Dim len = curvature_vector.Length\n If len < RhinoMath.SqrtEpsilon Then\n RhinoApp.WriteLine(\"Curve is almost linear and therefore has no curvature.\")\n Return Result.[Nothing]\n End If\n\n Dim center = point_on_curve + (curvature_vector / (len * len))\n Dim plane As Plane\n curve.TryGetPlane(plane)\n Dim radial_dimension = New RadialDimension(center, point_on_curve, plane.XAxis, plane.Normal, 5.0)\n doc.Objects.AddRadialDimension(radial_dimension)\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.DocObjects.ObjRef", "Curve CurveParameter(out System.Double parameter)"],
- ["Rhino.Geometry.Curve", "Vector3d CurvatureAt(System.Double t)"],
- ["Rhino.Geometry.Curve", "System.Boolean IsLinear()"],
- ["Rhino.Geometry.Curve", "System.Boolean IsPlanar()"],
- ["Rhino.Geometry.Curve", "System.Boolean IsPolyline()"],
- ["Rhino.Geometry.Curve", "Point3d PointAt(System.Double t)"],
+ ["Rhino.DocObjects.ObjRef", "Curve CurveParameter(out double parameter)"],
+ ["Rhino.Geometry.Curve", "Vector3d CurvatureAt(double t)"],
+ ["Rhino.Geometry.Curve", "bool IsLinear()"],
+ ["Rhino.Geometry.Curve", "bool IsPlanar()"],
+ ["Rhino.Geometry.Curve", "bool IsPolyline()"],
+ ["Rhino.Geometry.Curve", "Point3d PointAt(double t)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddRadialDimension(RadialDimension dimension)"]
]
},
@@ -2207,7 +2207,7 @@
"name": "Addtext.vb",
"code": "Partial Class Examples\n Public Shared Function AddAnnotationText(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim pt As New Rhino.Geometry.Point3d(10, 0, 0)\n Const text As String = \"Hello RhinoCommon\"\n Const height As Double = 2.0\n Const font As String = \"Arial\"\n Dim plane As Rhino.Geometry.Plane = doc.Views.ActiveView.ActiveViewport.ConstructionPlane()\n plane.Origin = pt\n Dim id As Guid = doc.Objects.AddText(text, plane, height, font, False, False)\n If id <> 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.DocObjects.Tables.ObjectTable", "System.Guid AddText(System.String text, Plane plane, System.Double height, System.String fontName, System.Boolean bold, System.Boolean italic)"]
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddText(string text, Plane plane, double height, string fontName, bool bold, bool italic)"]
]
},
{
@@ -2226,7 +2226,7 @@
["Rhino.Geometry.LineCurve", "LineCurve(Point3d from, Point3d to)"],
["Rhino.Geometry.Circle", "Circle(Point3d center, double radius)"],
["Rhino.Geometry.RevSurface", "RevSurface Create(Curve revoluteCurve, Line axisOfRevolution)"],
- ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, System.Boolean capStart, System.Boolean capEnd)"]
+ ["Rhino.Geometry.Brep", "Brep CreateFromRevSurface(RevSurface surface, bool capStart, bool capEnd)"]
]
},
{
@@ -2235,37 +2235,37 @@
"members": [
["Rhino.Display.DisplayModeDescription", "DisplayPipelineAttributes DisplayAttributes"],
["Rhino.Display.DisplayModeDescription", "DisplayModeDescription[] GetDisplayModes()"],
- ["Rhino.Display.DisplayModeDescription", "System.Boolean UpdateDisplayMode(DisplayModeDescription displayMode)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOption(System.String englishOption)"]
+ ["Rhino.Display.DisplayModeDescription", "bool UpdateDisplayMode(DisplayModeDescription displayMode)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOption(string englishOption)"]
]
},
{
"name": "Analysismode.vb",
"code": "Imports Rhino.DocObjects\nImports Rhino\nImports Rhino.Geometry\n\n\n _\nPublic Class AnalysisModeOnCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"cs_analysismode_on\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As Rhino.Commands.RunMode) As Rhino.Commands.Result\n ' make sure our custom visual analysis mode is registered\n Dim zmode = Rhino.Display.VisualAnalysisMode.Register(GetType(ZAnalysisMode))\n\n Const filter As ObjectType = Rhino.DocObjects.ObjectType.Surface Or Rhino.DocObjects.ObjectType.PolysrfFilter Or Rhino.DocObjects.ObjectType.Mesh\n Dim objs As Rhino.DocObjects.ObjRef() = Nothing\n Dim rc = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select objects for Z analysis\", False, filter, objs)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim count As Integer = 0\n For i As Integer = 0 To objs.Length - 1\n Dim obj = objs(i).[Object]()\n\n ' see if this object is alreay in Z analysis mode\n If obj.InVisualAnalysisMode(zmode) Then\n Continue For\n End If\n\n If obj.EnableVisualAnalysisMode(zmode, True) Then\n count += 1\n End If\n Next\n doc.Views.Redraw()\n RhinoApp.WriteLine(\"{0} objects were put into Z-Analysis mode.\", count)\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n\n _\nPublic Class AnalysisModeOffCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"cs_analysismode_off\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As Rhino.Commands.RunMode) As Rhino.Commands.Result\n Dim zmode = Rhino.Display.VisualAnalysisMode.Find(GetType(ZAnalysisMode))\n ' If zmode is null, we've never registered the mode so we know it hasn't been used\n If zmode IsNot Nothing Then\n For Each obj As Rhino.DocObjects.RhinoObject In doc.Objects\n obj.EnableVisualAnalysisMode(zmode, False)\n Next\n doc.Views.Redraw()\n End If\n RhinoApp.WriteLine(\"Z-Analysis is off.\")\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n\n\n''' \n''' This simple example provides a false color based on the world z-coordinate.\n''' For details, see the implementation of the FalseColor() function.\n''' \nPublic Class ZAnalysisMode\n Inherits Rhino.Display.VisualAnalysisMode\n Private m_z_range As New Interval(-10, 10)\n Private m_hue_range As New Interval(0, 4 * Math.PI / 3)\n Private Const m_show_isocurves As Boolean = True\n\n Public Overrides ReadOnly Property Name() As String\n Get\n Return \"Z-Analysis\"\n End Get\n End Property\n Public Overrides ReadOnly Property Style() As Rhino.Display.VisualAnalysisMode.AnalysisStyle\n Get\n Return AnalysisStyle.FalseColor\n End Get\n End Property\n\n Public Overrides Function ObjectSupportsAnalysisMode(obj As Rhino.DocObjects.RhinoObject) As Boolean\n If TypeOf obj Is Rhino.DocObjects.MeshObject OrElse TypeOf obj Is Rhino.DocObjects.BrepObject Then\n Return True\n End If\n Return False\n End Function\n\n Protected Overrides Sub UpdateVertexColors(obj As Rhino.DocObjects.RhinoObject, meshes As Mesh())\n ' A \"mapping tag\" is used to determine if the colors need to be set\n Dim mt As Rhino.Render.MappingTag = GetMappingTag(obj.RuntimeSerialNumber)\n\n For mi As Integer = 0 To meshes.Length - 1\n Dim mesh = meshes(mi)\n If mesh.VertexColors.Tag.Id <> Me.Id Then\n ' The mesh's mapping tag is different from ours. Either the mesh has\n ' no false colors, has false colors set by another analysis mode, has\n ' false colors set using different m_z_range[]/m_hue_range[] values, or\n ' the mesh has been moved. In any case, we need to set the false\n ' colors to the ones we want.\n Dim colors As System.Drawing.Color() = New System.Drawing.Color(mesh.Vertices.Count - 1) {}\n For i As Integer = 0 To mesh.Vertices.Count - 1\n Dim z As Double = mesh.Vertices(i).Z\n colors(i) = FalseColor(z)\n Next\n mesh.VertexColors.SetColors(colors)\n ' set the mesh's color tag \n mesh.VertexColors.Tag = mt\n End If\n Next\n End Sub\n\n Public Overrides ReadOnly Property ShowIsoCurves() As Boolean\n Get\n ' Most shaded analysis modes that work on breps have the option of\n ' showing or hiding isocurves. Run the built-in Rhino ZebraAnalysis\n ' to see how Rhino handles the user interface. If controlling\n ' iso-curve visability is a feature you want to support, then provide\n ' user interface to set this member variable.\n Return m_show_isocurves\n End Get\n End Property\n\n ''' \n ''' Returns a mapping tag that is used to detect when a mesh's colors need to\n ''' be set.\n ''' \n ''' \n Private Function GetMappingTag(serialNumber As UInteger) As Rhino.Render.MappingTag\n Dim mt As New Rhino.Render.MappingTag()\n mt.Id = Me.Id\n\n ' Since the false colors that are shown will change if the mesh is\n ' transformed, we have to initialize the transformation.\n mt.MeshTransform = Transform.Identity\n\n ' This is a 32 bit CRC or the information used to set the false colors.\n ' For this example, the m_z_range and m_hue_range intervals control the\n ' colors, so we calculate their crc.\n Dim crc As UInteger = RhinoMath.CRC32(serialNumber, m_z_range.T0)\n crc = RhinoMath.CRC32(crc, m_z_range.T1)\n crc = RhinoMath.CRC32(crc, m_hue_range.T0)\n crc = RhinoMath.CRC32(crc, m_hue_range.T1)\n mt.MappingCRC = crc\n Return mt\n End Function\n\n Private Function FalseColor(z As Double) As System.Drawing.Color\n ' Simple example of one way to change a number into a color.\n Dim s As Double = m_z_range.NormalizedParameterAt(z)\n s = Rhino.RhinoMath.Clamp(s, 0, 1)\n Return System.Drawing.Color.FromArgb(CInt(Math.Truncate(s * 255)), 0, 0)\n End Function\nEnd Class\n",
"members": [
- ["Rhino.RhinoMath", "System.UInt32 CRC32(System.UInt32 currentRemainder, System.Double value)"],
+ ["Rhino.RhinoMath", "uint CRC32(uint currentRemainder, double value)"],
["Rhino.Geometry.Collections.MeshVertexColorList", "MappingTag Tag"],
- ["Rhino.Geometry.Collections.MeshVertexColorList", "System.Boolean SetColors(Color[] colors)"]
+ ["Rhino.Geometry.Collections.MeshVertexColorList", "bool SetColors(Color[] colors)"]
]
},
{
"name": "Arclengthpoint.vb",
"code": "Partial Class Examples\n Public Shared Function ArcLengthPoint(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim objref As Rhino.DocObjects.ObjRef = Nothing\n Dim rc As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetOneObject(\"Select curve\", True, Rhino.DocObjects.ObjectType.Curve, objref)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n Dim crv As Rhino.Geometry.Curve = objref.Curve()\n If crv Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim crv_length As Double = crv.GetLength()\n Dim length As Double = 0\n rc = Rhino.Input.RhinoGet.GetNumber(\"Length from start\", True, length, 0, crv_length)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim pt As Rhino.Geometry.Point3d = crv.PointAtLength(length)\n If pt.IsValid Then\n doc.Objects.AddPoint(pt)\n doc.Views.Redraw()\n End If\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Geometry.Curve", "System.Double GetLength()"],
- ["Rhino.Geometry.Curve", "Point3d PointAtLength(System.Double length)"]
+ ["Rhino.Geometry.Curve", "double GetLength()"],
+ ["Rhino.Geometry.Curve", "Point3d PointAtLength(double length)"]
]
},
{
"name": "Arraybydistance.vb",
"code": "Imports Rhino\n\n _\nPublic Class ArrayByDistanceCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vb_ArrayByDistance\"\n End Get\n End Property\n\n Private m_distance As Double = 1\n Private m_point_start As Rhino.Geometry.Point3d\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As Rhino.Commands.RunMode) As Rhino.Commands.Result\n Dim objref As Rhino.DocObjects.ObjRef = Nothing\n Dim rc = Rhino.Input.RhinoGet.GetOneObject(\"Select object\", True, Rhino.DocObjects.ObjectType.AnyObject, objref)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n rc = Rhino.Input.RhinoGet.GetPoint(\"Start point\", False, m_point_start)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim obj = objref.Object()\n If obj Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n ' create an instance of a GetPoint class and add a delegate\n ' for the DynamicDraw event\n Dim gp = New Rhino.Input.Custom.GetPoint()\n gp.DrawLineFromPoint(m_point_start, True)\n Dim optdouble = New Rhino.Input.Custom.OptionDouble(m_distance)\n Dim constrain As Boolean = False\n Dim optconstrain = New Rhino.Input.Custom.OptionToggle(constrain, \"Off\", \"On\")\n gp.AddOptionDouble(\"Distance\", optdouble)\n gp.AddOptionToggle(\"Constrain\", optconstrain)\n AddHandler gp.DynamicDraw, AddressOf ArrayByDistanceDraw\n gp.Tag = obj\n While gp.Get() = Rhino.Input.GetResult.Option\n m_distance = optdouble.CurrentValue\n If constrain <> optconstrain.CurrentValue Then\n constrain = optconstrain.CurrentValue\n If constrain Then\n Dim gp2 = New Rhino.Input.Custom.GetPoint()\n gp2.DrawLineFromPoint(m_point_start, True)\n gp2.SetCommandPrompt(\"Second point on constraint line\")\n If gp2.Get() = Rhino.Input.GetResult.Point Then\n gp.Constrain(m_point_start, gp2.Point())\n Else\n gp.ClearCommandOptions()\n optconstrain.CurrentValue = False\n constrain = False\n gp.AddOptionDouble(\"Distance\", optdouble)\n gp.AddOptionToggle(\"Constrain\", optconstrain)\n End If\n Else\n gp.ClearConstraints()\n End If\n End If\n End While\n\n If gp.CommandResult() = Rhino.Commands.Result.Success Then\n m_distance = optdouble.CurrentValue\n Dim pt = gp.Point()\n Dim vec = pt - m_point_start\n Dim length As Double = vec.Length\n vec.Unitize()\n Dim count As Integer = CInt(Math.Truncate(length / m_distance))\n For i As Integer = 1 To count - 1\n Dim translate = vec * (i * m_distance)\n Dim xf = Rhino.Geometry.Transform.Translation(translate)\n doc.Objects.Transform(obj, xf, False)\n Next\n doc.Views.Redraw()\n End If\n\n Return gp.CommandResult()\n End Function\n\n ' this function is called whenever the GetPoint's DynamicDraw\n ' event occurs\n Private Sub ArrayByDistanceDraw(sender As Object, e As Rhino.Input.Custom.GetPointDrawEventArgs)\n Dim rhobj As Rhino.DocObjects.RhinoObject = TryCast(e.Source.Tag, Rhino.DocObjects.RhinoObject)\n If rhobj Is Nothing Then\n Return\n End If\n Dim vec = e.CurrentPoint - m_point_start\n Dim length As Double = vec.Length\n vec.Unitize()\n Dim count As Integer = CInt(Math.Truncate(length / m_distance))\n For i As Integer = 1 To count - 1\n Dim translate = vec * (i * m_distance)\n Dim xf = Rhino.Geometry.Transform.Translation(translate)\n e.Display.DrawObject(rhobj, xf)\n Next\n End Sub\nEnd Class\n",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawObject(DocObjects.RhinoObject rhinoObject, Transform xform)"],
+ ["Rhino.Display.DisplayPipeline", "void DrawObject(DocObjects.RhinoObject rhinoObject, Transform xform)"],
["Rhino.Input.Custom.GetPoint", "object Tag"],
- ["Rhino.Input.Custom.GetPoint", "System.Void ClearConstraints()"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Point3d from, Point3d to)"],
+ ["Rhino.Input.Custom.GetPoint", "void ClearConstraints()"],
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Point3d from, Point3d to)"],
["Rhino.Input.Custom.GetPointDrawEventArgs", "GetPoint Source"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Void ClearCommandOptions()"]
+ ["Rhino.Input.Custom.GetBaseClass", "void ClearCommandOptions()"]
]
},
{
@@ -2280,16 +2280,16 @@
"code": "Imports System.Collections.Generic\n\nPartial Class Examples\n Public Shared Function BooleanDifference(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim rc As Rhino.Commands.Result\n Dim objrefs As Rhino.DocObjects.ObjRef() = Nothing\n rc = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select first set of polysurfaces\", False, Rhino.DocObjects.ObjectType.PolysrfFilter, objrefs)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n If objrefs Is Nothing OrElse objrefs.Length < 1 Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim in_breps0 As New List(Of Rhino.Geometry.Brep)()\n For i As Integer = 0 To objrefs.Length - 1\n Dim brep As Rhino.Geometry.Brep = objrefs(i).Brep()\n If brep IsNot Nothing Then\n in_breps0.Add(brep)\n End If\n Next\n\n doc.Objects.UnselectAll()\n rc = Rhino.Input.RhinoGet.GetMultipleObjects(\"Select second set of polysurfaces\", False, Rhino.DocObjects.ObjectType.PolysrfFilter, objrefs)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n If objrefs Is Nothing OrElse objrefs.Length < 1 Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim in_breps1 As New List(Of Rhino.Geometry.Brep)()\n For i As Integer = 0 To objrefs.Length - 1\n Dim brep As Rhino.Geometry.Brep = objrefs(i).Brep()\n If brep IsNot Nothing Then\n in_breps1.Add(brep)\n End If\n Next\n\n Dim tolerance As Double = doc.ModelAbsoluteTolerance\n Dim breps As Rhino.Geometry.Brep() = Rhino.Geometry.Brep.CreateBooleanDifference(in_breps0, in_breps1, tolerance)\n If breps.Length < 1 Then\n Return Rhino.Commands.Result.[Nothing]\n End If\n For i As Integer = 0 To breps.Length - 1\n doc.Objects.AddBrep(breps(i))\n Next\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
["Rhino.DocObjects.ObjRef", "Brep Brep()"],
- ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, System.Double tolerance, System.Boolean manifoldOnly)"],
- ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, System.Double tolerance)"],
- ["Rhino.Input.RhinoGet", "Result GetMultipleObjects(System.String prompt, System.Boolean acceptNothing, ObjectType filter, out ObjRef[] rhObjects)"]
+ ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, double tolerance, bool manifoldOnly)"],
+ ["Rhino.Geometry.Brep", "Brep[] CreateBooleanDifference(IEnumerable firstSet, IEnumerable secondSet, double tolerance)"],
+ ["Rhino.Input.RhinoGet", "Result GetMultipleObjects(string prompt, bool acceptNothing, ObjectType filter, out ObjRef[] rhObjects)"]
]
},
{
"name": "Circlecenter.vb",
"code": "Partial Class Examples\n Public Shared Function CircleCenter(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim go As New Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select objects\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GeometryAttributeFilter = Rhino.Input.[Custom].GeometryAttributeFilter.ClosedCurve\n go.GetMultiple(1, 0)\n If go.CommandResult() <> Rhino.Commands.Result.Success Then\n Return go.CommandResult()\n End If\n\n Dim objrefs As Rhino.DocObjects.ObjRef() = go.Objects()\n If objrefs Is Nothing Then\n Return Rhino.Commands.Result.[Nothing]\n End If\n\n Dim tolerance As Double = doc.ModelAbsoluteTolerance\n For i As Integer = 0 To objrefs.Length - 1\n ' get the curve geometry\n Dim curve As Rhino.Geometry.Curve = objrefs(i).Curve()\n If curve Is Nothing Then\n Continue For\n End If\n Dim circle As Rhino.Geometry.Circle\n If curve.TryGetCircle(circle, tolerance) Then\n Rhino.RhinoApp.WriteLine(\"Circle{0}: center = {1}\", i + 1, circle.Center)\n End If\n Next\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean TryGetCircle(out Circle circle, System.Double tolerance)"],
+ ["Rhino.Geometry.Curve", "bool TryGetCircle(out Circle circle, double tolerance)"],
["Rhino.Input.Custom.GetObject", "GeometryAttributeFilter GeometryAttributeFilter"]
]
},
@@ -2298,20 +2298,20 @@
"code": "Imports Rhino\nImports Rhino.Geometry\n\nNamespace examples_vb\n _\n Public Class RTreeClosestPoint\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vb_RtreeClosestPoint\"\n End Get\n End Property\n\n Private Sub SearchCallback(sender As Object, e As RTreeEventArgs)\n Dim data As SearchData = TryCast(e.Tag, SearchData)\n data.HitCount = data.HitCount + 1\n Dim vertex As Point3f = data.Mesh.Vertices(e.Id)\n Dim distance As Double = data.Point.DistanceTo(vertex)\n If data.Index = -1 OrElse data.Distance > distance Then\n ' shrink the sphere to help improve the test\n e.SearchSphere = New Sphere(data.Point, distance)\n data.Index = e.Id\n data.Distance = distance\n End If\n End Sub\n\n Private Class SearchData\n Public Sub New(mesh__1 As Mesh, point__2 As Point3d)\n Point = point__2\n Mesh = mesh__1\n HitCount = 0\n Index = -1\n Distance = 0\n End Sub\n\n Public Property HitCount As Integer\n Public Property Point As Point3d\n Public Property Mesh As Mesh\n Public Property Index As Integer\n Public Property Distance As Double\n End Class\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As Rhino.Commands.RunMode) As Rhino.Commands.Result\n Dim objref As Rhino.DocObjects.ObjRef = Nothing\n Dim rc = Rhino.Input.RhinoGet.GetOneObject(\"select mesh\", False, Rhino.DocObjects.ObjectType.Mesh, objref)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim mesh As Mesh = objref.Mesh()\n objref.Object().Select(False)\n doc.Views.Redraw()\n\n Using tree As New RTree()\n For i As Integer = 0 To mesh.Vertices.Count - 1\n ' we can make a C++ function that just builds an rtree from the\n ' vertices in one quick shot, but for now...\n tree.Insert(mesh.Vertices(i), i)\n Next\n\n Dim point As Point3d\n While True\n rc = Rhino.Input.RhinoGet.GetPoint(\"test point\", False, point)\n If rc <> Rhino.Commands.Result.Success Then\n Exit While\n End If\n\n Dim data As New SearchData(mesh, point)\n ' Use the first vertex in the mesh to define a start sphere\n Dim distance As Double = point.DistanceTo(mesh.Vertices(0))\n Dim sphere As New Sphere(point, distance * 1.1)\n If tree.Search(sphere, AddressOf SearchCallback, data) Then\n doc.Objects.AddPoint(mesh.Vertices(data.Index))\n doc.Views.Redraw()\n RhinoApp.WriteLine(\"Found point in {0} tests\", data.HitCount)\n End If\n End While\n End Using\n Return Rhino.Commands.Result.Success\n End Function\n End Class\nEnd Namespace\n",
"members": [
["Rhino.Geometry.RTree", "RTree()"],
- ["Rhino.Geometry.RTree", "System.Boolean Insert(Point3d point, System.Int32 elementId)"],
- ["Rhino.Geometry.RTree", "System.Boolean Search(Sphere sphere, EventHandler callback, System.Object tag)"]
+ ["Rhino.Geometry.RTree", "bool Insert(Point3d point, int elementId)"],
+ ["Rhino.Geometry.RTree", "bool Search(Sphere sphere, EventHandler callback, object tag)"]
]
},
{
"name": "Commandlineoptions.vb",
"code": "Partial Class Examples\n Public Shared Function CommandLineOptions(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' For this example we will use a GetPoint class, but all of the custom\n ' \"Get\" classes support command line options.\n Dim gp As New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"GetPoint with options\")\n\n ' set up the options\n Dim intOption As New Rhino.Input.Custom.OptionInteger(1, 1, 99)\n Dim dblOption As New Rhino.Input.Custom.OptionDouble(2.2, 0, 99.9)\n Dim boolOption As New Rhino.Input.Custom.OptionToggle(True, \"Off\", \"On\")\n Dim listValues As String() = New String() {\"Item0\", \"Item1\", \"Item2\", \"Item3\", \"Item4\"}\n\n gp.AddOptionInteger(\"Integer\", intOption)\n gp.AddOptionDouble(\"Double\", dblOption)\n gp.AddOptionToggle(\"Boolean\", boolOption)\n Dim listIndex As Integer = 3\n Dim opList As Integer = gp.AddOptionList(\"List\", listValues, listIndex)\n\n While True\n ' perform the get operation. This will prompt the user to input a point, but also\n ' allow for command line options defined above\n Dim get_rc As Rhino.Input.GetResult = gp.[Get]()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n\n If get_rc = Rhino.Input.GetResult.Point Then\n doc.Objects.AddPoint(gp.Point())\n doc.Views.Redraw()\n Rhino.RhinoApp.WriteLine(\"Command line option values are\")\n Rhino.RhinoApp.WriteLine(\" Integer = {0}\", intOption.CurrentValue)\n Rhino.RhinoApp.WriteLine(\" Double = {0}\", dblOption.CurrentValue)\n Rhino.RhinoApp.WriteLine(\" Boolean = {0}\", boolOption.CurrentValue)\n Rhino.RhinoApp.WriteLine(\" List = {0}\", listValues(listIndex))\n ElseIf get_rc = Rhino.Input.GetResult.[Option] Then\n If gp.OptionIndex() = opList Then\n listIndex = gp.[Option]().CurrentListOptionIndex\n End If\n Continue While\n End If\n Exit While\n End While\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionDouble(System.String englishName, ref OptionDouble numberValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionInteger(System.String englishName, ref OptionInteger intValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionToggle(LocalizeStringPair optionName, ref OptionToggle toggleValue)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionToggle(System.String englishName, ref OptionToggle toggleValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionDouble(LocalizeStringPair optionName, ref OptionDouble numberValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionDouble(string englishName, ref OptionDouble numberValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionInteger(LocalizeStringPair optionName, ref OptionInteger intValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionInteger(string englishName, ref OptionInteger intValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionToggle(LocalizeStringPair optionName, ref OptionToggle toggleValue)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionToggle(string englishName, ref OptionToggle toggleValue)"],
["Rhino.Input.Custom.CommandLineOption", "int CurrentListOptionIndex"],
["Rhino.Input.Custom.OptionToggle", "OptionToggle(bool initialValue, string offValue, string onValue)"],
["Rhino.Input.Custom.OptionToggle", "bool CurrentValue"],
@@ -2325,14 +2325,14 @@
"name": "Conduitarrowheads.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Geometry\nImports System.Collections.Generic\nImports Rhino.Input.Custom\n\nNamespace examples_vb\n Class DrawArrowHeadsConduit\n Inherits Rhino.Display.DisplayConduit\n Private _line As Line\n Private _screenSize As Integer\n Private _worldSize As Double\n\n Public Sub New(line As Line, screenSize As Integer, worldSize As Double)\n _line = line\n _screenSize = screenSize\n _worldSize = worldSize\n End Sub\n\n Protected Overrides Sub DrawForeground(e As Rhino.Display.DrawEventArgs)\n e.Display.DrawArrow(_line, System.Drawing.Color.Black, _screenSize, _worldSize)\n End Sub\n End Class\n\n Public Class DrawArrowheadsCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbDrawArrowHeads\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n ' get arrow head size\n Dim go = New Rhino.Input.Custom.GetOption()\n go.SetCommandPrompt(\"ArrowHead length in screen size (pixles) or world size (percentage of arrow lenght)?\")\n go.AddOption(\"screen\")\n go.AddOption(\"world\")\n go.[Get]()\n If go.CommandResult() <> Result.Success Then\n Return go.CommandResult()\n End If\n\n Dim screenSize As Integer = 0\n Dim worldSize As Double = 0.0\n If go.[Option]().EnglishName = \"screen\" Then\n Dim gi = New Rhino.Input.Custom.GetInteger()\n gi.SetLowerLimit(0, True)\n gi.SetCommandPrompt(\"Length of arrow head in pixels\")\n gi.[Get]()\n If gi.CommandResult() <> Result.Success Then\n Return gi.CommandResult()\n End If\n screenSize = gi.Number()\n Else\n Dim gi = New Rhino.Input.Custom.GetInteger()\n gi.SetLowerLimit(0, True)\n gi.SetUpperLimit(100, False)\n gi.SetCommandPrompt(\"Lenght of arrow head in percentage of total arrow lenght\")\n gi.[Get]()\n If gi.CommandResult() <> Result.Success Then\n Return gi.CommandResult()\n End If\n worldSize = gi.Number() / 100.0\n End If\n\n\n ' get arrow start and end points\n Dim gp = New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Start of line\")\n gp.[Get]()\n If gp.CommandResult() <> Result.Success Then\n Return gp.CommandResult()\n End If\n Dim startPoint = gp.Point()\n\n gp.SetCommandPrompt(\"End of line\")\n gp.SetBasePoint(startPoint, False)\n gp.DrawLineFromPoint(startPoint, True)\n gp.[Get]()\n If gp.CommandResult() <> Result.Success Then\n Return gp.CommandResult()\n End If\n Dim endPoint = gp.Point()\n\n Dim v = endPoint - startPoint\n If v.IsTiny(Rhino.RhinoMath.ZeroTolerance) Then\n Return Result.[Nothing]\n End If\n\n Dim line = New Line(startPoint, endPoint)\n\n Dim conduit = New DrawArrowHeadsConduit(line, screenSize, worldSize)\n ' toggle conduit on/off\n conduit.Enabled = Not conduit.Enabled\n RhinoApp.WriteLine(\"draw arrowheads conduit enabled = {0}\", conduit.Enabled)\n\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawArrow(Line line, System.Drawing.Color color, System.Double screenSize, System.Double relativeSize)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawArrow(Line line, System.Drawing.Color color, double screenSize, double relativeSize)"]
]
},
{
"name": "Conduitbitmap.vb",
"code": "Imports System.Drawing\nImports Rhino\nImports Rhino.Commands\nImports Rhino.Display\n\nNamespace examples_vb\n Public Class DrawBitmapConduit\n Inherits Rhino.Display.DisplayConduit\n Private ReadOnly m_display_bitmap As DisplayBitmap\n\n Public Sub New()\n Dim flag = New System.Drawing.Bitmap(100, 100)\n For x As Integer = 0 To flag.Height - 1\n For y As Integer = 0 To flag.Width - 1\n flag.SetPixel(x, y, Color.White)\n Next\n Next\n\n Dim g = Graphics.FromImage(flag)\n g.FillEllipse(Brushes.Blue, 25, 25, 50, 50)\n m_display_bitmap = New DisplayBitmap(flag)\n End Sub\n\n Protected Overrides Sub DrawForeground(e As Rhino.Display.DrawEventArgs)\n e.Display.DrawBitmap(m_display_bitmap, 50, 50)\n End Sub\n End Class\n\n Public Class DrawBitmapCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbDrawBitmap\"\n End Get\n End Property\n\n ReadOnly m_conduit As New DrawBitmapConduit()\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n ' toggle conduit on/off\n m_conduit.Enabled = Not m_conduit.Enabled\n\n RhinoApp.WriteLine(\"Custom conduit enabled = {0}\", m_conduit.Enabled)\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawBitmap(DisplayBitmap bitmap, System.Int32 left, System.Int32 top)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawBitmap(DisplayBitmap bitmap, int left, int top)"]
]
},
{
@@ -2340,9 +2340,9 @@
"code": "Partial Class Examples\n Public Shared Function ConstrainedCopy(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Get a single planar closed curve\n Dim go = New Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select curve\")\n go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve\n go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.ClosedCurve\n go.Get()\n If go.CommandResult() <> Rhino.Commands.Result.Success Then\n Return go.CommandResult()\n End If\n Dim objref = go.Object(0)\n Dim base_curve = objref.Curve()\n Dim first_point = objref.SelectionPoint()\n If base_curve Is Nothing OrElse Not first_point.IsValid Then\n Return Rhino.Commands.Result.Cancel\n End If\n\n Dim plane As Rhino.Geometry.Plane\n If Not base_curve.TryGetPlane(plane) Then\n Return Rhino.Commands.Result.Cancel\n End If\n\n ' Get a point constrained to a line passing through the initial selection\n ' point and parallel to the plane's normal\n Dim gp = New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Offset point\")\n gp.DrawLineFromPoint(first_point, True)\n Dim line = New Rhino.Geometry.Line(first_point, first_point + plane.Normal)\n gp.Constrain(line)\n gp.Get()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n Dim second_point = gp.Point()\n Dim vec As Rhino.Geometry.Vector3d = second_point - first_point\n If vec.Length > 0.001 Then\n Dim xf = Rhino.Geometry.Transform.Translation(vec)\n Dim id As Guid = doc.Objects.Transform(objref, xf, False)\n If id <> Guid.Empty Then\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End If\n End If\n Return Rhino.Commands.Result.Cancel\n End Function\nEnd Class\n",
"members": [
["Rhino.DocObjects.ObjRef", "Point3d SelectionPoint()"],
- ["Rhino.Geometry.Curve", "System.Boolean TryGetPlane(out Plane plane)"],
+ ["Rhino.Geometry.Curve", "bool TryGetPlane(out Plane plane)"],
["Rhino.Geometry.Transform", "Transform Translation(Vector3d motion)"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Line line)"]
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Line line)"]
]
},
{
@@ -2350,9 +2350,9 @@
"code": "Imports Rhino.DocObjects\n\nPartial Class Examples\n Public Shared Function CreateBlock(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Select objects to define block\n Dim go = New Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select objects to define block\")\n go.ReferenceObjectSelect = False\n go.SubObjectSelect = False\n go.GroupSelect = True\n\n ' Phantoms, grips, lights, etc., cannot be in blocks.\n Const forbidden_geometry_filter As ObjectType = Rhino.DocObjects.ObjectType.Light Or Rhino.DocObjects.ObjectType.Grip Or Rhino.DocObjects.ObjectType.Phantom\n Const geometry_filter As ObjectType = forbidden_geometry_filter Xor Rhino.DocObjects.ObjectType.AnyObject\n go.GeometryFilter = geometry_filter\n go.GetMultiple(1, 0)\n If go.CommandResult() <> Rhino.Commands.Result.Success Then\n Return go.CommandResult()\n End If\n\n ' Block base point\n Dim base_point As Rhino.Geometry.Point3d\n Dim rc = Rhino.Input.RhinoGet.GetPoint(\"Block base point\", False, base_point)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n ' Block definition name\n Dim idef_name As String = \"\"\n rc = Rhino.Input.RhinoGet.GetString(\"Block definition name\", False, idef_name)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n ' Validate block name\n idef_name = idef_name.Trim()\n If String.IsNullOrEmpty(idef_name) Then\n Return Rhino.Commands.Result.[Nothing]\n End If\n\n ' See if block name already exists\n Dim existing_idef As Rhino.DocObjects.InstanceDefinition = doc.InstanceDefinitions.Find(idef_name, True)\n If existing_idef IsNot Nothing Then\n Rhino.RhinoApp.WriteLine(\"Block definition {0} already exists\", idef_name)\n Return Rhino.Commands.Result.[Nothing]\n End If\n\n ' Gather all of the selected objects\n Dim geometry = New System.Collections.Generic.List(Of Rhino.Geometry.GeometryBase)()\n Dim attributes = New System.Collections.Generic.List(Of Rhino.DocObjects.ObjectAttributes)()\n For i As Integer = 0 To go.ObjectCount - 1\n Dim rhinoObject = go.Object(i).[Object]()\n If rhinoObject IsNot Nothing Then\n geometry.Add(rhinoObject.Geometry)\n attributes.Add(rhinoObject.Attributes)\n End If\n Next\n\n ' Gather all of the selected objects\n Dim idef_index As Integer = doc.InstanceDefinitions.Add(idef_name, String.Empty, base_point, geometry, attributes)\n\n If idef_index < 0 Then\n Rhino.RhinoApp.WriteLine(\"Unable to create block definition\", idef_name)\n Return Rhino.Commands.Result.Failure\n End If\n Return Rhino.Commands.Result.Failure\n End Function\nEnd Class\n",
"members": [
["Rhino.Input.Custom.GetObject", "bool ReferenceObjectSelect"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "System.Int32 Add(System.String name, System.String description, Point3d basePoint, IEnumerable geometry, IEnumerable attributes)"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(System.String instanceDefinitionName, System.Boolean ignoreDeletedInstanceDefinitions)"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(System.String instanceDefinitionName)"]
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "int Add(string name, string description, Point3d basePoint, IEnumerable geometry, IEnumerable attributes)"],
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(string instanceDefinitionName, bool ignoreDeletedInstanceDefinitions)"],
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "InstanceDefinition Find(string instanceDefinitionName)"]
]
},
{
@@ -2364,7 +2364,7 @@
["Rhino.Geometry.MeshingParameters", "MeshingParameters Minimal"],
["Rhino.Geometry.MeshingParameters", "MeshingParameters Smooth"],
["Rhino.Geometry.Mesh", "Mesh[] CreateFromBrep(Brep brep, MeshingParameters meshingParameters)"],
- ["Rhino.Geometry.Mesh", "System.Void Append(Mesh other)"]
+ ["Rhino.Geometry.Mesh", "void Append(Mesh other)"]
]
},
{
@@ -2374,30 +2374,30 @@
["Rhino.Geometry.NurbsSurface", "NurbsSurfaceKnotList KnotsU"],
["Rhino.Geometry.NurbsSurface", "NurbsSurfaceKnotList KnotsV"],
["Rhino.Geometry.NurbsSurface", "NurbsSurfacePointList Points"],
- ["Rhino.Geometry.NurbsSurface", "NurbsSurface Create(System.Int32 dimension, System.Boolean isRational, System.Int32 order0, System.Int32 order1, System.Int32 controlPointCount0, System.Int32 controlPointCount1)"]
+ ["Rhino.Geometry.NurbsSurface", "NurbsSurface Create(int dimension, bool isRational, int order0, int order1, int controlPointCount0, int controlPointCount1)"]
]
},
{
"name": "Crvdeviation.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.DocObjects\nImports Rhino.Geometry\nImports System.Drawing\nImports Rhino.Input\n\nNamespace examples_vb\n Class DeviationConduit\n Inherits Rhino.Display.DisplayConduit\n Private ReadOnly _curveA As Curve\n Private ReadOnly _curveB As Curve\n Private ReadOnly _minDistPointA As Point3d\n Private ReadOnly _minDistPointB As Point3d\n Private ReadOnly _maxDistPointA As Point3d\n Private ReadOnly _maxDistPointB As Point3d\n\n Public Sub New(curveA As Curve, curveB As Curve, minDistPointA As Point3d, minDistPointB As Point3d, maxDistPointA As Point3d, maxDistPointB As Point3d)\n _curveA = curveA\n _curveB = curveB\n _minDistPointA = minDistPointA\n _minDistPointB = minDistPointB\n _maxDistPointA = maxDistPointA\n _maxDistPointB = maxDistPointB\n End Sub\n\n Protected Overrides Sub DrawForeground(e As Rhino.Display.DrawEventArgs)\n e.Display.DrawCurve(_curveA, Color.Red)\n e.Display.DrawCurve(_curveB, Color.Red)\n\n e.Display.DrawPoint(_minDistPointA, Color.LawnGreen)\n e.Display.DrawPoint(_minDistPointB, Color.LawnGreen)\n e.Display.DrawLine(New Line(_minDistPointA, _minDistPointB), Color.LawnGreen)\n e.Display.DrawPoint(_maxDistPointA, Color.Red)\n e.Display.DrawPoint(_maxDistPointB, Color.Red)\n e.Display.DrawLine(New Line(_maxDistPointA, _maxDistPointB), Color.Red)\n End Sub\n End Class\n\n\n Public Class CurveDeviationCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbCurveDeviation\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n doc.Objects.UnselectAll()\n\n Dim objRef1 As ObjRef = Nothing\n Dim rc1 = RhinoGet.GetOneObject(\"first curve\", True, ObjectType.Curve, objRef1)\n If rc1 <> Result.Success Then\n Return rc1\n End If\n Dim curveA As Curve = Nothing\n If objRef1 IsNot Nothing Then\n curveA = objRef1.Curve()\n End If\n If curveA Is Nothing Then\n Return Result.Failure\n End If\n\n ' Since you already selected a curve if you don't unselect it\n ' the next GetOneObject won't stop as it considers that curve \n ' input, i.e., curveA and curveB will point to the same curve.\n ' Another option would be to use an instance of Rhino.Input.Custom.GetObject\n ' instead of Rhino.Input.RhinoGet as GetObject has a DisablePreSelect() method.\n doc.Objects.UnselectAll()\n\n Dim objRef2 As ObjRef = Nothing\n Dim rc2 = RhinoGet.GetOneObject(\"second curve\", True, ObjectType.Curve, objRef2)\n If rc2 <> Result.Success Then\n Return rc2\n End If\n Dim curveB As Curve = Nothing\n If objRef2 IsNot Nothing Then\n curveB = objRef2.Curve()\n End If\n If curveB Is Nothing Then\n Return Result.Failure\n End If\n\n Dim tolerance = doc.ModelAbsoluteTolerance\n\n Dim maxDistance As Double\n Dim maxDistanceParameterA As Double\n Dim maxDistanceParameterB As Double\n Dim minDistance As Double\n Dim minDistanceParameterA As Double\n Dim minDistanceParameterB As Double\n\n Dim conduit As DeviationConduit\n If Not Curve.GetDistancesBetweenCurves(curveA, curveB, tolerance, maxDistance, maxDistanceParameterA, maxDistanceParameterB, _\n minDistance, minDistanceParameterA, minDistanceParameterB) Then\n RhinoApp.WriteLine(\"Unable to find overlap intervals.\")\n Return Result.Success\n Else\n If minDistance <= RhinoMath.ZeroTolerance Then\n minDistance = 0.0\n End If\n Dim maxDistPtA = curveA.PointAt(maxDistanceParameterA)\n Dim maxDistPtB = curveB.PointAt(maxDistanceParameterB)\n Dim minDistPtA = curveA.PointAt(minDistanceParameterA)\n Dim minDistPtB = curveB.PointAt(minDistanceParameterB)\n\n conduit = New DeviationConduit(curveA, curveB, minDistPtA, minDistPtB, maxDistPtA, maxDistPtB)\n conduit.Enabled = True\n\n doc.Views.Redraw()\n RhinoApp.WriteLine(\"Minimum deviation= {0} pointA= {1}, pointB= {2}\", minDistance, minDistPtA, minDistPtB)\n RhinoApp.WriteLine(\"Maximum deviation= {0} pointA= {1}, pointB= {2}\", maxDistance, maxDistPtA, maxDistPtB)\n End If\n\n Dim str As String = \"\"\n RhinoGet.GetString(\"Press Enter when done\", True, str)\n conduit.Enabled = False\n\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean GetDistancesBetweenCurves(Curve curveA, Curve curveB, System.Double tolerance, out System.Double maxDistance, out System.Double maxDistanceParameterA, out System.Double maxDistanceParameterB, out System.Double minDistance, out System.Double minDistanceParameterA, out System.Double minDistanceParameterB)"],
- ["Rhino.DocObjects.Tables.ObjectTable", "System.Int32 UnselectAll()"]
+ ["Rhino.Geometry.Curve", "bool GetDistancesBetweenCurves(Curve curveA, Curve curveB, double tolerance, out double maxDistance, out double maxDistanceParameterA, out double maxDistanceParameterB, out double minDistance, out double minDistanceParameterA, out double minDistanceParameterB)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "int UnselectAll()"]
]
},
{
"name": "Curveboundingbox.vb",
"code": "Partial Class Examples\n Public Shared Function CurveBoundingBox(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Select a curve object\n Dim rhObject As Rhino.DocObjects.ObjRef = Nothing\n Dim rc = Rhino.Input.RhinoGet.GetOneObject(\"Select curve\", False, Rhino.DocObjects.ObjectType.Curve, rhObject)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n ' Validate selection\n Dim curve = rhObject.Curve()\n If curve Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n ' Get the active view's construction plane\n Dim view = doc.Views.ActiveView\n If view Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n Dim plane = view.ActiveViewport.ConstructionPlane()\n\n ' Compute the tight bounding box of the curve in world coordinates\n Dim bbox = curve.GetBoundingBox(True)\n If Not bbox.IsValid Then\n Return Rhino.Commands.Result.Failure\n End If\n\n ' Print the min and max box coordinates in world coordinates\n Rhino.RhinoApp.WriteLine(\"World min: {0}\", bbox.Min)\n Rhino.RhinoApp.WriteLine(\"World max: {0}\", bbox.Max)\n\n ' Compute the tight bounding box of the curve based on the \n ' active view's construction plane\n bbox = curve.GetBoundingBox(plane)\n\n ' Print the min and max box coordinates in cplane coordinates\n Rhino.RhinoApp.WriteLine(\"CPlane min: {0}\", bbox.Min)\n Rhino.RhinoApp.WriteLine(\"CPlane max: {0}\", bbox.Max)\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(Plane plane)"],
- ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(System.Boolean accurate)"]
+ ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(bool accurate)"],
+ ["Rhino.Geometry.GeometryBase", "BoundingBox GetBoundingBox(Plane plane)"]
]
},
{
"name": "Curvebrepbox.vb",
"code": "Imports Rhino\nImports Rhino.Geometry\nImports Rhino.Commands\nImports Rhino.Input\n\nNamespace examples_vb\n Public Class BrepFromCurveBBoxCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbBrepFromCurveBBox\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim objref As DocObjects.ObjRef = Nothing\n Dim rc = RhinoGet.GetOneObject(\"Select Curve\", False, DocObjects.ObjectType.Curve, objref)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim curve = objref.Curve()\n\n Dim view = doc.Views.ActiveView\n Dim plane = view.ActiveViewport.ConstructionPlane()\n ' Create a construction plane aligned bounding box\n Dim bbox = curve.GetBoundingBox(plane)\n\n If bbox.IsDegenerate(doc.ModelAbsoluteTolerance) > 0 Then\n RhinoApp.WriteLine(\"the curve's bounding box is degenerate (flat) in at least one direction so a box cannot be created.\")\n Return Result.Failure\n End If\n Dim brepbox = Brep.CreateFromBox(bbox)\n doc.Objects.AddBrep(brepbox)\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.BoundingBox", "System.Int32 IsDegenerate(System.Double tolerance)"],
+ ["Rhino.Geometry.BoundingBox", "int IsDegenerate(double tolerance)"],
["Rhino.Geometry.Brep", "Brep CreateFromBox(BoundingBox box)"]
]
},
@@ -2406,15 +2406,15 @@
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Input\nImports Rhino.DocObjects\n\nNamespace examples_vb\n Public Class ReverseCurveCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbReverseCurve\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim objRefs As ObjRef() = Nothing\n Dim rc = RhinoGet.GetMultipleObjects(\"Select curves to reverse\", True, ObjectType.Curve, objRefs)\n If rc <> Result.Success Then\n Return rc\n End If\n\n For Each objRef As ObjRef In objRefs\n Dim curveCopy = objRef.Curve().DuplicateCurve()\n If curveCopy IsNot Nothing Then\n curveCopy.Reverse()\n doc.Objects.Replace(objRef, curveCopy)\n End If\n Next\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
["Rhino.Geometry.Curve", "Curve DuplicateCurve()"],
- ["Rhino.Geometry.Curve", "System.Boolean Reverse()"]
+ ["Rhino.Geometry.Curve", "bool Reverse()"]
]
},
{
"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.DocObjects.Tables.ObjectTable", "int Select(IEnumerable objectIds)"],
+ ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveSurface(Curve curve, Surface surface, double tolerance, double overlapTolerance)"],
["Rhino.Geometry.Intersect.IntersectionEvent", "bool IsOverlap"]
]
},
@@ -2422,15 +2422,15 @@
"name": "Customgeometryfilter.vb",
"code": "Imports Rhino\nImports Rhino.Geometry\nImports Rhino.Commands\nImports Rhino.Input.Custom\nImports Rhino.DocObjects\n\nNamespace examples_vb\n Public Class CustomGeometryFilterCommand\n Inherits Command\n Private _tolerance As Double\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbCustomGeometryFilter\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n _tolerance = doc.ModelAbsoluteTolerance\n\n ' only use a custom geometry filter if no simpler filter does the job\n\n ' only curves\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 If gc.[Object](0).Curve() Is Nothing Then\n Return Result.Failure\n End If\n Rhino.RhinoApp.WriteLine(\"curve was selected\")\n\n ' only closed curves\n Dim gcc = New GetObject()\n gcc.SetCommandPrompt(\"select closed curve\")\n gcc.GeometryFilter = ObjectType.Curve\n gcc.GeometryAttributeFilter = GeometryAttributeFilter.ClosedCurve\n gcc.DisablePreSelect()\n gcc.SubObjectSelect = False\n gcc.[Get]()\n If gcc.CommandResult() <> Result.Success Then\n Return gcc.CommandResult()\n End If\n If gcc.[Object](0).Curve() Is Nothing Then\n Return Result.Failure\n End If\n Rhino.RhinoApp.WriteLine(\"closed curve was selected\")\n\n ' only circles with a radius of 10\n Dim gcc10 = New GetObject()\n gcc10.SetCommandPrompt(\"select circle with radius of 10\")\n gc.GeometryFilter = ObjectType.Curve\n gcc10.SetCustomGeometryFilter(AddressOf CircleWithRadiusOf10GeometryFilter)\n ' custom geometry filter\n gcc10.DisablePreSelect()\n gcc10.SubObjectSelect = False\n gcc10.[Get]()\n If gcc10.CommandResult() <> Result.Success Then\n Return gcc10.CommandResult()\n End If\n If gcc10.[Object](0).Curve() Is Nothing Then\n Return Result.Failure\n End If\n Rhino.RhinoApp.WriteLine(\"circle with radius of 10 was selected\")\n\n Return Result.Success\n End Function\n\n Private Function CircleWithRadiusOf10GeometryFilter(rhObject As Rhino.DocObjects.RhinoObject, geometry As GeometryBase, componentIndex As ComponentIndex) As Boolean\n Dim isCircleWithRadiusOf10 As Boolean = False\n Dim circle As Circle\n If TypeOf geometry Is Curve AndAlso TryCast(geometry, Curve).TryGetCircle(circle) Then\n isCircleWithRadiusOf10 = circle.Radius <= 10.0 + _tolerance AndAlso circle.Radius >= 10.0 - _tolerance\n End If\n Return isCircleWithRadiusOf10\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Curve", "System.Boolean TryGetCircle(out Circle circle)"],
- ["Rhino.Input.Custom.GetObject", "System.Void SetCustomGeometryFilter(GetObjectGeometryFilter filter)"]
+ ["Rhino.Geometry.Curve", "bool TryGetCircle(out Circle circle)"],
+ ["Rhino.Input.Custom.GetObject", "void SetCustomGeometryFilter(GetObjectGeometryFilter filter)"]
]
},
{
"name": "Customundo.vb",
"code": "Imports System.Runtime.InteropServices\nImports Rhino\n\n _\nPublic Class ex_customundoCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vb_CustomUndoCommand\"\n End Get\n End Property\n\n Private Property MyFavoriteNumber() As Double\n Get\n Return m_MyFavoriteNumber\n End Get\n Set(value As Double)\n m_MyFavoriteNumber = value\n End Set\n End Property\n Private m_MyFavoriteNumber As Double\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As Rhino.Commands.RunMode) As Rhino.Commands.Result\n ' Rhino automatically sets up an undo record when a command is run,\n ' but... the undo record is not saved if nothing changes in the\n ' document (objects added/deleted, layers changed,...)\n '\n ' If we have a command that doesn't change things in the document,\n ' but we want to have our own custom undo called then we need to do\n ' a little extra work\n\n Dim d As Double = MyFavoriteNumber\n If Rhino.Input.RhinoGet.GetNumber(\"Favorite number\", True, d) = Rhino.Commands.Result.Success Then\n Dim current_value As Double = MyFavoriteNumber\n doc.AddCustomUndoEvent(\"Favorite Number\", AddressOf OnUndoFavoriteNumber, current_value)\n MyFavoriteNumber = d\n End If\n Return Rhino.Commands.Result.Success\n End Function\n\n ' event handler for custom undo\n Private Sub OnUndoFavoriteNumber(sender As Object, e As Rhino.Commands.CustomUndoEventArgs)\n ' !!!!!!!!!!\n ' NEVER change any setting in the Rhino document or application. Rhino\n ' handles ALL changes to the application and document and you will break\n ' the Undo/Redo commands if you make any changes to the application or\n ' document. This is meant only for your own private plug-in data\n ' !!!!!!!!!!\n\n ' This function can be called either by undo or redo\n ' In order to get redo to work, add another custom undo event with the\n ' current value. If you don't want redo to work, just skip adding\n ' a custom undo event here\n Dim current_value As Double = MyFavoriteNumber\n e.Document.AddCustomUndoEvent(\"Favorite Number\", AddressOf OnUndoFavoriteNumber, current_value)\n\n Dim old_value As Double = CDbl(e.Tag)\n RhinoApp.WriteLine(\"Going back to your favorite = {0}\", old_value)\n MyFavoriteNumber = old_value\n End Sub\nEnd Class\n",
"members": [
- ["Rhino.RhinoDoc", "System.Boolean AddCustomUndoEvent(System.String description, EventHandler handler, System.Object tag)"]
+ ["Rhino.RhinoDoc", "bool AddCustomUndoEvent(string description, EventHandler handler, object tag)"]
]
},
{
@@ -2460,32 +2460,32 @@
"name": "Dividebylength.vb",
"code": "Imports Rhino.DocObjects\n\nPartial Class Examples\n Public Shared Function DivideByLengthPoints(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Const filter As ObjectType = Rhino.DocObjects.ObjectType.Curve\n Dim objref As Rhino.DocObjects.ObjRef = Nothing\n Dim rc As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetOneObject(\"Select curve to divide\", False, filter, objref)\n If rc <> Rhino.Commands.Result.Success OrElse objref Is Nothing Then\n Return rc\n End If\n\n Dim crv As Rhino.Geometry.Curve = objref.Curve()\n If crv Is Nothing OrElse crv.IsShort(Rhino.RhinoMath.ZeroTolerance) Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim crv_length As Double = crv.GetLength()\n Dim s As String = String.Format(\"Curve length is {0:f3}. Segment length\", crv_length)\n\n Dim seg_length As Double = crv_length / 2.0\n rc = Rhino.Input.RhinoGet.GetNumber(s, False, seg_length, 0, crv_length)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n Dim points As Rhino.Geometry.Point3d() = Nothing\n crv.DivideByLength(seg_length, True, points)\n If points Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n For Each point As Rhino.Geometry.Point3d In points\n doc.Objects.AddPoint(point)\n Next\n\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Geometry.Curve", "Curve[] JoinCurves(IEnumerable inputCurves, System.Double joinTolerance)"],
- ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, out Point3d[] points)"],
- ["Rhino.Geometry.Curve", "System.Double[] DivideByLength(System.Double segmentLength, System.Boolean includeEnds, System.Boolean reverse, out Point3d[] points)"],
- ["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.Geometry.Curve", "Curve[] JoinCurves(IEnumerable inputCurves, double joinTolerance)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, bool reverse, out Point3d[] points)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, bool reverse)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds, out Point3d[] points)"],
+ ["Rhino.Geometry.Curve", "double DivideByLength(double segmentLength, bool includeEnds)"],
+ ["Rhino.Geometry.Curve", "bool IsShort(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.DocObjects.Tables.ObjectTable", "bool Select(System.Guid objectId)"],
+ ["Rhino.Input.RhinoGet", "Result GetNumber(string prompt, bool acceptNothing, ref double outputNumber, double lowerLimit, double upperLimit)"],
+ ["Rhino.Input.RhinoGet", "Result GetNumber(string prompt, bool acceptNothing, ref double outputNumber)"],
+ ["Rhino.Input.RhinoGet", "Result GetOneObject(string prompt, bool acceptNothing, ObjectType filter, out ObjRef rhObject)"]
]
},
{
"name": "Drawstring.vb",
"code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.Geometry\nImports Rhino.Commands\nImports Rhino.Input.Custom\n\nNamespace examples_vb\n Public Class DrawStringCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbDrawString\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim gp = New GetDrawStringPoint()\n gp.SetCommandPrompt(\"Point\")\n gp.[Get]()\n Return gp.CommandResult()\n End Function\n End Class\n\n Public Class GetDrawStringPoint\n Inherits GetPoint\n Protected Overrides Sub OnDynamicDraw(e As GetPointDrawEventArgs)\n MyBase.OnDynamicDraw(e)\n Dim xform = e.Viewport.GetTransform(CoordinateSystem.World, CoordinateSystem.Screen)\n Dim current_point = e.CurrentPoint\n current_point.Transform(xform)\n Dim screen_point = New Point2d(current_point.X, current_point.Y)\n Dim msg = String.Format(\"screen {0:F}, {1:F}\", current_point.X, current_point.Y)\n e.Display.Draw2dText(msg, System.Drawing.Color.Blue, screen_point, False)\n End Sub\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void Draw2dText(System.String text, System.Drawing.Color color, Point2d screenCoordinate, System.Boolean middleJustified)"]
+ ["Rhino.Display.DisplayPipeline", "void Draw2dText(string text, System.Drawing.Color color, Point2d screenCoordinate, bool middleJustified)"]
]
},
{
"name": "Dupborder.vb",
"code": "Imports Rhino.DocObjects\n\nPartial Class Examples\n Public Shared Function DupBorder(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Const filter As ObjectType = Rhino.DocObjects.ObjectType.Surface Or Rhino.DocObjects.ObjectType.PolysrfFilter\n Dim objref As Rhino.DocObjects.ObjRef = Nothing\n Dim rc As Rhino.Commands.Result = Rhino.Input.RhinoGet.GetOneObject(\"Select surface or polysurface\", False, filter, objref)\n If rc <> Rhino.Commands.Result.Success OrElse objref Is Nothing Then\n Return rc\n End If\n\n Dim rhobj As Rhino.DocObjects.RhinoObject = objref.[Object]()\n Dim brep As Rhino.Geometry.Brep = objref.Brep()\n If rhobj Is Nothing OrElse brep Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n rhobj.[Select](False)\n Dim curves As Rhino.Geometry.Curve() = brep.DuplicateEdgeCurves(True)\n Dim tol As Double = doc.ModelAbsoluteTolerance * 2.1\n curves = Rhino.Geometry.Curve.JoinCurves(curves, tol)\n For i As Integer = 0 To curves.Length - 1\n Dim id As Guid = doc.Objects.AddCurve(curves(i))\n doc.Objects.[Select](id)\n Next\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Geometry.Brep", "Curve[] DuplicateEdgeCurves(System.Boolean nakedOnly)"]
+ ["Rhino.Geometry.Brep", "Curve[] DuplicateEdgeCurves(bool nakedOnly)"]
]
},
{
@@ -2514,7 +2514,7 @@
"code": "Imports System.Collections.Generic\nImports System.Linq\nImports Rhino\nImports Rhino.Commands\nImports Rhino.Geometry\nImports Rhino.Geometry.Intersect\nImports Rhino.Input\nImports Rhino.Input.Custom\nImports Rhino.DocObjects\n\nNamespace examples_vb\n Public Class FurthestZOnSurfaceCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbFurthestZOnSurfaceGivenXY\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n '#Region \"user input\"\n ' select a surface\n Dim gs = New GetObject()\n gs.SetCommandPrompt(\"select surface\")\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 ' get the brep\n Dim brep = gs.[Object](0).Brep()\n If brep Is Nothing Then\n Return Result.Failure\n End If\n\n ' get X and Y\n Dim x As Double = 0.0, y As Double = 0.0\n Dim rc = RhinoGet.GetNumber(\"value of X coordinate\", True, x)\n If rc <> Result.Success Then\n Return rc\n End If\n rc = RhinoGet.GetNumber(\"value of Y coordinate\", True, y)\n If rc <> Result.Success Then\n Return rc\n End If\n '#End Region\n\n ' an earlier version of this sample used a curve-brep intersection to find Z\n 'var maxZ = MaxZIntersectionMethod(brep, x, y, doc.ModelAbsoluteTolerance);\n\n ' projecting points is another way to find Z\n Dim maxZ = MaxZProjectionMethod(brep, x, y, doc.ModelAbsoluteTolerance)\n\n If maxZ IsNot Nothing Then\n RhinoApp.WriteLine(\"Maximum surface Z coordinate at X={0}, Y={1} is {2}\", x, y, maxZ)\n doc.Objects.AddPoint(New Point3d(x, y, maxZ.Value))\n doc.Views.Redraw()\n Else\n RhinoApp.WriteLine(\"no maximum surface Z coordinate at X={0}, Y={1} found.\", x, y)\n End If\n\n Return Result.Success\n End Function\n\n Private Function MaxZProjectionMethod(brep As Brep, x As Double, y As Double, tolerance As Double) As System.Nullable(Of Double)\n Dim maxZ As System.Nullable(Of Double) = Nothing\n Dim breps = New List(Of Brep)() From { _\n brep _\n }\n Dim points = New List(Of Point3d)() From { _\n New Point3d(x, y, 0) _\n }\n ' grab all the points projected in Z dir. Aggregate finds furthest Z from XY plane\n Try\n maxZ = (From pt In Intersection.ProjectPointsToBreps(breps, points, New Vector3d(0, 0, 1), tolerance) Select pt.Z).Aggregate(Function(z1, z2) If(Math.Abs(z1) > Math.Abs(z2), z1, z2))\n 'Sequence contains no elements\n Catch generatedExceptionName As InvalidOperationException\n End Try\n Return maxZ\n End Function\n\n Private Function MaxZIntersectionMethod(brep As Brep, x As Double, y As Double, tolerance As Double) As System.Nullable(Of Double)\n Dim maxZ As System.Nullable(Of Double) = Nothing\n\n Dim bbox = brep.GetBoundingBox(True)\n ' furthest Z from XY plane. Max() doesn't work because of possible negative Z values\n Dim maxDistFromXY = (From corner In bbox.GetCorners() Select corner.Z).Aggregate(Function(z1, z2) If(Math.Abs(z1) > Math.Abs(z2), z1, z2))\n ' multiply distance by 2 to make sure line intersects completely\n Dim lineCurve = New LineCurve(New Point3d(x, y, 0), New Point3d(x, y, maxDistFromXY * 2))\n\n Dim overlapCurves As Curve() = Nothing\n Dim interPoints As Point3d() = Nothing\n If Intersection.CurveBrep(lineCurve, brep, tolerance, overlapCurves, interPoints) Then\n If overlapCurves.Length > 0 OrElse interPoints.Length > 0 Then\n ' grab all the points resulting frem the intersection. \n ' 1st set: points from overlapping curves, \n ' 2nd set: points when there was no overlap\n ' .Aggregate: furthest Z from XY plane.\n Dim overlapCrvsZs As IEnumerable(Of Double) = (From c In overlapCurves Select DirectCast(IIf(Math.Abs(c.PointAtEnd.Z) > Math.Abs(c.PointAtStart.Z), c.PointAtEnd.Z, c.PointAtStart.Z), Double))\n Dim intersectPtsZs As IEnumerable(Of Double) = (From p In interPoints Select p.Z)\n Dim allZs = overlapCrvsZs.Union(intersectPtsZs).ToArray()\n maxZ = allZs.Aggregate(Function(runZ, nextZ) DirectCast(IIf(Math.Abs(runZ) > Math.Abs(nextZ), runZ, nextZ), Double))\n End If\n End If\n Return maxZ\n End Function\n End Class\nEnd Namespace",
"members": [
["Rhino.Geometry.BoundingBox", "Point3d[] GetCorners()"],
- ["Rhino.Geometry.Intersect.Intersection", "System.Boolean CurveBrep(Curve curve, Brep brep, System.Double tolerance, out Curve[] overlapCurves, out Point3d[] intersectionPoints)"]
+ ["Rhino.Geometry.Intersect.Intersection", "bool CurveBrep(Curve curve, Brep brep, double tolerance, out Curve[] overlapCurves, out Point3d[] intersectionPoints)"]
]
},
{
@@ -2522,7 +2522,7 @@
"code": "Imports Rhino\nImports Rhino.Input.Custom\nImports Rhino.DocObjects\nImports Rhino.Commands\n\nNamespace examples_vb\n Public Class NormalDirectionOfBrepFaceCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbDetermineNormDirectionOfBrepFace\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n ' select a surface\n Dim gs = New GetObject()\n gs.SetCommandPrompt(\"select surface\")\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 ' get the selected face\n Dim face = gs.[Object](0).Face()\n If face Is Nothing Then\n Return Result.Failure\n End If\n\n ' pick a point on the surface. Constain\n ' picking to the face.\n Dim gp = New GetPoint()\n gp.SetCommandPrompt(\"select point on surface\")\n gp.Constrain(face, False)\n gp.[Get]()\n If gp.CommandResult() <> Result.Success Then\n Return gp.CommandResult()\n End If\n\n ' get the parameters of the point on the\n ' surface that is clesest to gp.Point()\n Dim u As Double, v As Double\n If face.ClosestPoint(gp.Point(), u, v) Then\n Dim direction = face.NormalAt(u, v)\n If face.OrientationIsReversed Then\n direction.Reverse()\n End If\n RhinoApp.WriteLine(String.Format(\"Surface normal at uv({0:f},{1:f}) = ({2:f},{3:f},{4:f})\", u, v, direction.X, direction.Y, direction.Z))\n End If\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
["Rhino.Geometry.BrepFace", "bool OrientationIsReversed"],
- ["Rhino.Geometry.Surface", "Vector3d NormalAt(System.Double u, System.Double v)"]
+ ["Rhino.Geometry.Surface", "Vector3d NormalAt(double u, double v)"]
]
},
{
@@ -2544,22 +2544,22 @@
"name": "Extractisocurve.vb",
"code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.Commands\nImports Rhino.Input\nImports Rhino.Input.Custom\nImports Rhino.Geometry\n\nNamespace examples_vb\n Public Class ExtractIsocurveCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbExtractIsocurve\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef = Nothing\n Dim rc = RhinoGet.GetOneObject(\"Select surface\", False, ObjectType.Surface, obj_ref)\n If rc <> Result.Success OrElse obj_ref Is Nothing Then\n Return rc\n End If\n Dim surface = obj_ref.Surface()\n\n Dim gp = New GetPoint()\n gp.SetCommandPrompt(\"Point on surface\")\n gp.Constrain(surface, False)\n 'gp.GeometryFilter = ObjectType.Point;\n Dim option_toggle = New OptionToggle(False, \"U\", \"V\")\n gp.AddOptionToggle(\"Direction\", option_toggle)\n Dim point As Point3d = Point3d.Unset\n While True\n Dim grc = gp.[Get]()\n If grc = GetResult.[Option] Then\n Continue While\n ElseIf grc = GetResult.Point Then\n point = gp.Point()\n Exit While\n Else\n Return Result.[Nothing]\n End If\n End While\n If point = Point3d.Unset Then\n Return Result.[Nothing]\n End If\n\n Dim direction As Integer = If(option_toggle.CurrentValue, 1, 0)\n ' V : U\n Dim u_parameter As Double, v_parameter As Double\n If Not surface.ClosestPoint(point, u_parameter, v_parameter) Then\n Return Result.Failure\n End If\n\n Dim iso_curve = surface.IsoCurve(direction, If(direction = 1, u_parameter, v_parameter))\n If iso_curve Is Nothing Then\n Return Result.Failure\n End If\n\n doc.Objects.AddCurve(iso_curve)\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Surface", "Curve IsoCurve(System.Int32 direction, System.Double constantParameter)"]
+ ["Rhino.Geometry.Surface", "Curve IsoCurve(int direction, double constantParameter)"]
]
},
{
"name": "Extractthumbnail.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Input\nImports Rhino.Input.Custom\nImports System.Windows\nImports System.Windows.Controls\n\nNamespace examples_vb\n Public Class ExtractThumbnailCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbExtractThumbnail\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim gf = RhinoGet.GetFileName(GetFileNameMode.OpenImage, \"*.3dm\", \"select file\", Nothing)\n If gf = String.Empty OrElse Not System.IO.File.Exists(gf) Then\n Return Result.Cancel\n End If\n\n Dim bitmap = Rhino.FileIO.File3dm.ReadPreviewImage(gf)\n ' convert System.Drawing.Bitmap to BitmapSource\n Dim imageSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(bitmap.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions())\n\n ' show in WPF window\n Dim window = New Window()\n Dim image = New Image()\n image.Source = imageSource\n\n window.Content = image\n window.Show()\n\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Input.RhinoGet", "System.String GetFileName(GetFileNameMode mode, System.String defaultName, System.String title, System.Object parent, BitmapFileTypes fileTypes)"],
- ["Rhino.Input.RhinoGet", "System.String GetFileName(GetFileNameMode mode, System.String defaultName, System.String title, System.Object parent)"]
+ ["Rhino.Input.RhinoGet", "string GetFileName(GetFileNameMode mode, string defaultName, string title, object parent, BitmapFileTypes fileTypes)"],
+ ["Rhino.Input.RhinoGet", "string GetFileName(GetFileNameMode mode, string defaultName, string title, object parent)"]
]
},
{
"name": "Filletcurves.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Geometry\nImports Rhino.Input\nImports Rhino.DocObjects\nImports Rhino.Input.Custom\n\nNamespace examples_vb\n Public Class FilletCurvesCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbFilletCurves\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim gc1 = New GetObject()\n gc1.DisablePreSelect()\n gc1.SetCommandPrompt(\"Select first curve to fillet (close to the end you want to fillet)\")\n gc1.GeometryFilter = ObjectType.Curve\n gc1.GeometryAttributeFilter = GeometryAttributeFilter.OpenCurve\n gc1.[Get]()\n If gc1.CommandResult() <> Result.Success Then\n Return gc1.CommandResult()\n End If\n Dim curve1_obj_ref = gc1.[Object](0)\n Dim curve1 = curve1_obj_ref.Curve()\n If curve1 Is Nothing Then\n Return Result.Failure\n End If\n Dim curve1_point_near_end = curve1_obj_ref.SelectionPoint()\n If curve1_point_near_end = Point3d.Unset Then\n Return Result.Failure\n End If\n\n Dim gc2 = New GetObject()\n gc2.DisablePreSelect()\n gc2.SetCommandPrompt(\"Select second curve to fillet (close to the end you want to fillet)\")\n gc2.GeometryFilter = ObjectType.Curve\n gc2.GeometryAttributeFilter = GeometryAttributeFilter.OpenCurve\n gc2.[Get]()\n If gc2.CommandResult() <> Result.Success Then\n Return gc2.CommandResult()\n End If\n Dim curve2_obj_ref = gc2.[Object](0)\n Dim curve2 = curve2_obj_ref.Curve()\n If curve2 Is Nothing Then\n Return Result.Failure\n End If\n Dim curve2_point_near_end = curve2_obj_ref.SelectionPoint()\n If curve2_point_near_end = Point3d.Unset Then\n Return Result.Failure\n End If\n\n Dim radius As Double = 0\n Dim rc = RhinoGet.GetNumber(\"fillet radius\", False, radius)\n If rc <> Result.Success Then\n Return rc\n End If\n\n Dim fillet_curve = Curve.CreateFilletCurves(curve1, curve1_point_near_end, curve2, curve2_point_near_end, radius, True, _\n True, True, doc.ModelAbsoluteTolerance, doc.ModelAngleToleranceDegrees)\n If fillet_curve Is Nothing OrElse fillet_curve.Length <> 1 Then\n Return Result.Failure\n End If\n\n doc.Objects.AddCurve(fillet_curve(0))\n doc.Views.Redraw()\n Return rc\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Curve", "Curve[] CreateFilletCurves(Curve curve0, Point3d point0, Curve curve1, Point3d point1, System.Double radius, System.Boolean join, System.Boolean trim, System.Boolean arcExtension, System.Double tolerance, System.Double angleTolerance)"]
+ ["Rhino.Geometry.Curve", "Curve[] CreateFilletCurves(Curve curve0, Point3d point0, Curve curve1, Point3d point1, double radius, bool join, bool trim, bool arcExtension, double tolerance, double angleTolerance)"]
]
},
{
@@ -2574,8 +2574,8 @@
"name": "Getpointdynamicdraw.vb",
"code": "Imports Rhino\nImports Rhino.Geometry\nImports Rhino.Commands\nImports Rhino.Input.Custom\n\nNamespace examples_vb\n Public Class GetPointDynamicDrawCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbGetPointDynamicDraw\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim gp = New GetPoint()\n gp.SetCommandPrompt(\"Center point\")\n gp.[Get]()\n If gp.CommandResult() <> Result.Success Then\n Return gp.CommandResult()\n End If\n Dim center_point = gp.Point()\n If center_point = Point3d.Unset Then\n Return Result.Failure\n End If\n\n Dim gcp = New GetCircleRadiusPoint(center_point)\n gcp.SetCommandPrompt(\"Radius\")\n gcp.ConstrainToConstructionPlane(False)\n gcp.SetBasePoint(center_point, True)\n gcp.DrawLineFromPoint(center_point, True)\n gcp.[Get]()\n If gcp.CommandResult() <> Result.Success Then\n Return gcp.CommandResult()\n End If\n\n Dim radius = center_point.DistanceTo(gcp.Point())\n Dim cplane = doc.Views.ActiveView.ActiveViewport.ConstructionPlane()\n doc.Objects.AddCircle(New Circle(cplane, center_point, radius))\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\n\n Public Class GetCircleRadiusPoint\n Inherits GetPoint\n Private m_center_point As Point3d\n\n Public Sub New(centerPoint As Point3d)\n m_center_point = centerPoint\n End Sub\n\n Protected Overrides Sub OnDynamicDraw(e As GetPointDrawEventArgs)\n MyBase.OnDynamicDraw(e)\n Dim cplane = e.RhinoDoc.Views.ActiveView.ActiveViewport.ConstructionPlane()\n Dim radius = m_center_point.DistanceTo(e.CurrentPoint)\n Dim circle = New Circle(cplane, m_center_point, radius)\n e.Display.DrawCircle(circle, System.Drawing.Color.Black)\n End Sub\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Display.DisplayPipeline", "System.Void DrawCircle(Circle circle, System.Drawing.Color color)"],
- ["Rhino.Input.Custom.GetPoint", "System.Void OnDynamicDraw(GetPointDrawEventArgs e)"]
+ ["Rhino.Display.DisplayPipeline", "void DrawCircle(Circle circle, System.Drawing.Color color)"],
+ ["Rhino.Input.Custom.GetPoint", "void OnDynamicDraw(GetPointDrawEventArgs e)"]
]
},
{
@@ -2591,11 +2591,11 @@
"members": [
["Rhino.RhinoDoc", "HatchPatternTable HatchPatterns"],
["Rhino.DocObjects.ModelComponent", "string Name"],
- ["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.Geometry.Hatch", "Hatch[] Create(Curve curve, int hatchPatternIndex, double rotationRadians, double scale, double tolerance)"],
+ ["Rhino.Geometry.Hatch", "Hatch[] Create(Curve curve, int hatchPatternIndex, double rotationRadians, double scale)"],
["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.HatchPatternTable", "int Find(string name, bool ignoreDeleted)"],
+ ["Rhino.DocObjects.Tables.HatchPatternTable", "HatchPattern FindName(string name)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddHatch(Hatch hatch)"]
]
},
@@ -2603,10 +2603,10 @@
"name": "Insertknot.vb",
"code": "Imports Rhino.DocObjects\n\nPartial Class Examples\n Public Shared Function InsertKnot(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim rc As Rhino.Commands.Result\n Const filter As ObjectType = Rhino.DocObjects.ObjectType.Curve\n Dim objref As Rhino.DocObjects.ObjRef = Nothing\n rc = Rhino.Input.RhinoGet.GetOneObject(\"Select curve for knot insertion\", False, filter, objref)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n Dim curve As Rhino.Geometry.Curve = objref.Curve()\n If curve Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n Dim nurb As Rhino.Geometry.NurbsCurve = curve.ToNurbsCurve()\n If nurb Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n\n Dim gp As New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Point on curve to add knot\")\n gp.Constrain(nurb, False)\n gp.[Get]()\n If gp.CommandResult() = Rhino.Commands.Result.Success Then\n Dim t As Double\n Dim crv As Rhino.Geometry.Curve = gp.PointOnCurve(t)\n If crv IsNot Nothing AndAlso nurb.Knots.InsertKnot(t) Then\n doc.Objects.Replace(objref, nurb)\n doc.Views.Redraw()\n End If\n End If\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"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.Input.Custom.GetPoint", "bool Constrain(Curve curve, bool allowPickingPointOffObject)"],
+ ["Rhino.Input.Custom.GetPoint", "Curve PointOnCurve(out double t)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "bool Replace(ObjRef objref, Curve curve)"],
+ ["Rhino.Geometry.Collections.NurbsCurveKnotList", "bool InsertKnot(double value)"]
]
},
{
@@ -2622,16 +2622,16 @@
"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.DocObjects.ObjRef", "Curve Curve()"],
- ["Rhino.Geometry.Point3d", "System.Double DistanceTo(Point3d other)"],
- ["Rhino.Geometry.Point3f", "System.Double DistanceTo(Point3f other)"],
- ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, System.Double tolerance, System.Double overlapTolerance)"]
+ ["Rhino.Geometry.Point3d", "double DistanceTo(Point3d other)"],
+ ["Rhino.Geometry.Point3f", "double DistanceTo(Point3f other)"],
+ ["Rhino.Geometry.Intersect.Intersection", "CurveIntersections CurveCurve(Curve curveA, Curve curveB, double tolerance, double overlapTolerance)"]
]
},
{
"name": "Intersectlinecircle.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Geometry\nImports Rhino.Geometry.Intersect\n\nNamespace examples_vb\n Public Class IntersectLineCircleCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbIntersectLineCircle\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim circle As Circle\n Dim rc = Rhino.Input.RhinoGet.GetCircle(circle)\n If rc <> Result.Success Then\n Return rc\n End If\n doc.Objects.AddCircle(circle)\n doc.Views.Redraw()\n\n Dim line As Line\n rc = Rhino.Input.RhinoGet.GetLine(line)\n If rc <> Result.Success Then\n Return rc\n End If\n doc.Objects.AddLine(line)\n doc.Views.Redraw()\n\n Dim t1 As Double, t2 As Double\n Dim point1 As Point3d, point2 As Point3d\n Dim lineCircleIntersect = Intersection.LineCircle(line, circle, t1, point1, t2, point2)\n Dim msg As String = \"\"\n Select Case lineCircleIntersect\n Case LineCircleIntersection.None\n msg = \"line does not intersect circle\"\n Exit Select\n Case LineCircleIntersection.[Single]\n msg = [String].Format(\"line intersects circle at point ({0},{1},{2})\", point1.X, point1.Y, point1.Z)\n doc.Objects.AddPoint(point1)\n Exit Select\n Case LineCircleIntersection.Multiple\n msg = [String].Format(\"line intersects circle at points ({0},{1},{2}) and ({3},{4},{5})\", point1.X, point1.Y, point1.Z, point2.X, point2.Y, _\n point2.Z)\n doc.Objects.AddPoint(point1)\n doc.Objects.AddPoint(point2)\n Exit Select\n End Select\n RhinoApp.WriteLine(msg)\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "LineCircleIntersection LineCircle(Line line, Circle circle, out System.Double t1, out Point3d point1, out System.Double t2, out Point3d point2)"]
+ ["Rhino.Geometry.Intersect.Intersection", "LineCircleIntersection LineCircle(Line line, Circle circle, out double t1, out Point3d point1, out double t2, out Point3d point2)"]
]
},
{
@@ -2639,9 +2639,9 @@
"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.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)"]
+ ["Rhino.Geometry.Line", "Point3d PointAt(double t)"],
+ ["Rhino.Geometry.Vector3d", "int IsParallelTo(Vector3d other)"],
+ ["Rhino.Geometry.Intersect.Intersection", "bool LineLine(Line lineA, Line lineB, out double a, out double b)"]
]
},
{
@@ -2649,7 +2649,7 @@
"code": "Partial Class Examples\n Public Shared Function IsBrepBox(brep As Rhino.Geometry.Brep) As Boolean\n Const zero_tolerance As Double = 0.000001 ' or whatever\n Dim rc As Boolean = brep.IsSolid\n If rc Then\n rc = brep.Faces.Count = 6\n End If\n\n Dim N = New Rhino.Geometry.Vector3d(5) {}\n Dim i As Integer = 0\n While rc AndAlso i < 6\n Dim plane As Rhino.Geometry.Plane\n rc = brep.Faces(i).TryGetPlane(plane, zero_tolerance)\n If rc Then\n N(i) = plane.ZAxis\n N(i).Unitize()\n End If\n i += 1\n End While\n\n i = 0\n While rc AndAlso i < 6\n Dim count As Integer = 0\n Dim j As Integer = 0\n While rc AndAlso j < 6\n Dim dot As Double = Math.Abs(N(i) * N(j))\n If dot <= zero_tolerance Then\n Continue While\n End If\n If Math.Abs(dot - 1.0) <= zero_tolerance Then\n count += 1\n Else\n rc = False\n End If\n j += 1\n End While\n\n If rc Then\n If 2 <> count Then\n rc = False\n End If\n End If\n i += 1\n End While\n Return rc\n End Function\n\n Public Shared Function TestBrepBox(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim obj_ref As Rhino.DocObjects.ObjRef = Nothing\n Dim rc = Rhino.Input.RhinoGet.GetOneObject(\"Select Brep\", True, Rhino.DocObjects.ObjectType.Brep, obj_ref)\n If rc = Rhino.Commands.Result.Success Then\n Dim brep = obj_ref.Brep()\n If brep IsNot Nothing Then\n If IsBrepBox(brep) Then\n Rhino.RhinoApp.WriteLine(\"Yes it is a box\")\n Else\n Rhino.RhinoApp.WriteLine(\"No it is not a box\")\n End If\n End If\n End If\n Return rc\n End Function\nEnd Class\n",
"members": [
["Rhino.Geometry.Brep", "bool IsSolid"],
- ["Rhino.Geometry.Surface", "System.Boolean TryGetPlane(out Plane plane, System.Double tolerance)"]
+ ["Rhino.Geometry.Surface", "bool TryGetPlane(out Plane plane, double tolerance)"]
]
},
{
@@ -2663,15 +2663,15 @@
"name": "Issurfaceinplane.vb",
"code": "Imports System.Linq\nImports Rhino\nImports Rhino.DocObjects\nImports Rhino.Geometry\nImports Rhino.Commands\nImports Rhino.Input\n\nNamespace examples_vb\n Public Class IsPlanarSurfaceInPlaneCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbIsPlanarSurfaceInPlane\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef = Nothing\n Dim rc = RhinoGet.GetOneObject(\"select surface\", True, ObjectType.Surface, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim surface = obj_ref.Surface()\n\n Dim corners As Point3d() = Nothing\n rc = RhinoGet.GetRectangle(corners)\n If rc <> Result.Success Then\n Return rc\n End If\n\n Dim plane = New Plane(corners(0), corners(1), corners(2))\n\n Dim is_or_isnt = If(IsSurfaceInPlane(surface, plane, doc.ModelAbsoluteTolerance), \"\", \" not \")\n RhinoApp.WriteLine(\"Surface is{0} in plane.\", is_or_isnt)\n Return Result.Success\n End Function\n\n Private Function IsSurfaceInPlane(surface As Surface, plane As Plane, tolerance As Double) As Boolean\n If Not surface.IsPlanar(tolerance) Then\n Return False\n End If\n\n Dim bbox = surface.GetBoundingBox(True)\n Return bbox.GetCorners().All(Function(corner) Math.Abs(plane.DistanceTo(corner)) <= tolerance)\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Plane", "System.Double DistanceTo(Point3d testPoint)"],
- ["Rhino.Geometry.Surface", "System.Boolean IsPlanar()"]
+ ["Rhino.Geometry.Plane", "double DistanceTo(Point3d testPoint)"],
+ ["Rhino.Geometry.Surface", "bool IsPlanar()"]
]
},
{
"name": "Leader.vb",
"code": "Imports Rhino\nImports Rhino.Geometry\nImports Rhino.Commands\nImports System.Collections.Generic\nImports System.Linq\n\nNamespace examples_vb\n Public Class LeaderCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbLeader\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim points = New List(Of Point3d)() From { _\n New Point3d(1, 1, 0), _\n New Point3d(5, 1, 0), _\n New Point3d(5, 5, 0), _\n New Point3d(9, 5, 0) _\n }\n\n Dim xyPlane = Plane.WorldXY\n\n Dim points2d = New List(Of Point2d)()\n For Each point3d As Point3d In points\n Dim x As Double, y As Double\n If xyPlane.ClosestParameter(point3d, x, y) Then\n Dim point2d = New Point2d(x, y)\n If points2d.Count < 1 OrElse point2d.DistanceTo(points2d.Last()) > RhinoMath.SqrtEpsilon Then\n points2d.Add(point2d)\n End If\n End If\n Next\n\n doc.Objects.AddLeader(xyPlane, points2d)\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Point2d", "System.Double DistanceTo(Point2d other)"],
+ ["Rhino.Geometry.Point2d", "double DistanceTo(Point2d other)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddLeader(Plane plane, IEnumerable points)"]
]
},
@@ -2681,32 +2681,32 @@
"members": [
["Rhino.DocObjects.Layer", "string FullPath"],
["Rhino.DocObjects.Layer", "bool IsLocked"],
- ["Rhino.DocObjects.Layer", "System.Boolean CommitChanges()"]
+ ["Rhino.DocObjects.Layer", "bool CommitChanges()"]
]
},
{
"name": "Loft.vb",
"code": "Imports Rhino\nImports Rhino.Input.Custom\nImports Rhino.DocObjects\nImports Rhino.Commands\nImports System.Collections.Generic\nImports Rhino.Geometry\n\nNamespace examples_vb\n Public Class LoftCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbLoft\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As Rhino.Commands.RunMode) As Result\n ' select curves to loft\n Dim gs = New GetObject()\n gs.SetCommandPrompt(\"select curves to loft\")\n gs.GeometryFilter = ObjectType.Curve\n gs.DisablePreSelect()\n gs.SubObjectSelect = False\n gs.GetMultiple(2, 0)\n If gs.CommandResult() <> Result.Success Then\n Return gs.CommandResult()\n End If\n\n Dim curves = New List(Of Curve)()\n For Each obj As ObjRef In gs.Objects()\n curves.Add(obj.Curve())\n Next\n\n Dim breps = Rhino.Geometry.Brep.CreateFromLoft(curves, Point3d.Unset, Point3d.Unset, LoftType.Tight, False)\n For Each brep As Brep In breps\n doc.Objects.AddBrep(brep)\n Next\n\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Brep", "Brep[] CreateFromLoft(IEnumerable curves, Point3d start, Point3d end, LoftType loftType, System.Boolean closed)"]
+ ["Rhino.Geometry.Brep", "Brep[] CreateFromLoft(IEnumerable curves, Point3d start, Point3d end, LoftType loftType, bool closed)"]
]
},
{
"name": "Makerhinocontours.vb",
"code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.Geometry\nImports Rhino.Input\nImports Rhino.Input.Custom\nImports Rhino.Commands\n\nNamespace examples_vb\n Public Class ContourCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbContour\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim filter = ObjectType.Surface Or ObjectType.PolysrfFilter Or ObjectType.Mesh\n Dim obj_refs As ObjRef() = Nothing\n Dim rc = RhinoGet.GetMultipleObjects(\"Select objects to contour\", False, filter, obj_refs)\n If rc <> Result.Success Then\n Return rc\n End If\n\n Dim gp = New GetPoint()\n gp.SetCommandPrompt(\"Contour plane base point\")\n gp.[Get]()\n If gp.CommandResult() <> Result.Success Then\n Return gp.CommandResult()\n End If\n Dim base_point = gp.Point()\n\n gp.DrawLineFromPoint(base_point, True)\n gp.SetCommandPrompt(\"Direction perpendicular to contour planes\")\n gp.[Get]()\n If gp.CommandResult() <> Result.Success Then\n Return gp.CommandResult()\n End If\n Dim end_point = gp.Point()\n\n If base_point.DistanceTo(end_point) < RhinoMath.ZeroTolerance Then\n Return Result.[Nothing]\n End If\n\n Dim distance As Double = 1.0\n rc = RhinoGet.GetNumber(\"Distance between contours\", False, distance)\n If rc <> Result.Success Then\n Return rc\n End If\n\n Dim interval = Math.Abs(distance)\n\n Dim curves As Curve() = Nothing\n For Each obj_ref As ObjRef In obj_refs\n Dim geometry = obj_ref.Geometry()\n If geometry Is Nothing Then\n Return Result.Failure\n End If\n\n If TypeOf geometry Is Brep Then\n curves = Brep.CreateContourCurves(TryCast(geometry, Brep), base_point, end_point, interval)\n Else\n curves = Mesh.CreateContourCurves(TryCast(geometry, Mesh), base_point, end_point, interval)\n End If\n\n For Each curve As Curve In curves\n Dim curve_object_id = doc.Objects.AddCurve(curve)\n doc.Objects.[Select](curve_object_id)\n Next\n Next\n\n If curves IsNot Nothing Then\n doc.Views.Redraw()\n End If\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Brep", "Curve[] CreateContourCurves(Brep brepToContour, Point3d contourStart, Point3d contourEnd, System.Double interval)"],
- ["Rhino.Geometry.Mesh", "Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, System.Double interval, System.Double tolerance)"]
+ ["Rhino.Geometry.Brep", "Curve[] CreateContourCurves(Brep brepToContour, Point3d contourStart, Point3d contourEnd, double interval)"],
+ ["Rhino.Geometry.Mesh", "Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, double interval, double tolerance)"]
]
},
{
"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.DisplayPipeline", "void DrawMeshShaded(Mesh mesh, DisplayMaterial material)"],
+ ["Rhino.Display.DisplayPipeline", "void DrawMeshWires(Mesh mesh, System.Drawing.Color color)"],
+ ["Rhino.Display.DisplayConduit", "void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)"],
+ ["Rhino.Display.DisplayConduit", "void PreDrawObjects(DrawEventArgs e)"]
]
},
{
@@ -2721,9 +2721,9 @@
"name": "Modifylightcolor.vb",
"code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.Commands\nImports Rhino.Input\nImports Rhino.UI\n\nNamespace examples_vb\n Public Class ChangeLightColorCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbLightColor\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef = Nothing\n Dim rc = RhinoGet.GetOneObject(\"Select light to change color\", True, ObjectType.Light, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim light = obj_ref.Light()\n If light Is Nothing Then\n Return Result.Failure\n End If\n\n Dim diffuse_color = light.Diffuse\n If Dialogs.ShowColorDialog(diffuse_color) Then\n light.Diffuse = diffuse_color\n End If\n\n doc.Lights.Modify(obj_ref.ObjectId, light)\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.UI.Dialogs", "System.Boolean ShowColorDialog(ref System.Drawing.Color color)"],
+ ["Rhino.UI.Dialogs", "bool ShowColorDialog(ref System.Drawing.Color color)"],
["Rhino.Geometry.Light", "Color Diffuse"],
- ["Rhino.DocObjects.Tables.LightTable", "System.Boolean Modify(System.Guid id, Geometry.Light light)"]
+ ["Rhino.DocObjects.Tables.LightTable", "bool Modify(System.Guid id, Geometry.Light light)"]
]
},
{
@@ -2746,15 +2746,15 @@
"name": "Nurbscurveincreasedegree.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Input\nImports Rhino.DocObjects\n\nNamespace examples_vb\n Public Class NurbsCurveIncreaseDegreeCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbNurbsCrvIncreaseDegree\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef\n Dim rc = RhinoGet.GetOneObject(\"Select curve\", False, ObjectType.Curve, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n If obj_ref Is Nothing Then\n Return Result.Failure\n End If\n Dim curve = obj_ref.Curve()\n If curve Is Nothing Then\n Return Result.Failure\n End If\n Dim nurbs_curve = curve.ToNurbsCurve()\n\n Dim new_degree As Integer = -1\n rc = RhinoGet.GetInteger(String.Format(\"New degree <{0}...11>\", nurbs_curve.Degree), True, new_degree, nurbs_curve.Degree, 11)\n If rc <> Result.Success Then\n Return rc\n End If\n\n rc = Result.Failure\n If nurbs_curve.IncreaseDegree(new_degree) Then\n If doc.Objects.Replace(obj_ref.ObjectId, nurbs_curve) Then\n rc = Result.Success\n End If\n End If\n\n RhinoApp.WriteLine(\"Result: {0}\", rc.ToString())\n doc.Views.Redraw()\n Return rc\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.NurbsCurve", "System.Boolean IncreaseDegree(System.Int32 desiredDegree)"]
+ ["Rhino.Geometry.NurbsCurve", "bool IncreaseDegree(int desiredDegree)"]
]
},
{
"name": "Nurbssurfaceincreasedegree.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.Input\nImports Rhino.DocObjects\n\nNamespace examples_vb\n Public Class NurbsSurfaceIncreaseDegreeCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbNurbsSrfIncreaseDegree\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef\n Dim rc = RhinoGet.GetOneObject(\"Select surface\", False, ObjectType.Surface, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n If obj_ref Is Nothing Then\n Return Result.Failure\n End If\n Dim surface = obj_ref.Surface()\n If surface Is Nothing Then\n Return Result.Failure\n End If\n Dim nurbs_surface = surface.ToNurbsSurface()\n\n Dim new_u_degree As Integer = -1\n rc = RhinoGet.GetInteger(String.Format(\"New U degree <{0}...11>\", nurbs_surface.Degree(0)), True, new_u_degree, nurbs_surface.Degree(0), 11)\n If rc <> Result.Success Then\n Return rc\n End If\n\n Dim new_v_degree As Integer = -1\n rc = RhinoGet.GetInteger(String.Format(\"New V degree <{0}...11>\", nurbs_surface.Degree(1)), True, new_v_degree, nurbs_surface.Degree(1), 11)\n If rc <> Result.Success Then\n Return rc\n End If\n\n rc = Result.Failure\n If nurbs_surface.IncreaseDegreeU(new_u_degree) Then\n If nurbs_surface.IncreaseDegreeV(new_v_degree) Then\n If doc.Objects.Replace(obj_ref.ObjectId, nurbs_surface) Then\n rc = Result.Success\n End If\n End If\n End If\n\n RhinoApp.WriteLine(\"Result: {0}\", rc.ToString())\n doc.Views.Redraw()\n Return rc\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.NurbsSurface", "System.Boolean IncreaseDegreeU(System.Int32 desiredDegree)"],
- ["Rhino.Geometry.NurbsSurface", "System.Boolean IncreaseDegreeV(System.Int32 desiredDegree)"]
+ ["Rhino.Geometry.NurbsSurface", "bool IncreaseDegreeU(int desiredDegree)"],
+ ["Rhino.Geometry.NurbsSurface", "bool IncreaseDegreeV(int desiredDegree)"]
]
},
{
@@ -2768,11 +2768,11 @@
"name": "Objectdisplaymode.vb",
"code": "Imports Rhino\nImports Rhino.DocObjects\n\nPartial Class Examples\n Public Shared Function ObjectDisplayMode(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim rc As Rhino.Commands.Result\n Const filter As ObjectType = ObjectType.Mesh Or ObjectType.Brep\n Dim objref As ObjRef = Nothing\n rc = Rhino.Input.RhinoGet.GetOneObject(\"Select mesh or surface\", True, filter, objref)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n Dim viewportId As Guid = doc.Views.ActiveView.ActiveViewportID\n\n Dim attr As ObjectAttributes = objref.[Object]().Attributes\n If attr.HasDisplayModeOverride(viewportId) Then\n RhinoApp.WriteLine(\"Removing display mode override from object\")\n attr.RemoveDisplayModeOverride(viewportId)\n Else\n Dim modes As Rhino.Display.DisplayModeDescription() = Rhino.Display.DisplayModeDescription.GetDisplayModes()\n Dim mode As Rhino.Display.DisplayModeDescription = Nothing\n If modes.Length = 1 Then\n mode = modes(0)\n Else\n Dim go As New Rhino.Input.Custom.GetOption()\n go.SetCommandPrompt(\"Select display mode\")\n Dim str_modes As String() = New String(modes.Length - 1) {}\n For i As Integer = 0 To modes.Length - 1\n str_modes(i) = modes(i).EnglishName.Replace(\" \", \"\").Replace(\"-\", \"\")\n Next\n go.AddOptionList(\"DisplayMode\", str_modes, 0)\n If go.[Get]() = Rhino.Input.GetResult.[Option] Then\n mode = modes(go.[Option]().CurrentListOptionIndex)\n End If\n End If\n If mode Is Nothing Then\n Return Rhino.Commands.Result.Cancel\n End If\n attr.SetDisplayModeOverride(mode, viewportId)\n End If\n doc.Objects.ModifyAttributes(objref, attr, False)\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.DocObjects.ObjectAttributes", "System.Boolean HasDisplayModeOverride(System.Guid viewportId)"],
- ["Rhino.DocObjects.ObjectAttributes", "System.Void RemoveDisplayModeOverride(System.Guid rhinoViewportId)"],
- ["Rhino.DocObjects.ObjectAttributes", "System.Boolean SetDisplayModeOverride(Display.DisplayModeDescription mode, System.Guid rhinoViewportId)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionList(LocalizeStringPair optionName, IEnumerable listValues, System.Int32 listCurrentIndex)"],
- ["Rhino.Input.Custom.GetBaseClass", "System.Int32 AddOptionList(System.String englishOptionName, IEnumerable listValues, System.Int32 listCurrentIndex)"]
+ ["Rhino.DocObjects.ObjectAttributes", "bool HasDisplayModeOverride(System.Guid viewportId)"],
+ ["Rhino.DocObjects.ObjectAttributes", "void RemoveDisplayModeOverride(System.Guid rhinoViewportId)"],
+ ["Rhino.DocObjects.ObjectAttributes", "bool SetDisplayModeOverride(Display.DisplayModeDescription mode, System.Guid rhinoViewportId)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionList(LocalizeStringPair optionName, IEnumerable listValues, int listCurrentIndex)"],
+ ["Rhino.Input.Custom.GetBaseClass", "int AddOptionList(string englishOptionName, IEnumerable listValues, int listCurrentIndex)"]
]
},
{
@@ -2787,19 +2787,19 @@
"name": "Orientonsrf.vb",
"code": "Partial Class Examples\n Public Shared Function OrientOnSrf(ByVal doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n ' Select objects to orient\n Dim go As New Rhino.Input.Custom.GetObject()\n go.SetCommandPrompt(\"Select objects to orient\")\n go.SubObjectSelect = False\n go.GroupSelect = True\n go.GetMultiple(1, 0)\n If go.CommandResult() <> Rhino.Commands.Result.Success Then\n Return go.CommandResult()\n End If\n\n ' Point to orient from\n Dim gp As New Rhino.Input.Custom.GetPoint()\n gp.SetCommandPrompt(\"Point to orient from\")\n gp.Get()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n\n ' Define source plane\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 Dim source_plane As Rhino.Geometry.Plane = view.ActiveViewport.ConstructionPlane()\n source_plane.Origin = gp.Point()\n\n ' Surface to orient on\n Dim gs As New Rhino.Input.Custom.GetObject()\n gs.SetCommandPrompt(\"Surface to orient on\")\n gs.GeometryFilter = Rhino.DocObjects.ObjectType.Surface\n gs.SubObjectSelect = True\n gs.DeselectAllBeforePostSelect = False\n gs.OneByOnePostSelect = True\n gs.Get()\n If gs.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gs.CommandResult()\n End If\n\n Dim objref As Rhino.DocObjects.ObjRef = gs.[Object](0)\n ' get selected surface object\n Dim obj As Rhino.DocObjects.RhinoObject = objref.[Object]()\n If obj Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n ' get selected surface (face)\n Dim surface As Rhino.Geometry.Surface = objref.Surface()\n If surface Is Nothing Then\n Return Rhino.Commands.Result.Failure\n End If\n ' Unselect surface\n obj.[Select](False)\n\n ' Point on surface to orient to\n gp.SetCommandPrompt(\"Point on surface to orient to\")\n gp.Constrain(surface, False)\n gp.Get()\n If gp.CommandResult() <> Rhino.Commands.Result.Success Then\n Return gp.CommandResult()\n End If\n\n ' Do transformation\n Dim rc As Rhino.Commands.Result = Rhino.Commands.Result.Failure\n Dim u As Double, v As Double\n If surface.ClosestPoint(gp.Point(), u, v) Then\n Dim target_plane As Rhino.Geometry.Plane\n If surface.FrameAt(u, v, target_plane) Then\n ' Build transformation\n Dim xform As Rhino.Geometry.Transform = Rhino.Geometry.Transform.PlaneToPlane(source_plane, target_plane)\n\n ' Do the transformation. In this example, we will copy the original objects\n Const delete_original As Boolean = False\n For i As Integer = 0 To go.ObjectCount - 1\n doc.Objects.Transform(go.[Object](i), xform, delete_original)\n Next\n\n doc.Views.Redraw()\n rc = Rhino.Commands.Result.Success\n End If\n End If\n Return rc\n End Function\nEnd Class\n",
"members": [
- ["Rhino.DocObjects.RhinoObject", "System.Int32 Select(System.Boolean on)"],
+ ["Rhino.DocObjects.RhinoObject", "int Select(bool on)"],
["Rhino.DocObjects.ObjRef", "RhinoObject Object()"],
["Rhino.DocObjects.ObjRef", "Surface Surface()"],
- ["Rhino.Geometry.Surface", "System.Boolean ClosestPoint(Point3d testPoint, out System.Double u, out System.Double v)"],
- ["Rhino.Geometry.Surface", "System.Boolean FrameAt(System.Double u, System.Double v, out Plane frame)"],
- ["Rhino.Input.Custom.GetPoint", "System.Boolean Constrain(Surface surface, System.Boolean allowPickingPointOffObject)"],
+ ["Rhino.Geometry.Surface", "bool ClosestPoint(Point3d testPoint, out double u, out double v)"],
+ ["Rhino.Geometry.Surface", "bool FrameAt(double u, double v, out Plane frame)"],
+ ["Rhino.Input.Custom.GetPoint", "bool Constrain(Surface surface, bool 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.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, System.Boolean deleteOriginal)"]
+ ["Rhino.Input.Custom.GetObject", "ObjRef Object(int index)"],
+ ["Rhino.DocObjects.Tables.ObjectTable", "System.Guid Transform(ObjRef objref, Transform xform, bool deleteOriginal)"]
]
},
{
@@ -2821,7 +2821,7 @@
"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", "void Transform(Transform xform)"]
]
},
{
@@ -2832,9 +2832,9 @@
["Rhino.Geometry.SurfaceCurvature", "double Mean"],
["Rhino.Geometry.SurfaceCurvature", "Vector3d Normal"],
["Rhino.Geometry.SurfaceCurvature", "Point3d Point"],
- ["Rhino.Geometry.SurfaceCurvature", "Vector3d Direction(System.Int32 direction)"],
- ["Rhino.Geometry.SurfaceCurvature", "System.Double Kappa(System.Int32 direction)"],
- ["Rhino.Geometry.Surface", "SurfaceCurvature CurvatureAt(System.Double u, System.Double v)"]
+ ["Rhino.Geometry.SurfaceCurvature", "Vector3d Direction(int direction)"],
+ ["Rhino.Geometry.SurfaceCurvature", "double Kappa(int direction)"],
+ ["Rhino.Geometry.Surface", "SurfaceCurvature CurvatureAt(double u, double v)"]
]
},
{
@@ -2842,23 +2842,23 @@
"code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.FileIO\nImports Rhino.Commands\n\nNamespace examples_vb\n Public Class InstanceDefinitionTreeCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbInstanceDefinitionTree\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim instanceDefinitions = doc.InstanceDefinitions\n Dim instanceDefinitionCount = instanceDefinitions.Count\n\n If instanceDefinitionCount = 0 Then\n RhinoApp.WriteLine(\"Document contains no instance definitions.\")\n Return Result.[Nothing]\n End If\n\n Dim dump = New TextLog()\n dump.IndentSize = 4\n\n For i As Integer = 0 To instanceDefinitionCount - 1\n DumpInstanceDefinition(instanceDefinitions(i), dump, True)\n Next\n\n RhinoApp.WriteLine(dump.ToString())\n\n Return Result.Success\n End Function\n\n Private Sub DumpInstanceDefinition(instanceDefinition As InstanceDefinition, ByRef dump As TextLog, isRoot As Boolean)\n If instanceDefinition IsNot Nothing AndAlso Not instanceDefinition.IsDeleted Then\n Dim node As String\n If isRoot Then\n node = \"─\"\n Else\n '\"\\u2500\"; \n node = \"└\"\n End If\n '\"\\u2514\"; \n dump.Print(String.Format(\"{0} Instance definition {1} = {2}\" & vbLf, node, instanceDefinition.Index, instanceDefinition.Name))\n\n If instanceDefinition.ObjectCount > 0 Then\n dump.PushIndent()\n For i As Integer = 0 To instanceDefinition.ObjectCount - 1\n Dim obj = instanceDefinition.[Object](i)\n\n If obj Is Nothing Then Continue For\n\n If TypeOf obj Is InstanceObject Then\n DumpInstanceDefinition(TryCast(obj, InstanceObject).InstanceDefinition, dump, False)\n Else\n ' Recursive...\n dump.Print(String.Format(\"└ Object {0} = {1}\" & vbLf, i, obj.ShortDescription(False)))\n End If\n Next\n dump.PopIndent()\n End If\n End If\n End Sub\n End Class\nEnd Namespace",
"members": [
["Rhino.RhinoDoc", "InstanceDefinitionTable InstanceDefinitions"],
- ["Rhino.FileIO.TextLog", "System.Void PopIndent()"],
- ["Rhino.FileIO.TextLog", "System.Void Print(System.String text)"],
- ["Rhino.FileIO.TextLog", "System.Void PushIndent()"]
+ ["Rhino.FileIO.TextLog", "void PopIndent()"],
+ ["Rhino.FileIO.TextLog", "void Print(string text)"],
+ ["Rhino.FileIO.TextLog", "void PushIndent()"]
]
},
{
"name": "Projectpointstobreps.vb",
"code": "Imports Rhino\nImports Rhino.DocObjects\nImports Rhino.Input.Custom\nImports Rhino.Commands\nImports System.Collections.Generic\nImports Rhino.Geometry\nImports Rhino.Geometry.Intersect\n\nNamespace examples_vb\n Public Class ProjectPointsToBrepsCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbProjectPtointsToBreps\"\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 surface\")\n gs.GeometryFilter = ObjectType.Surface Or ObjectType.PolysrfFilter\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 If brep Is Nothing Then\n Return Result.Failure\n End If\n\n ' brep on which to project\n ' some random points to project\n ' project on Y axis\n Dim points = Intersection.ProjectPointsToBreps(New List(Of Brep)() From { _\n brep _\n }, New List(Of Point3d)() From { _\n New Point3d(0, 0, 0), _\n New Point3d(3, 0, 3), _\n New Point3d(-2, 0, -2) _\n }, New Vector3d(0, 1, 0), doc.ModelAbsoluteTolerance)\n\n If points IsNot Nothing AndAlso points.Length > 0 Then\n For Each point As Point3d In points\n doc.Objects.AddPoint(point)\n Next\n End If\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToBreps(IEnumerable breps, IEnumerable points, Vector3d direction, System.Double tolerance)"]
+ ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToBreps(IEnumerable breps, IEnumerable points, Vector3d direction, double tolerance)"]
]
},
{
"name": "Projectpointstomeshesex.vb",
"code": "Imports System.Collections.Generic\nImports Rhino\nImports Rhino.Commands\nImports Rhino.Geometry\nImports Rhino.Geometry.Intersect\nImports Rhino.Input\nImports Rhino.DocObjects\n\nNamespace examples_vb\n Public Class ProjectPointsToMeshesExCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbProjectPointsToMeshesEx\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef\n Dim rc = RhinoGet.GetOneObject(\"mesh\", False, ObjectType.Mesh, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim mesh = obj_ref.Mesh()\n\n Dim obj_ref_pts As ObjRef()\n rc = RhinoGet.GetMultipleObjects(\"points\", False, ObjectType.Point, obj_ref_pts)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim points As New List(Of Point3d)()\n For Each obj_ref_pt As ObjRef In obj_ref_pts\n Dim pt = obj_ref_pt.Point().Location\n points.Add(pt)\n Next\n\n Dim indices As Integer()\n Dim prj_points = Intersection.ProjectPointsToMeshesEx(New Mesh() {mesh}, points, New Vector3d(0, 1, 0), 0, indices)\n For Each prj_pt As Point3d In prj_points\n doc.Objects.AddPoint(prj_pt)\n Next\n doc.Views.Redraw()\n Return Result.Success\n End Function\n End Class\nEnd Namespace\n\n",
"members": [
- ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToMeshesEx(IEnumerable meshes, IEnumerable points, Vector3d direction, System.Double tolerance, out System.Int32[] indices)"]
+ ["Rhino.Geometry.Intersect.Intersection", "Point3d[] ProjectPointsToMeshesEx(IEnumerable meshes, IEnumerable points, Vector3d direction, double tolerance, out int indices)"]
]
},
{
@@ -2867,14 +2867,14 @@
"members": [
["Rhino.DocObjects.InstanceDefinition", "bool IsDeleted"],
["Rhino.DocObjects.InstanceDefinition", "bool IsReference"],
- ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "System.Boolean Modify(System.Int32 idefIndex, System.String newName, System.String newDescription, System.Boolean quiet)"]
+ ["Rhino.DocObjects.Tables.InstanceDefinitionTable", "bool Modify(int idefIndex, string newName, string newDescription, bool quiet)"]
]
},
{
"name": "Replacecolordialog.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports Rhino.UI\nImports System.Windows.Forms\n\nNamespace examples_vb\n Public Class ReplaceColorDialogCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbReplaceColorDialog\"\n End Get\n End Property\n\n Private m_dlg As ColorDialog = Nothing\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dialogs.SetCustomColorDialog(AddressOf OnSetCustomColorDialog)\n Return Result.Success\n End Function\n\n Private Sub OnSetCustomColorDialog(sender As Object, e As GetColorEventArgs)\n\n m_dlg = New ColorDialog()\n If m_dlg.ShowDialog(Nothing) = DialogResult.OK Then\n Dim c = m_dlg.Color\n e.SelectedColor = c\n End If\n End Sub\n End Class\nEnd Namespace",
"members": [
- ["Rhino.UI.Dialogs", "System.Void SetCustomColorDialog(EventHandler handler)"]
+ ["Rhino.UI.Dialogs", "void SetCustomColorDialog(EventHandler handler)"]
]
},
{
@@ -2904,12 +2904,12 @@
"name": "Screencaptureview.vb",
"code": "Imports System.Windows.Forms\nImports Rhino\nImports Rhino.Commands\n\nNamespace examples_vb\n Public Class CaptureViewToBitmapCommand\n Inherits Rhino.Commands.Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbCaptureViewToBitmap\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim file_name = \"\"\n\n Dim bitmap = doc.Views.ActiveView.CaptureToBitmap(True, True, True)\n\n ' copy bitmap to clipboard\n Clipboard.SetImage(bitmap)\n\n ' save bitmap to file\n Dim save_file_dialog = New Rhino.UI.SaveFileDialog()\n save_file_dialog.Filter = \"*.bmp\"\n save_file_dialog.InitialDirectory =\n Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)\n\n If save_file_dialog.ShowDialog() = DialogResult.OK Then\n file_name = save_file_dialog.FileName\n End If\n\n If file_name <> \"\" Then\n bitmap.Save(file_name)\n End If\n\n Return Rhino.Commands.Result.Success\n End Function\n End Class\nEnd Namespace",
"members": [
- ["Rhino.Display.RhinoView", "System.Drawing.Bitmap CaptureToBitmap(System.Boolean grid, System.Boolean worldAxes, System.Boolean cplaneAxes)"],
+ ["Rhino.Display.RhinoView", "System.Drawing.Bitmap CaptureToBitmap(bool grid, bool worldAxes, bool cplaneAxes)"],
["Rhino.UI.SaveFileDialog", "SaveFileDialog()"],
["Rhino.UI.SaveFileDialog", "string FileName"],
["Rhino.UI.SaveFileDialog", "string Filter"],
["Rhino.UI.SaveFileDialog", "string InitialDirectory"],
- ["Rhino.UI.SaveFileDialog", "System.Boolean ShowSaveDialog()"]
+ ["Rhino.UI.SaveFileDialog", "bool ShowSaveDialog()"]
]
},
{
@@ -2918,7 +2918,7 @@
"members": [
["Rhino.DocObjects.Layer", "string Name"],
["Rhino.DocObjects.Tables.LayerTable", "Layer CurrentLayer"],
- ["Rhino.DocObjects.Tables.ObjectTable", "RhinoObject[] FindByLayer(System.String layerName)"]
+ ["Rhino.DocObjects.Tables.ObjectTable", "RhinoObject[] FindByLayer(string layerName)"]
]
},
{
@@ -2950,7 +2950,7 @@
"members": [
["Rhino.Geometry.TextEntity", "TextEntity()"],
["Rhino.Geometry.TextEntity", "TextJustification Justification"],
- ["Rhino.DocObjects.Tables.FontTable", "System.Int32 FindOrCreate(System.String face, System.Boolean bold, System.Boolean italic)"],
+ ["Rhino.DocObjects.Tables.FontTable", "int FindOrCreate(string face, bool bold, bool italic)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddText(Text3d text3d)"]
]
},
@@ -2958,7 +2958,7 @@
"name": "Tightboundingbox.vb",
"code": "Imports Rhino\nImports Rhino.Commands\nImports System.Linq\nImports Rhino.Geometry\nImports Rhino.Input\nImports Rhino.DocObjects\nImports System.Collections.Generic\n\nNamespace examples_vb\n Public Class TightBoundingBoxCommand\n Inherits Command\n Public Overrides ReadOnly Property EnglishName() As String\n Get\n Return \"vbTightBoundingBox\"\n End Get\n End Property\n\n Protected Overrides Function RunCommand(doc As RhinoDoc, mode As RunMode) As Result\n Dim obj_ref As ObjRef = Nothing\n Dim rc = RhinoGet.GetOneObject(\"Select surface to split\", True, ObjectType.Surface, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim surface = obj_ref.Surface()\n If surface Is Nothing Then\n Return Result.Failure\n End If\n\n obj_ref = Nothing\n rc = RhinoGet.GetOneObject(\"Select cutting curve\", True, ObjectType.Curve, obj_ref)\n If rc <> Result.Success Then\n Return rc\n End If\n Dim curve = obj_ref.Curve()\n If curve Is Nothing Then\n Return Result.Failure\n End If\n\n Dim brep_face = TryCast(surface, BrepFace)\n If brep_face Is Nothing Then\n Return Result.Failure\n End If\n\n Dim split_brep = brep_face.Split(New List(Of Curve)() From { _\n curve _\n }, doc.ModelAbsoluteTolerance)\n If split_brep Is Nothing Then\n RhinoApp.WriteLine(\"Unable to split surface.\")\n Return Result.[Nothing]\n End If\n\n Dim meshes = Mesh.CreateFromBrep(split_brep)\n\n For Each mesh__1 As Mesh In meshes\n Dim bbox = mesh__1.GetBoundingBox(True)\n Select Case bbox.IsDegenerate(doc.ModelAbsoluteTolerance)\n Case 3, 2\n Return Result.Failure\n Exit Select\n Case 1\n ' rectangle\n ' box with 8 corners flattened to rectangle with 4 corners\n Dim rectangle_corners = bbox.GetCorners().Distinct().ToList()\n ' add 1st point as last to close the loop\n rectangle_corners.Add(rectangle_corners(0))\n doc.Objects.AddPolyline(rectangle_corners)\n doc.Views.Redraw()\n Exit Select\n Case 0\n ' box\n Dim brep_box = New Box(bbox).ToBrep()\n doc.Objects.AddBrep(brep_box)\n doc.Views.Redraw()\n Exit Select\n End Select\n Next\n\n Return Result.Success\n End Function\n End Class\nEnd Namespace\n",
"members": [
- ["Rhino.Geometry.BrepFace", "Brep Split(IEnumerable curves, System.Double tolerance)"],
+ ["Rhino.Geometry.BrepFace", "Brep Split(IEnumerable curves, double tolerance)"],
["Rhino.Geometry.Mesh", "Mesh[] CreateFromBrep(Brep brep)"],
["Rhino.DocObjects.Tables.ObjectTable", "System.Guid AddPolyline(IEnumerable points)"]
]
@@ -2967,7 +2967,7 @@
"name": "Transformbrep.vb",
"code": "Imports Rhino.Input\n\nPartial Class Examples\n Public Shared Function TransformBrep(doc As Rhino.RhinoDoc) As Rhino.Commands.Result\n Dim rhobj As Rhino.DocObjects.ObjRef = Nothing\n Dim rc = RhinoGet.GetOneObject(\"Select brep\", True, Rhino.DocObjects.ObjectType.Brep, rhobj)\n If rc <> Rhino.Commands.Result.Success Then\n Return rc\n End If\n\n ' Simple translation transformation\n Dim xform = Rhino.Geometry.Transform.Translation(18, -18, 25)\n doc.Objects.Transform(rhobj, xform, True)\n doc.Views.Redraw()\n Return Rhino.Commands.Result.Success\n End Function\nEnd Class\n",
"members": [
- ["Rhino.Geometry.Transform", "Transform Translation(System.Double dx, System.Double dy, System.Double dz)"]
+ ["Rhino.Geometry.Transform", "Transform Translation(double dx, double dy, double dz)"]
]
},
{
diff --git a/quasar_site/src/api_info.json b/quasar_site/src/api_info.json
index e69a8ed3..e9ecc75b 100644
--- a/quasar_site/src/api_info.json
+++ b/quasar_site/src/api_info.json
@@ -180,7 +180,7 @@
],
"methods": [
{
- "signature": "System.Int32 Start(System.String args)",
+ "signature": "int Start(string args)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false
@@ -738,7 +738,7 @@
],
"methods": [
{
- "signature": "Color DefaultPaintColor(PaintColor whichColor, System.Boolean darkMode)",
+ "signature": "Color DefaultPaintColor(PaintColor whichColor, bool darkMode)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -752,7 +752,7 @@
},
{
"name": "darkMode",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "If True gets the default dark mode color otherwise return the default light mode color"
}
]
@@ -807,7 +807,7 @@
"returns": "An instance of a class that represents all the default settings joined together."
},
{
- "signature": "AppearanceSettingsState GetDefaultState(System.Boolean darkMode)",
+ "signature": "AppearanceSettingsState GetDefaultState(bool darkMode)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -816,7 +816,7 @@
"returns": "An instance of a class that represents all the default settings joined together."
},
{
- "signature": "Color GetPaintColor(PaintColor whichColor, System.Boolean compute)",
+ "signature": "Color GetPaintColor(PaintColor whichColor, bool compute)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -830,7 +830,7 @@
},
{
"name": "compute",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "if true, a color is computed in some cases"
}
]
@@ -868,7 +868,7 @@
"returns": "A .Net library color."
},
{
- "signature": "System.Boolean InitialMainWindowPosition(out Rectangle bounds)",
+ "signature": "bool InitialMainWindowPosition(out Rectangle bounds)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -884,7 +884,7 @@
"returns": "False if the information could not be retrieved."
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -892,7 +892,7 @@
"since": "5.0"
},
{
- "signature": "System.Void SetPaintColor(PaintColor whichColor, Color c, System.Boolean forceUiUpdate)",
+ "signature": "void SetPaintColor(PaintColor whichColor, Color c, bool forceUiUpdate)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -911,13 +911,13 @@
},
{
"name": "forceUiUpdate",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "True if the UI should be forced to update."
}
]
},
{
- "signature": "System.Void SetPaintColor(PaintColor whichColor, Color c)",
+ "signature": "void SetPaintColor(PaintColor whichColor, Color c)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -937,7 +937,7 @@
]
},
{
- "signature": "System.Boolean SetToDarkMode()",
+ "signature": "bool SetToDarkMode()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -946,7 +946,7 @@
"returns": "True on sucess"
},
{
- "signature": "System.Boolean SetToLightMode()",
+ "signature": "bool SetToLightMode()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -955,7 +955,7 @@
"returns": "True on sucess"
},
{
- "signature": "System.Void SetWidgetColor(WidgetColor whichColor, Color c, System.Boolean forceUiUpdate)",
+ "signature": "void SetWidgetColor(WidgetColor whichColor, Color c, bool forceUiUpdate)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -974,13 +974,13 @@
},
{
"name": "forceUiUpdate",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "True if the UI should be forced to update."
}
]
},
{
- "signature": "System.Void SetWidgetColor(WidgetColor whichColor, Color c)",
+ "signature": "void SetWidgetColor(WidgetColor whichColor, Color c)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1000,7 +1000,7 @@
]
},
{
- "signature": "System.Void UpdateFromState(AppearanceSettingsState state)",
+ "signature": "void UpdateFromState(AppearanceSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1015,7 +1015,7 @@
]
},
{
- "signature": "System.Boolean UsingDefaultDarkModeColors()",
+ "signature": "bool UsingDefaultDarkModeColors()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1023,7 +1023,7 @@
"since": "8.2"
},
{
- "signature": "System.Boolean UsingDefaultLightModeColors()",
+ "signature": "bool UsingDefaultLightModeColors()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1591,7 +1591,7 @@
"since": "8.0"
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1599,7 +1599,7 @@
"since": "8.0"
},
{
- "signature": "System.Void UpdateFromState(ChooseOneObjectSettingsState state)",
+ "signature": "void UpdateFromState(ChooseOneObjectSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1820,7 +1820,7 @@
],
"methods": [
{
- "signature": "System.Boolean Add(System.String alias, System.String macro)",
+ "signature": "bool Add(string alias, string macro)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1829,19 +1829,19 @@
"parameters": [
{
"name": "alias",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The name of the command alias."
},
{
"name": "macro",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The command macro to run when the alias is executed."
}
],
"returns": "True if successful."
},
{
- "signature": "System.Void Clear()",
+ "signature": "void Clear()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1849,7 +1849,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean Delete(System.String alias)",
+ "signature": "bool Delete(string alias)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1858,7 +1858,7 @@
"parameters": [
{
"name": "alias",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The name of the command alias."
}
],
@@ -1874,7 +1874,7 @@
"returns": "A new dictionary with the default name/macro combinations."
},
{
- "signature": "System.String GetMacro(System.String alias)",
+ "signature": "string GetMacro(string alias)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1883,13 +1883,13 @@
"parameters": [
{
"name": "alias",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The name of the command alias."
}
]
},
{
- "signature": "System.String[] GetNames()",
+ "signature": "string GetNames()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1898,7 +1898,7 @@
"returns": "An array of strings. This can be empty."
},
{
- "signature": "System.Boolean IsAlias(System.String alias)",
+ "signature": "bool IsAlias(string alias)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1907,14 +1907,14 @@
"parameters": [
{
"name": "alias",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The name of the command alias."
}
],
"returns": "True if the alias exists."
},
{
- "signature": "System.Boolean IsDefault()",
+ "signature": "bool IsDefault()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1923,7 +1923,7 @@
"returns": "True if the current alias list is exactly equal to the default alias list; False otherwise."
},
{
- "signature": "System.Boolean SetMacro(System.String alias, System.String macro)",
+ "signature": "bool SetMacro(string alias, string macro)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -1932,12 +1932,12 @@
"parameters": [
{
"name": "alias",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The name of the command alias."
},
{
"name": "macro",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The new command macro to run when the alias is executed."
}
],
@@ -2329,7 +2329,7 @@
],
"methods": [
{
- "signature": "System.Boolean CalculateCurvatureAutoRange(IEnumerable meshes, ref CurvatureAnalysisSettingsState settings)",
+ "signature": "bool CalculateCurvatureAutoRange(IEnumerable meshes, ref CurvatureAnalysisSettingsState settings)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2352,7 +2352,7 @@
"since": "6.0"
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2360,7 +2360,7 @@
"since": "6.0"
},
{
- "signature": "System.Void UpdateFromState(CurvatureAnalysisSettingsState state)",
+ "signature": "void UpdateFromState(CurvatureAnalysisSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2576,7 +2576,7 @@
"since": "8.0"
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2584,7 +2584,7 @@
"since": "8.0"
},
{
- "signature": "System.Void UpdateFromState(CurvatureGraphSettingsState state)",
+ "signature": "void UpdateFromState(CurvatureGraphSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2743,7 +2743,7 @@
"since": "7.0"
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2751,7 +2751,7 @@
"since": "7.0"
},
{
- "signature": "System.Void UpdateFromState(DraftAngleAnalysisSettingsState state)",
+ "signature": "void UpdateFromState(DraftAngleAnalysisSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2857,7 +2857,7 @@
"since": "5.0"
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -2865,7 +2865,7 @@
"since": "5.0"
},
{
- "signature": "System.Void UpdateFromState(EdgeAnalysisSettingsState state)",
+ "signature": "void UpdateFromState(EdgeAnalysisSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3099,7 +3099,7 @@
],
"methods": [
{
- "signature": "System.Int32 AddSearchPath(System.String folder, System.Int32 index)",
+ "signature": "int AddSearchPath(string folder, int index)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3108,19 +3108,19 @@
"parameters": [
{
"name": "folder",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The valid folder, or imagePath, to add."
},
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "[in] A zero-based position index in the search imagePath list to insert the string. If -1, the imagePath will be appended to the end of the list."
}
],
"returns": "The index where the item was inserted if success. \n-1 on failure."
},
{
- "signature": "System.String[] AutoSaveBeforeCommands()",
+ "signature": "string AutoSaveBeforeCommands()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3128,7 +3128,7 @@
"since": "5.0"
},
{
- "signature": "System.String DefaultTemplateFolderForLanguageID(System.Int32 languageID)",
+ "signature": "string DefaultTemplateFolderForLanguageID(int languageID)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3137,7 +3137,7 @@
"returns": "The default template folder as string."
},
{
- "signature": "System.Boolean DeleteSearchPath(System.String folder)",
+ "signature": "bool DeleteSearchPath(string folder)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3146,14 +3146,14 @@
"parameters": [
{
"name": "folder",
- "type": "System.String",
+ "type": "string",
"summary": "[in] The valid folder, or imagePath, to remove."
}
],
"returns": "True or False indicating success or failure."
},
{
- "signature": "System.String FindFile(System.String fileName)",
+ "signature": "string FindFile(string fileName)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3162,7 +3162,7 @@
"parameters": [
{
"name": "fileName",
- "type": "System.String",
+ "type": "string",
"summary": "short file name to search for."
}
],
@@ -3178,7 +3178,7 @@
"returns": "A new instance containing the current state."
},
{
- "signature": "System.String GetDataFolder(System.Boolean currentUser)",
+ "signature": "string GetDataFolder(bool currentUser)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3187,7 +3187,7 @@
"parameters": [
{
"name": "currentUser",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "True if the query relates to the current user."
}
],
@@ -3203,7 +3203,7 @@
"returns": "A new instance containing the default state."
},
{
- "signature": "System.String[] GetSearchPaths()",
+ "signature": "string GetSearchPaths()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3211,7 +3211,7 @@
"since": "5.0"
},
{
- "signature": "System.String[] RecentlyOpenedFiles()",
+ "signature": "string RecentlyOpenedFiles()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3220,7 +3220,7 @@
"returns": "An array of strings with the paths to the recently opened files."
},
{
- "signature": "System.Void SetAutoSaveBeforeCommands(System.String[] commands)",
+ "signature": "void SetAutoSaveBeforeCommands(string commands)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -3228,7 +3228,7 @@
"since": "5.0"
},
{
- "signature": "System.Void UpdateFromState(FileSettingsState state)",
+ "signature": "void UpdateFromState(FileSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -4195,7 +4195,7 @@
"returns": "A new model aid state with factory settings."
},
{
- "signature": "System.Void UpdateFromState(ModelAidSettingsState state)",
+ "signature": "void UpdateFromState(ModelAidSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -4540,7 +4540,7 @@
],
"methods": [
{
- "signature": "System.String[] CommandNames()",
+ "signature": "string CommandNames()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -4548,7 +4548,7 @@
"since": "5.0"
},
{
- "signature": "System.Int32 SetList(System.String[] commandNames)",
+ "signature": "int SetList(string commandNames)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -4600,7 +4600,7 @@
"returns": "A new OpenGL state with factory settings."
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -4608,7 +4608,7 @@
"since": "6.1"
},
{
- "signature": "System.Void UpdateFromState(OpenGLSettingsState state)",
+ "signature": "void UpdateFromState(OpenGLSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -5039,7 +5039,7 @@
"since": "7.0"
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -5047,7 +5047,7 @@
"since": "7.0"
},
{
- "signature": "System.Void UpdateFromState(SelectionFilterSettingsState state)",
+ "signature": "void UpdateFromState(SelectionFilterSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -8482,7 +8482,7 @@
],
"methods": [
{
- "signature": "System.String GetLabel(ShortcutKey key)",
+ "signature": "string GetLabel(ShortcutKey key)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -8490,7 +8490,7 @@
"since": "8.0"
},
{
- "signature": "System.String GetMacro(ShortcutKey key)",
+ "signature": "string GetMacro(ShortcutKey key)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -8505,21 +8505,21 @@
"summary": "Get all shortcuts registered with Rhino"
},
{
- "signature": "System.Boolean IsAcceptableKeyCombo(Rhino.UI.KeyboardKey key, Rhino.UI.ModifierKey modifier)",
+ "signature": "bool IsAcceptableKeyCombo(Rhino.UI.KeyboardKey key, Rhino.UI.ModifierKey modifier)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
"summary": "Is a key plus modifier combination one that can be used with Rhino"
},
{
- "signature": "System.Void SetMacro(Rhino.UI.KeyboardKey key, Rhino.UI.ModifierKey modifier, System.String macro)",
+ "signature": "void SetMacro(Rhino.UI.KeyboardKey key, Rhino.UI.ModifierKey modifier, string macro)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
"summary": "Set a macro for a given key and modifier combination"
},
{
- "signature": "System.Void SetMacro(ShortcutKey key, System.String macro)",
+ "signature": "void SetMacro(ShortcutKey key, string macro)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -8527,7 +8527,7 @@
"since": "5.0"
},
{
- "signature": "System.Void Update(IEnumerable shortcuts, System.Boolean replaceAll)",
+ "signature": "void Update(IEnumerable shortcuts, bool replaceAll)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -8658,7 +8658,7 @@
"returns": "A new Smart Track state with factory settings."
},
{
- "signature": "System.Void UpdateFromState(SmartTrackSettingsState state)",
+ "signature": "void UpdateFromState(SmartTrackSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -8937,7 +8937,7 @@
"returns": "A new view state with factory settings."
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -8945,7 +8945,7 @@
"since": "5.0"
},
{
- "signature": "System.Void UpdateFromState(ViewSettingsState state)",
+ "signature": "void UpdateFromState(ViewSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -9238,7 +9238,7 @@
"since": "7.8"
},
{
- "signature": "System.Void RestoreDefaults()",
+ "signature": "void RestoreDefaults()",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -9246,7 +9246,7 @@
"since": "7.8"
},
{
- "signature": "System.Void UpdateFromState(ZebraAnalysisSettingsState state)",
+ "signature": "void UpdateFromState(ZebraAnalysisSettingsState state)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -9326,7 +9326,7 @@
],
"methods": [
{
- "signature": "FileReference BitmapAsTextureFileReference(this System.Drawing.Bitmap bitmap, System.UInt32 crc)",
+ "signature": "FileReference BitmapAsTextureFileReference(this System.Drawing.Bitmap bitmap, uint crc)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -9340,13 +9340,13 @@
},
{
"name": "crc",
- "type": "System.UInt32",
+ "type": "uint",
"summary": "The crc of the bitmap. This should be a unique number which changes if the contents of the bitmap changes. NOTE: if a different bitmap is provided using the same crc as a previous bitmap, then the previous bitmap will be overwritten in the texture manager and both previously returned FileReferences will reference the newly provided bitmap."
}
]
},
{
- "signature": "System.Drawing.Bitmap ConvertToNormalMap(this System.Drawing.Bitmap bitmap, System.Boolean bLossyCompressionSource, out System.Boolean bPositiveZComponent)",
+ "signature": "System.Drawing.Bitmap ConvertToNormalMap(this System.Drawing.Bitmap bitmap, bool bLossyCompressionSource, out bool bPositiveZComponent)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -9360,18 +9360,18 @@
},
{
"name": "bLossyCompressionSource",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "True if the source of the bitmap is an image with lossy compression (e.g. jpg). False otherwise. The check will be less strict if the image can contain errors due to lossy compression."
},
{
"name": "bPositiveZComponent",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "True if the image is a normal map with the z-component mapped to the range 0 .. +1. False if the image is a normal map with the z-component mapped to the range -1 .. +1."
}
]
},
{
- "signature": "System.Boolean IsNormalMap(this System.Drawing.Bitmap bitmap, System.Boolean bLossyCompressionSource, out System.Boolean bPositiveZComponent)",
+ "signature": "bool IsNormalMap(this System.Drawing.Bitmap bitmap, bool bLossyCompressionSource, out bool bPositiveZComponent)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -9385,12 +9385,12 @@
},
{
"name": "bLossyCompressionSource",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "True if the source of the bitmap is an image with lossy compression (e.g. jpg). False otherwise. The check will be less strict if the image can contain errors due to lossy compression."
},
{
"name": "bPositiveZComponent",
- "type": "System.Boolean",
+ "type": "bool",
"summary": "True if the image is a normal map with the z-component mapped to the range 0 .. +1. False if the image is a normal map with the z-component mapped to the range -1 .. +1."
}
],
@@ -9424,12 +9424,12 @@
"parameters": [
{
"name": "version",
- "type": "System.Int32",
+ "type": "int",
"summary": "custom version used to help the plug-in developer determine which version of a dictionary is being written. One good way to write version information is to use a date style integer (YYYYMMDD)"
},
{
"name": "name",
- "type": "System.String",
+ "type": "string",
"summary": "Optional name to associate with this dictionary. NOTE: if this dictionary is set as a sub-dictionary, the name will be changed to the sub-dictionary key entry"
}
]
@@ -9444,7 +9444,7 @@
"parameters": [
{
"name": "version",
- "type": "System.Int32",
+ "type": "int",
"summary": "Custom version used to help the plug-in developer determine which version of a dictionary is being written. One good way to write version information is to use a date style integer (YYYYMMDD)"
}
]
@@ -9558,7 +9558,7 @@
],
"methods": [
{
- "signature": "System.Boolean AddContentsFrom(ArchivableDictionary source)",
+ "signature": "bool AddContentsFrom(ArchivableDictionary source)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9566,7 +9566,7 @@
"since": "5.4"
},
{
- "signature": "System.Void Clear()",
+ "signature": "void Clear()",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9583,7 +9583,7 @@
"returns": "The copy of this object."
},
{
- "signature": "System.Boolean ContainsKey(System.String key)",
+ "signature": "bool ContainsKey(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9592,14 +9592,14 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key to locate."
}
],
"returns": "True if the dictionary contains an element with the specified key; otherwise, false."
},
{
- "signature": "System.Boolean GetBool(System.String key, System.Boolean defaultValue)",
+ "signature": "bool GetBool(string key, bool defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9607,7 +9607,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean GetBool(System.String key)",
+ "signature": "bool GetBool(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9615,7 +9615,7 @@
"since": "5.0"
},
{
- "signature": "System.Byte[] GetBytes(System.String key, System.Byte[] defaultValue)",
+ "signature": "byte GetBytes(string key, byte defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9623,7 +9623,7 @@
"since": "5.9"
},
{
- "signature": "System.Byte[] GetBytes(System.String key)",
+ "signature": "byte GetBytes(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9631,7 +9631,7 @@
"since": "5.9"
},
{
- "signature": "ArchivableDictionary GetDictionary(System.String key, ArchivableDictionary defaultValue)",
+ "signature": "ArchivableDictionary GetDictionary(string key, ArchivableDictionary defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9639,7 +9639,7 @@
"since": "5.9"
},
{
- "signature": "ArchivableDictionary GetDictionary(System.String key)",
+ "signature": "ArchivableDictionary GetDictionary(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9647,7 +9647,7 @@
"since": "5.9"
},
{
- "signature": "System.Double GetDouble(System.String key, System.Double defaultValue)",
+ "signature": "double GetDouble(string key, double defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9655,7 +9655,7 @@
"since": "5.10"
},
{
- "signature": "System.Double GetDouble(System.String key)",
+ "signature": "double GetDouble(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9680,7 +9680,7 @@
"since": "5.4"
},
{
- "signature": "T GetEnumValue(System.String key)",
+ "signature": "T GetEnumValue(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9688,7 +9688,7 @@
"since": "5.4"
},
{
- "signature": "System.Single GetFloat(System.String key, System.Single defaultValue)",
+ "signature": "float GetFloat(string key, float defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9696,7 +9696,7 @@
"since": "5.0"
},
{
- "signature": "System.Single GetFloat(System.String key)",
+ "signature": "float GetFloat(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9704,7 +9704,7 @@
"since": "5.0"
},
{
- "signature": "System.Guid GetGuid(System.String key, System.Guid defaultValue)",
+ "signature": "System.Guid GetGuid(string key, System.Guid defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9712,7 +9712,7 @@
"since": "5.0"
},
{
- "signature": "System.Guid GetGuid(System.String key)",
+ "signature": "System.Guid GetGuid(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9720,7 +9720,7 @@
"since": "5.0"
},
{
- "signature": "System.Int32 Getint(System.String key, System.Int32 defaultValue)",
+ "signature": "int Getint(string key, int defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9728,7 +9728,7 @@
"since": "5.0"
},
{
- "signature": "System.Int32 GetInteger(System.String key, System.Int32 defaultValue)",
+ "signature": "int GetInteger(string key, int defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9736,7 +9736,7 @@
"since": "5.0"
},
{
- "signature": "System.Int32 GetInteger(System.String key)",
+ "signature": "int GetInteger(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9744,7 +9744,7 @@
"since": "5.0"
},
{
- "signature": "System.Void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)",
+ "signature": "void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)",
"modifiers": ["public", "virtual"],
"protected": false,
"virtual": true,
@@ -9764,7 +9764,7 @@
]
},
{
- "signature": "Geometry.Plane GetPlane(System.String key, Geometry.Plane defaultValue)",
+ "signature": "Geometry.Plane GetPlane(string key, Geometry.Plane defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9773,7 +9773,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key."
},
{
@@ -9785,7 +9785,7 @@
"returns": "The value as Plane."
},
{
- "signature": "Geometry.Plane GetPlane(System.String key)",
+ "signature": "Geometry.Plane GetPlane(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9794,14 +9794,14 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key."
}
],
"returns": "The value as Plane."
},
{
- "signature": "Geometry.Point3d GetPoint3d(System.String key, Geometry.Point3d defaultValue)",
+ "signature": "Geometry.Point3d GetPoint3d(string key, Geometry.Point3d defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9809,7 +9809,7 @@
"since": "5.0"
},
{
- "signature": "Geometry.Point3d GetPoint3d(System.String key)",
+ "signature": "Geometry.Point3d GetPoint3d(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9817,7 +9817,7 @@
"since": "5.0"
},
{
- "signature": "Geometry.Point3f GetPoint3f(System.String key, Geometry.Point3f defaultValue)",
+ "signature": "Geometry.Point3f GetPoint3f(string key, Geometry.Point3f defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9825,7 +9825,7 @@
"since": "5.0"
},
{
- "signature": "Geometry.Point3f GetPoint3f(System.String key)",
+ "signature": "Geometry.Point3f GetPoint3f(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9833,7 +9833,7 @@
"since": "5.0"
},
{
- "signature": "System.String GetString(System.String key, System.String defaultValue)",
+ "signature": "string GetString(string key, string defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9842,18 +9842,18 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key which points to the string"
},
{
"name": "defaultValue",
- "type": "System.String",
+ "type": "string",
"summary": "The string"
}
]
},
{
- "signature": "System.String GetString(System.String key)",
+ "signature": "string GetString(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9862,14 +9862,14 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key which points to the string"
}
],
"returns": "The string"
},
{
- "signature": "Geometry.Vector3d GetVector3d(System.String key, Geometry.Vector3d defaultValue)",
+ "signature": "Geometry.Vector3d GetVector3d(string key, Geometry.Vector3d defaultValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9877,7 +9877,7 @@
"since": "5.0"
},
{
- "signature": "Geometry.Vector3d GetVector3d(System.String key)",
+ "signature": "Geometry.Vector3d GetVector3d(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9885,7 +9885,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean Remove(System.String key)",
+ "signature": "bool Remove(string key)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9894,14 +9894,14 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key of the element to remove."
}
],
"returns": "True if the element is successfully found and removed; otherwise, false. This method returns False if key is not found."
},
{
- "signature": "System.Boolean RemoveEnumValue()",
+ "signature": "bool RemoveEnumValue()",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9909,7 +9909,7 @@
"since": "5.4"
},
{
- "signature": "System.Boolean ReplaceContentsWith(ArchivableDictionary source)",
+ "signature": "bool ReplaceContentsWith(ArchivableDictionary source)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9917,7 +9917,7 @@
"since": "5.4"
},
{
- "signature": "System.Boolean Set(System.String key, ArchivableDictionary val)",
+ "signature": "bool Set(string key, ArchivableDictionary val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9926,7 +9926,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -9937,7 +9937,49 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, DocObjects.ObjRef val)",
+ "signature": "bool Set(string key, bool val)",
+ "modifiers": ["public"],
+ "protected": false,
+ "virtual": false,
+ "summary": "Sets a bool .",
+ "since": "5.0",
+ "parameters": [
+ {
+ "name": "key",
+ "type": "string",
+ "summary": "The text key."
+ },
+ {
+ "name": "val",
+ "type": "bool",
+ "summary": "A bool value. \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
+ }
+ ],
+ "returns": "True if set operation succeeded, otherwise false."
+ },
+ {
+ "signature": "bool Set(string key, byte val)",
+ "modifiers": ["public"],
+ "protected": false,
+ "virtual": false,
+ "summary": "Sets a byte .",
+ "since": "5.0",
+ "parameters": [
+ {
+ "name": "key",
+ "type": "string",
+ "summary": "The text key."
+ },
+ {
+ "name": "val",
+ "type": "byte",
+ "summary": "A byte . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
+ }
+ ],
+ "returns": "True if set operation succeeded, otherwise false."
+ },
+ {
+ "signature": "bool Set(string key, DocObjects.ObjRef val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9946,7 +9988,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key"
},
{
@@ -9957,7 +9999,49 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.BoundingBox val)",
+ "signature": "bool Set(string key, double val)",
+ "modifiers": ["public"],
+ "protected": false,
+ "virtual": false,
+ "summary": "Sets a double .",
+ "since": "5.0",
+ "parameters": [
+ {
+ "name": "key",
+ "type": "string",
+ "summary": "The text key."
+ },
+ {
+ "name": "val",
+ "type": "double",
+ "summary": "A double . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
+ }
+ ],
+ "returns": "True if set operation succeeded, otherwise false."
+ },
+ {
+ "signature": "bool Set(string key, float val)",
+ "modifiers": ["public"],
+ "protected": false,
+ "virtual": false,
+ "summary": "Sets a float .",
+ "since": "5.0",
+ "parameters": [
+ {
+ "name": "key",
+ "type": "string",
+ "summary": "The text key."
+ },
+ {
+ "name": "val",
+ "type": "float",
+ "summary": "A float . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
+ }
+ ],
+ "returns": "True if set operation succeeded, otherwise false."
+ },
+ {
+ "signature": "bool Set(string key, Geometry.BoundingBox val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9966,7 +10050,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -9977,7 +10061,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.GeometryBase val)",
+ "signature": "bool Set(string key, Geometry.GeometryBase val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -9986,7 +10070,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -9997,7 +10081,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Interval val)",
+ "signature": "bool Set(string key, Geometry.Interval val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10006,7 +10090,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10017,7 +10101,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Line val)",
+ "signature": "bool Set(string key, Geometry.Line val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10026,7 +10110,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10037,7 +10121,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.MeshingParameters val)",
+ "signature": "bool Set(string key, Geometry.MeshingParameters val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10046,7 +10130,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10057,7 +10141,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Plane val)",
+ "signature": "bool Set(string key, Geometry.Plane val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10066,7 +10150,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10077,7 +10161,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Point2d val)",
+ "signature": "bool Set(string key, Geometry.Point2d val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10086,7 +10170,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10097,7 +10181,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Point3d val)",
+ "signature": "bool Set(string key, Geometry.Point3d val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10106,7 +10190,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10117,7 +10201,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Point3f val)",
+ "signature": "bool Set(string key, Geometry.Point3f val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10126,7 +10210,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10137,7 +10221,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Point4d val)",
+ "signature": "bool Set(string key, Geometry.Point4d val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10146,7 +10230,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10157,7 +10241,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Ray3d val)",
+ "signature": "bool Set(string key, Geometry.Ray3d val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10166,7 +10250,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10177,7 +10261,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Transform val)",
+ "signature": "bool Set(string key, Geometry.Transform val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10186,7 +10270,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10197,7 +10281,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Vector2d val)",
+ "signature": "bool Set(string key, Geometry.Vector2d val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10206,7 +10290,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10217,7 +10301,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Vector3d val)",
+ "signature": "bool Set(string key, Geometry.Vector3d val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10226,7 +10310,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10237,7 +10321,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, Geometry.Vector3f val)",
+ "signature": "bool Set(string key, Geometry.Vector3f val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10246,7 +10330,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10257,7 +10341,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10266,7 +10350,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10278,7 +10362,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10287,7 +10371,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10299,7 +10383,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10308,7 +10392,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10320,7 +10404,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10329,7 +10413,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10341,7 +10425,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10350,7 +10434,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key"
},
{
@@ -10362,7 +10446,7 @@
"returns": "True if successful, False otherwise."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10371,7 +10455,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10383,7 +10467,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10392,7 +10476,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10404,7 +10488,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10413,7 +10497,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key"
},
{
@@ -10424,7 +10508,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10433,7 +10517,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10445,7 +10529,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10454,7 +10538,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10466,7 +10550,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, IEnumerable val)",
+ "signature": "bool Set(string key, IEnumerable val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10475,7 +10559,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10487,70 +10571,91 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.Boolean val)",
+ "signature": "bool Set(string key, int val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Sets a bool .",
+ "summary": "Sets a int .",
"since": "5.0",
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The text key."
},
{
"name": "val",
- "type": "System.Boolean",
- "summary": "A bool value. \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
+ "type": "int",
+ "summary": "A int . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
}
],
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.Byte val)",
+ "signature": "bool Set(string key, sbyte val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Sets a byte .",
+ "summary": "Sets a sbyte .",
"since": "5.0",
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The text key."
},
{
"name": "val",
- "type": "System.Byte",
- "summary": "A byte . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
+ "type": "sbyte",
+ "summary": "A sbyte . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
}
],
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.Double val)",
+ "signature": "bool Set(string key, short val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Sets a double .",
+ "summary": "Sets a short .",
"since": "5.0",
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The text key."
},
{
"name": "val",
- "type": "System.Double",
- "summary": "A double . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
+ "type": "short",
+ "summary": "A short . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
}
],
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.Color val)",
+ "signature": "bool Set(string key, string val)",
+ "modifiers": ["public"],
+ "protected": false,
+ "virtual": false,
+ "summary": "Sets a string .",
+ "since": "5.0",
+ "parameters": [
+ {
+ "name": "key",
+ "type": "string",
+ "summary": "The text key."
+ },
+ {
+ "name": "val",
+ "type": "string",
+ "summary": "A string . \nBecause is immutable, it is not possible to modify the object while it is in this dictionary."
+ }
+ ],
+ "returns": "True if set operation succeeded, otherwise false."
+ },
+ {
+ "signature": "bool Set(string key, System.Drawing.Color val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10559,7 +10664,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10571,7 +10676,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.Font val)",
+ "signature": "bool Set(string key, System.Drawing.Font val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10580,7 +10685,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10591,7 +10696,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.Point val)",
+ "signature": "bool Set(string key, System.Drawing.Point val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10600,7 +10705,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10611,7 +10716,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.PointF val)",
+ "signature": "bool Set(string key, System.Drawing.PointF val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10620,7 +10725,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10631,7 +10736,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.Rectangle val)",
+ "signature": "bool Set(string key, System.Drawing.Rectangle val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10640,7 +10745,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10651,7 +10756,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.RectangleF val)",
+ "signature": "bool Set(string key, System.Drawing.RectangleF val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10660,7 +10765,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10671,7 +10776,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.Size val)",
+ "signature": "bool Set(string key, System.Drawing.Size val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10680,7 +10785,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10691,7 +10796,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, System.Drawing.SizeF val)",
+ "signature": "bool Set(string key, System.Drawing.SizeF val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10700,7 +10805,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "A text key."
},
{
@@ -10711,7 +10816,7 @@
]
},
{
- "signature": "System.Boolean Set(System.String key, System.Guid val)",
+ "signature": "bool Set(string key, System.Guid val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10720,7 +10825,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The text key."
},
{
@@ -10732,49 +10837,7 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.Int16 val)",
- "modifiers": ["public"],
- "protected": false,
- "virtual": false,
- "summary": "Sets a short .",
- "since": "5.0",
- "parameters": [
- {
- "name": "key",
- "type": "System.String",
- "summary": "The text key."
- },
- {
- "name": "val",
- "type": "System.Int16",
- "summary": "A short . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
- }
- ],
- "returns": "True if set operation succeeded, otherwise false."
- },
- {
- "signature": "System.Boolean Set(System.String key, System.Int32 val)",
- "modifiers": ["public"],
- "protected": false,
- "virtual": false,
- "summary": "Sets a int .",
- "since": "5.0",
- "parameters": [
- {
- "name": "key",
- "type": "System.String",
- "summary": "The text key."
- },
- {
- "name": "val",
- "type": "System.Int32",
- "summary": "A int . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
- }
- ],
- "returns": "True if set operation succeeded, otherwise false."
- },
- {
- "signature": "System.Boolean Set(System.String key, System.Int64 val)",
+ "signature": "bool Set(string key, System.Int64 val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10783,7 +10846,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The text key."
},
{
@@ -10795,70 +10858,28 @@
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.SByte val)",
- "modifiers": ["public"],
- "protected": false,
- "virtual": false,
- "summary": "Sets a sbyte .",
- "since": "5.0",
- "parameters": [
- {
- "name": "key",
- "type": "System.String",
- "summary": "The text key."
- },
- {
- "name": "val",
- "type": "System.SByte",
- "summary": "A sbyte . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
- }
- ],
- "returns": "True if set operation succeeded, otherwise false."
- },
- {
- "signature": "System.Boolean Set(System.String key, System.Single val)",
- "modifiers": ["public"],
- "protected": false,
- "virtual": false,
- "summary": "Sets a float .",
- "since": "5.0",
- "parameters": [
- {
- "name": "key",
- "type": "System.String",
- "summary": "The text key."
- },
- {
- "name": "val",
- "type": "System.Single",
- "summary": "A float . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
- }
- ],
- "returns": "True if set operation succeeded, otherwise false."
- },
- {
- "signature": "System.Boolean Set(System.String key, System.String val)",
+ "signature": "bool Set(string key, uint val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Sets a string .",
+ "summary": "Sets a uint .",
"since": "5.0",
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The text key."
},
{
"name": "val",
- "type": "System.String",
- "summary": "A string . \nBecause is immutable, it is not possible to modify the object while it is in this dictionary."
+ "type": "uint",
+ "summary": "A uint . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
}
],
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.UInt16 val)",
+ "signature": "bool Set(string key, ushort val)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10867,40 +10888,19 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The text key."
},
{
"name": "val",
- "type": "System.UInt16",
+ "type": "ushort",
"summary": "A ushort . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
}
],
"returns": "True if set operation succeeded, otherwise false."
},
{
- "signature": "System.Boolean Set(System.String key, System.UInt32 val)",
- "modifiers": ["public"],
- "protected": false,
- "virtual": false,
- "summary": "Sets a uint .",
- "since": "5.0",
- "parameters": [
- {
- "name": "key",
- "type": "System.String",
- "summary": "The text key."
- },
- {
- "name": "val",
- "type": "System.UInt32",
- "summary": "A uint . \nBecause has value semantics, changes to the assigning value will leave this entry unchanged."
- }
- ],
- "returns": "True if set operation succeeded, otherwise false."
- },
- {
- "signature": "System.Boolean SetEnumValue(System.String key, T enumValue)",
+ "signature": "bool SetEnumValue(string key, T enumValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10908,7 +10908,7 @@
"since": "5.4"
},
{
- "signature": "System.Boolean SetEnumValue(T enumValue)",
+ "signature": "bool SetEnumValue(T enumValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10916,7 +10916,7 @@
"since": "5.4"
},
{
- "signature": "System.Boolean TryGetBool(System.String key, out System.Boolean value)",
+ "signature": "bool TryGetBool(string key, out bool value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10924,7 +10924,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetBytes(System.String key, out System.Byte[] value)",
+ "signature": "bool TryGetBytes(string key, out byte value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10932,7 +10932,7 @@
"since": "5.9"
},
{
- "signature": "System.Boolean TryGetDictionary(System.String key, out ArchivableDictionary value)",
+ "signature": "bool TryGetDictionary(string key, out ArchivableDictionary value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10940,7 +10940,7 @@
"since": "5.9"
},
{
- "signature": "System.Boolean TryGetDouble(System.String key, out System.Double value)",
+ "signature": "bool TryGetDouble(string key, out double value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10948,7 +10948,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetEnumValue(System.String key, out T enumValue)",
+ "signature": "bool TryGetEnumValue(string key, out T enumValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10956,7 +10956,7 @@
"since": "5.4"
},
{
- "signature": "System.Boolean TryGetFloat(System.String key, out System.Single value)",
+ "signature": "bool TryGetFloat(string key, out float value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10964,7 +10964,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetGuid(System.String key, out System.Guid value)",
+ "signature": "bool TryGetGuid(string key, out System.Guid value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10972,7 +10972,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetInteger(System.String key, out System.Int32 value)",
+ "signature": "bool TryGetInteger(string key, out int value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10980,7 +10980,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetPlane(System.String key, out Geometry.Plane value)",
+ "signature": "bool TryGetPlane(string key, out Geometry.Plane value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -10989,7 +10989,7 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key."
},
{
@@ -11001,7 +11001,7 @@
"returns": "The value as Plane."
},
{
- "signature": "System.Boolean TryGetPoint3d(System.String key, out Geometry.Point3d value)",
+ "signature": "bool TryGetPoint3d(string key, out Geometry.Point3d value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11009,7 +11009,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetPoint3f(System.String key, out Geometry.Point3f value)",
+ "signature": "bool TryGetPoint3f(string key, out Geometry.Point3f value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11017,7 +11017,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetString(System.String key, out System.String value)",
+ "signature": "bool TryGetString(string key, out string value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11025,7 +11025,7 @@
"since": "5.0"
},
{
- "signature": "System.Boolean TryGetValue(System.String key, out System.Object value)",
+ "signature": "bool TryGetValue(string key, out object value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11034,19 +11034,19 @@
"parameters": [
{
"name": "key",
- "type": "System.String",
+ "type": "string",
"summary": "The key of the value to get."
},
{
"name": "value",
- "type": "System.Object",
+ "type": "object",
"summary": "When this method returns and if the key is found, contains the value associated with the specified key; otherwise, null. This parameter is passed uninitialized."
}
],
"returns": "True if the dictionary contains an element with the specified key; otherwise, false."
},
{
- "signature": "System.Boolean TryGetVector3d(System.String key, out Geometry.Vector3d value)",
+ "signature": "bool TryGetVector3d(string key, out Geometry.Vector3d value)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11096,7 +11096,7 @@
],
"methods": [
{
- "signature": "System.Void Add(Arc arc)",
+ "signature": "void Add(Arc arc)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11111,7 +11111,7 @@
]
},
{
- "signature": "System.Void Add(Circle circle)",
+ "signature": "void Add(Circle circle)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11126,7 +11126,7 @@
]
},
{
- "signature": "System.Void Add(Ellipse ellipse)",
+ "signature": "void Add(Ellipse ellipse)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11141,7 +11141,7 @@
]
},
{
- "signature": "System.Void Add(IEnumerable polyline)",
+ "signature": "void Add(IEnumerable polyline)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11156,7 +11156,7 @@
]
},
{
- "signature": "System.Void Add(Line line)",
+ "signature": "void Add(Line line)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11171,7 +11171,7 @@
]
},
{
- "signature": "System.Void Insert(System.Int32 index, Arc arc)",
+ "signature": "void Insert(int index, Arc arc)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11180,7 +11180,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "A 0-based position in the list."
},
{
@@ -11191,7 +11191,7 @@
]
},
{
- "signature": "System.Void Insert(System.Int32 index, Circle circle)",
+ "signature": "void Insert(int index, Circle circle)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11200,7 +11200,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "A 0-based position in the list."
},
{
@@ -11211,7 +11211,7 @@
]
},
{
- "signature": "System.Void Insert(System.Int32 index, Ellipse ellipse)",
+ "signature": "void Insert(int index, Ellipse ellipse)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11220,7 +11220,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "A 0-based position in the list."
},
{
@@ -11231,7 +11231,7 @@
]
},
{
- "signature": "System.Void Insert(System.Int32 index, IEnumerable polyline)",
+ "signature": "void Insert(int index, IEnumerable polyline)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11240,7 +11240,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "A 0-based position in the list."
},
{
@@ -11251,7 +11251,7 @@
]
},
{
- "signature": "System.Void Insert(System.Int32 index, Line line)",
+ "signature": "void Insert(int index, Line line)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11260,7 +11260,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "A 0-based position in the list."
},
{
@@ -11271,7 +11271,7 @@
]
},
{
- "signature": "System.Boolean Transform(Transform xform)",
+ "signature": "bool Transform(Transform xform)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11344,7 +11344,7 @@
"parameters": [
{
"name": "initialCapacity",
- "type": "System.Int32",
+ "type": "int",
"summary": "The number of added items before which the underlying array will be resized."
}
]
@@ -11405,7 +11405,7 @@
],
"methods": [
{
- "signature": "System.Int32 ClosestIndexInList(IList list, Point3d testPoint)",
+ "signature": "int ClosestIndexInList(IList list, Point3d testPoint)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -11447,7 +11447,7 @@
"returns": "A point."
},
{
- "signature": "System.Void Add(System.Double x, System.Double y, System.Double z)",
+ "signature": "void Add(double x, double y, double z)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11456,23 +11456,23 @@
"parameters": [
{
"name": "x",
- "type": "System.Double",
+ "type": "double",
"summary": "The X coordinate."
},
{
"name": "y",
- "type": "System.Double",
+ "type": "double",
"summary": "The Y coordinate."
},
{
"name": "z",
- "type": "System.Double",
+ "type": "double",
"summary": "The Z coordinate."
}
]
},
{
- "signature": "System.Int32 ClosestIndex(Point3d testPoint)",
+ "signature": "int ClosestIndex(Point3d testPoint)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11497,24 +11497,24 @@
"returns": "The duplicated list."
},
{
- "signature": "System.Boolean Equals(Point3dList other)",
- "modifiers": ["public"],
+ "signature": "bool Equals(object obj)",
+ "modifiers": ["public", "override"],
"protected": false,
"virtual": false,
- "summary": "Determines if the point lists are exactly equal.",
- "since": "7.1",
+ "summary": "Overrides the default object equality to compare lists by value.",
"returns": "True is objects are exactly equal in value."
},
{
- "signature": "System.Boolean Equals(System.Object obj)",
- "modifiers": ["public", "override"],
+ "signature": "bool Equals(Point3dList other)",
+ "modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Overrides the default object equality to compare lists by value.",
+ "summary": "Determines if the point lists are exactly equal.",
+ "since": "7.1",
"returns": "True is objects are exactly equal in value."
},
{
- "signature": "System.Int32 GetHashCode()",
+ "signature": "int GetHashCode()",
"modifiers": ["public", "override"],
"protected": false,
"virtual": false,
@@ -11522,7 +11522,7 @@
"returns": "An int that serves as an hash code. This is currently a XOR of all doubles, XORed in line."
},
{
- "signature": "System.Void SetAllX(System.Double xValue)",
+ "signature": "void SetAllX(double xValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11530,7 +11530,7 @@
"since": "5.6"
},
{
- "signature": "System.Void SetAllY(System.Double yValue)",
+ "signature": "void SetAllY(double yValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11538,7 +11538,7 @@
"since": "5.6"
},
{
- "signature": "System.Void SetAllZ(System.Double zValue)",
+ "signature": "void SetAllZ(double zValue)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11546,7 +11546,7 @@
"since": "5.6"
},
{
- "signature": "System.Void Transform(Transform xform)",
+ "signature": "void Transform(Transform xform)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11638,7 +11638,7 @@
],
"methods": [
{
- "signature": "IEnumerable Point2dKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, System.Int32 amount)",
+ "signature": "IEnumerable Point2dKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, int amount)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -11657,14 +11657,14 @@
},
{
"name": "amount",
- "type": "System.Int32",
+ "type": "int",
"summary": "The required amount of closest neighbors to find."
}
],
"returns": "An enumerable of arrays of indices; each array contains the indices for each of the needlePts."
},
{
- "signature": "IEnumerable Point2fKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, System.Int32 amount)",
+ "signature": "IEnumerable Point2fKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, int amount)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -11683,14 +11683,14 @@
},
{
"name": "amount",
- "type": "System.Int32",
+ "type": "int",
"summary": "The required amount of closest neighbors to find."
}
],
"returns": "An enumerable of arrays of indices; each array contains the indices for each of the needlePts."
},
{
- "signature": "IEnumerable Point3dKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, System.Int32 amount)",
+ "signature": "IEnumerable Point3dKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, int amount)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -11709,14 +11709,14 @@
},
{
"name": "amount",
- "type": "System.Int32",
+ "type": "int",
"summary": "The required amount of closest neighbors to find."
}
],
"returns": "An enumerable of arrays of indices; each array contains the indices for each of the needlePts."
},
{
- "signature": "IEnumerable Point3fKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, System.Int32 amount)",
+ "signature": "IEnumerable Point3fKNeighbors(IEnumerable hayPoints, IEnumerable needlePoints, int amount)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -11735,14 +11735,14 @@
},
{
"name": "amount",
- "type": "System.Int32",
+ "type": "int",
"summary": "The required amount of closest neighbors to find."
}
],
"returns": "An enumerable of arrays of indices; each array contains the indices for each of the needlePts."
},
{
- "signature": "IEnumerable PointCloudKNeighbors(PointCloud pointcloud, IEnumerable needlePoints, System.Int32 amount)",
+ "signature": "IEnumerable PointCloudKNeighbors(PointCloud pointcloud, IEnumerable needlePoints, int amount)",
"modifiers": ["public", "static"],
"protected": false,
"virtual": false,
@@ -11761,7 +11761,7 @@
},
{
"name": "amount",
- "type": "System.Int32",
+ "type": "int",
"summary": "The required amount of closest neighbors to find."
}
],
@@ -11806,7 +11806,7 @@
"parameters": [
{
"name": "amount",
- "type": "System.Int32",
+ "type": "int",
"summary": "Number of values to add to this list. Must be equal to or larger than zero."
},
{
@@ -11825,7 +11825,7 @@
"parameters": [
{
"name": "initialCapacity",
- "type": "System.Int32",
+ "type": "int",
"summary": "Number of items this list can store without resizing."
}
]
@@ -11896,7 +11896,7 @@
],
"methods": [
{
- "signature": "System.Void Add(T item)",
+ "signature": "void Add(T item)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11910,7 +11910,7 @@
]
},
{
- "signature": "System.Void AddRange(IEnumerable collection)",
+ "signature": "void AddRange(IEnumerable collection)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11924,7 +11924,7 @@
]
},
{
- "signature": "System.Void AddRange(System.Collections.IEnumerable collection)",
+ "signature": "void AddRange(System.Collections.IEnumerable collection)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11946,7 +11946,7 @@
"returns": "A wrapper."
},
{
- "signature": "System.Int32 BinarySearch(System.Int32 index, System.Int32 count, T item, IComparer comparer)",
+ "signature": "int BinarySearch(int index, int count, T item, IComparer comparer)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11954,12 +11954,12 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the range to search."
},
{
"name": "count",
- "type": "System.Int32",
+ "type": "int",
"summary": "The length of the range to search."
},
{
@@ -11976,7 +11976,7 @@
"returns": "The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of Count."
},
{
- "signature": "System.Int32 BinarySearch(T item, IComparer comparer)",
+ "signature": "int BinarySearch(T item, IComparer comparer)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -11996,7 +11996,7 @@
"returns": "The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of Count."
},
{
- "signature": "System.Int32 BinarySearch(T item)",
+ "signature": "int BinarySearch(T item)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12011,14 +12011,14 @@
"returns": "The zero-based index of item in the sorted List, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of Count."
},
{
- "signature": "System.Void Clear()",
+ "signature": "void Clear()",
"modifiers": ["public"],
"protected": false,
"virtual": false,
"summary": "Removes all elements from the List."
},
{
- "signature": "System.Boolean Contains(T item)",
+ "signature": "bool Contains(T item)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12048,7 +12048,7 @@
"returns": "The new list."
},
{
- "signature": "System.Void CopyTo(System.Int32 index, T[] array, System.Int32 arrayIndex, System.Int32 count)",
+ "signature": "void CopyTo(int index, T[] array, int arrayIndex, int count)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12056,7 +12056,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based index in the source List at which copying begins."
},
{
@@ -12066,18 +12066,18 @@
},
{
"name": "arrayIndex",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based index in array at which copying begins."
},
{
"name": "count",
- "type": "System.Int32",
+ "type": "int",
"summary": "The number of elements to copy."
}
]
},
{
- "signature": "System.Void CopyTo(T[] array, System.Int32 arrayIndex)",
+ "signature": "void CopyTo(T[] array, int arrayIndex)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12090,13 +12090,13 @@
},
{
"name": "arrayIndex",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based index in array at which copying begins."
}
]
},
{
- "signature": "System.Void CopyTo(T[] array)",
+ "signature": "void CopyTo(T[] array)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12118,7 +12118,7 @@
"returns": "The duplicated list."
},
{
- "signature": "System.Boolean Exists(Predicate match)",
+ "signature": "bool Exists(Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12163,12 +12163,22 @@
"returns": "A ON_List(T) containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty ON_List(T)."
},
{
- "signature": "System.Int32 FindIndex(Predicate match)",
+ "signature": "int FindIndex(int startIndex, int count, Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire List.",
+ "summary": "Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List that extends from the specified index to the last element.",
"parameters": [
+ {
+ "name": "startIndex",
+ "type": "int",
+ "summary": "The zero-based starting index of the search."
+ },
+ {
+ "name": "count",
+ "type": "int",
+ "summary": "The number of elements in the section to search."
+ },
{
"name": "match",
"type": "Predicate",
@@ -12178,7 +12188,7 @@
"returns": "The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, -1."
},
{
- "signature": "System.Int32 FindIndex(System.Int32 startIndex, Predicate match)",
+ "signature": "int FindIndex(int startIndex, Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12186,7 +12196,7 @@
"parameters": [
{
"name": "startIndex",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the search."
},
{
@@ -12198,22 +12208,12 @@
"returns": "The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, -1."
},
{
- "signature": "System.Int32 FindIndex(System.Int32 startIndex, System.Int32 count, Predicate match)",
+ "signature": "int FindIndex(Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the List that extends from the specified index to the last element.",
+ "summary": "Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire List.",
"parameters": [
- {
- "name": "startIndex",
- "type": "System.Int32",
- "summary": "The zero-based starting index of the search."
- },
- {
- "name": "count",
- "type": "System.Int32",
- "summary": "The number of elements in the section to search."
- },
{
"name": "match",
"type": "Predicate",
@@ -12238,12 +12238,22 @@
"returns": "The last element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type T."
},
{
- "signature": "System.Int32 FindLastIndex(Predicate match)",
+ "signature": "int FindLastIndex(int startIndex, int count, Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
"summary": "Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire List.",
"parameters": [
+ {
+ "name": "startIndex",
+ "type": "int",
+ "summary": "The zero-based starting index of the backward search."
+ },
+ {
+ "name": "count",
+ "type": "int",
+ "summary": "The number of elements in the section to search."
+ },
{
"name": "match",
"type": "Predicate",
@@ -12253,7 +12263,7 @@
"returns": "The zero-based index of the last occurrence of an element that matches the conditions defined by match, if found; otherwise, -1."
},
{
- "signature": "System.Int32 FindLastIndex(System.Int32 startIndex, Predicate match)",
+ "signature": "int FindLastIndex(int startIndex, Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12261,7 +12271,7 @@
"parameters": [
{
"name": "startIndex",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the backward search."
},
{
@@ -12273,22 +12283,12 @@
"returns": "The zero-based index of the last occurrence of an element that matches the conditions defined by match, if found; otherwise, -1."
},
{
- "signature": "System.Int32 FindLastIndex(System.Int32 startIndex, System.Int32 count, Predicate match)",
+ "signature": "int FindLastIndex(Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
"summary": "Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire List.",
"parameters": [
- {
- "name": "startIndex",
- "type": "System.Int32",
- "summary": "The zero-based starting index of the backward search."
- },
- {
- "name": "count",
- "type": "System.Int32",
- "summary": "The number of elements in the section to search."
- },
{
"name": "match",
"type": "Predicate",
@@ -12298,7 +12298,7 @@
"returns": "The zero-based index of the last occurrence of an element that matches the conditions defined by match, if found; otherwise, -1."
},
{
- "signature": "System.Void ForEach(Action action)",
+ "signature": "void ForEach(Action action)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12320,7 +12320,7 @@
"returns": "The new enumerator."
},
{
- "signature": "RhinoList GetRange(System.Int32 index, System.Int32 count)",
+ "signature": "RhinoList GetRange(int index, int count)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12328,19 +12328,19 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based List index at which the range starts."
},
{
"name": "count",
- "type": "System.Int32",
+ "type": "int",
"summary": "The number of elements in the range."
}
],
"returns": "A shallow copy of a range of elements in the source List."
},
{
- "signature": "System.Int32 IndexOf(T item, System.Int32 index, System.Int32 count)",
+ "signature": "int IndexOf(T item, int index, int count)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12353,19 +12353,19 @@
},
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the search."
},
{
"name": "count",
- "type": "System.Int32",
+ "type": "int",
"summary": "The number of elements in the section to search."
}
],
"returns": "The zero-based index of the first occurrence of item within the entire List, if found; otherwise, -1."
},
{
- "signature": "System.Int32 IndexOf(T item, System.Int32 index)",
+ "signature": "int IndexOf(T item, int index)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12378,14 +12378,14 @@
},
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the search."
}
],
"returns": "The zero-based index of the first occurrence of item within the entire List, if found; otherwise, -1."
},
{
- "signature": "System.Int32 IndexOf(T item)",
+ "signature": "int IndexOf(T item)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12400,7 +12400,7 @@
"returns": "The zero-based index of the first occurrence of item within the entire List, if found; otherwise, -1."
},
{
- "signature": "System.Void Insert(System.Int32 index, T item)",
+ "signature": "void Insert(int index, T item)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12408,7 +12408,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based index at which item should be inserted."
},
{
@@ -12419,7 +12419,7 @@
]
},
{
- "signature": "System.Void InsertRange(System.Int32 index, IEnumerable collection)",
+ "signature": "void InsertRange(int index, IEnumerable collection)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12427,7 +12427,7 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based index at which the new elements should be inserted."
},
{
@@ -12438,7 +12438,7 @@
]
},
{
- "signature": "System.Int32 LastIndexOf(T item, System.Int32 index, System.Int32 count)",
+ "signature": "int LastIndexOf(T item, int index, int count)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12451,19 +12451,19 @@
},
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the backward search."
},
{
"name": "count",
- "type": "System.Int32",
+ "type": "int",
"summary": "The number of elements in the section to search."
}
],
"returns": "The zero-based index of the last occurrence of item within the entire the List, if found; otherwise, -1."
},
{
- "signature": "System.Int32 LastIndexOf(T item, System.Int32 index)",
+ "signature": "int LastIndexOf(T item, int index)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12476,14 +12476,14 @@
},
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the backward search."
}
],
"returns": "The zero-based index of the last occurrence of item within the entire the List, if found; otherwise, -1."
},
{
- "signature": "System.Int32 LastIndexOf(T item)",
+ "signature": "int LastIndexOf(T item)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12498,7 +12498,7 @@
"returns": "The zero-based index of the last occurrence of item within the entire the List, if found; otherwise, -1."
},
{
- "signature": "System.Int32 RemapIndex(System.Int32 index)",
+ "signature": "int RemapIndex(int index)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12506,14 +12506,14 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "Index to remap."
}
],
"returns": "Remapped index."
},
{
- "signature": "System.Boolean Remove(T item)",
+ "signature": "bool Remove(T item)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12528,7 +12528,7 @@
"returns": "True if item is successfully removed; otherwise, false. This method also returns False if item was not found in the List."
},
{
- "signature": "System.Int32 RemoveAll(Predicate match)",
+ "signature": "int RemoveAll(Predicate match)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12543,7 +12543,7 @@
"returns": "The number of elements removed from the List."
},
{
- "signature": "System.Void RemoveAt(System.Int32 index)",
+ "signature": "void RemoveAt(int index)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12551,13 +12551,13 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based index of the element to remove."
}
]
},
{
- "signature": "System.Int32 RemoveNulls()",
+ "signature": "int RemoveNulls()",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12565,7 +12565,7 @@
"returns": "The number of nulls removed from the List."
},
{
- "signature": "System.Void RemoveRange(System.Int32 index, System.Int32 count)",
+ "signature": "void RemoveRange(int index, int count)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12573,25 +12573,25 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the range of elements to remove."
},
{
"name": "count",
- "type": "System.Int32",
+ "type": "int",
"summary": "The number of elements to remove."
}
]
},
{
- "signature": "System.Void Reverse()",
+ "signature": "void Reverse()",
"modifiers": ["public"],
"protected": false,
"virtual": false,
"summary": "Reverses the order of the elements in the entire List."
},
{
- "signature": "System.Void Reverse(System.Int32 index, System.Int32 count)",
+ "signature": "void Reverse(int index, int count)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12599,25 +12599,25 @@
"parameters": [
{
"name": "index",
- "type": "System.Int32",
+ "type": "int",
"summary": "The zero-based starting index of the range to reverse."
},
{
"name": "count",
- "type": "System.Int32",
+ "type": "int",
"summary": "The number of elements in the range to reverse."
}
]
},
{
- "signature": "System.Void Sort()",
+ "signature": "void Sort()",
"modifiers": ["public"],
"protected": false,
"virtual": false,
"summary": "Sorts the elements in the entire List using the default comparer."
},
{
- "signature": "System.Void Sort(Comparison comparison)",
+ "signature": "void Sort(Comparison comparison)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
@@ -12631,36 +12631,36 @@
]
},
{
- "signature": "System.Void Sort(IComparer comparer)",
+ "signature": "void Sort(double keys)",
"modifiers": ["public"],
"protected": false,
"virtual": false,
- "summary": "Sorts the elements in the entire list using the specified System.Comparison(T)",
+ "summary": "Sort this list based on a list of numeric keys of equal length. The keys array will not be altered.",
+ "remarks": "This function does not exist on the DotNET List class. David thought it was a good idea.",
"parameters": [
{
- "name": "comparer",
- "type": "IComparer