@qkrwlsgns wrote:
When you select an object.. i want to display object like Grasshopper..
any idea?
Posts: 2
Participants: 2
@qkrwlsgns wrote:
When you select an object.. i want to display object like Grasshopper..
any idea?
Posts: 2
Participants: 2
@gstoilov wrote:
Hi, I'm writing c# plugin for Rhino 5. I need to select one or more surfaces , draw one line and find intersection points between them if there are any. To satisfy object types in "CurveSurface()" the line must be "Curve". I can't cast created line as curve object. Could you help me please!
Rhino.DocObjects.ObjRef[] surfs;
Rhino.Input.RhinoGet.GetMultipleObjects("Select Polysurfaces & surfaces", true,
Rhino.DocObjects.ObjectType.Surface | Rhino.DocObjects.ObjectType.PolysrfFilter, out surfs);
Point3d Start = new Point3d(0, 0, 100);
Point3d End = new Point3d(0, 0, -100);
Guid line = doc.Objects.AddLine(Start, End);
Rhino.DocObjects.RhinoObject ObjLine = doc.Objects.Find(line);
// CAST line to Curve - error
Curve cLine =ObjLine.Curve();Rhino.Geometry.Surface surf = surfs[0].Surface(); double tl = 2.1 * doc.ModelAbsoluteTolerance; Rhino.Geometry.Intersect.CurveIntersections Cross = Rhino.Geometry.Intersect.Intersection.CurveSurface(cLine, surf, 0.001, tl);
Posts: 6
Participants: 2
@pagarcia wrote:
Hi,
I don't find a way to do this in C++.
For example, with @dale's SampleCustomGrips, I create a rectangle, edit the grips, then save the file. When I open it again and edit them, they are no longer the custom grips, but the default polyline ones.How to keep the custom grips within the file?
Many thanks,
Pablo
Posts: 3
Participants: 2
@Sander_Boer wrote:
var detail = pageview.AddDetailView("ModelView", top_left, bottom_right, Rhino.Display.DefinedViewportProjection.Top); if (detail != null) { pageview.SetActiveDetail(detail.Id); detail.DetailGeometry.SetScale(detail_scale, doc.ModelUnitSystem, 1, doc.PageUnitSystem); detail.DetailGeometry.IsProjectionLocked = true; detail.Viewport.SetCameraTarget(cpt, true); detail.CommitViewportChanges(); // detail.CommitChanges(); }
When I use the snippet above, the detail view gets made and repositioned to cpt (which is a Point3d).
However, the scale does not get applied, when I uncomment the last line, the detail view gets set up properly with the correct scale, but is not repositioned.This behavior is peculiar and does not seem correct. Is it a bug ?
Is there a workaround available ?thx,
Sander
Posts: 2
Participants: 1
@zer41k wrote:
Hello!
How can I get a point at a certain length along the curve?
I am using "Rhino 5 for Windows C++ SDK".
I've just realized that I do it wrong (Set domain [0.0; length] and just get point by domain).
The only solution I found for now is to use "RhinoDivideCurve()" and get first point as a result.
Are there easier way?
Thanks in advance!
Posts: 2
Participants: 2
@Ignacio wrote:
Hi!, im developing a rhino digitizer plugin, using the Rhino common SDK C# v5.0. There is a way to change the behavior of the _Digitize command?, When the user run this command and the digitizer is already connected, this command runs the _DigCalibrate, this cause a loss of the coordinate system. Im trying to prevent this. Thanks.
Posts: 4
Participants: 2
@Ignacio wrote:
When i run the command _Digitize, a "Select Digitizer" window is shown, with a droplist of all digitizer installed. There is a way to skip this window, and select automatically my own digitizer?
Im working with Rhino common SDK v5. Thanks.
Posts: 1
Participants: 1
@samoles82 wrote:
Hi All,
There is one problem I would like to share and if possible find solution.
I'm using C/C++ SDK for Rhino for Windows plugins.
- I tried to reduce a mesh object with the function from rhinoSdkMeshUtilities.h:
bool RhinoReduceMesh(...);- After this I reduced the same mesh object with Rhinoceros command: _ReduceMesh;
- The problem is the reduced meshes of both operations are different.
I used the same parameters of the reduction (at least I hope it's so), but the result mesh of the function has lower precision then mesh generated by _ReduceMesh command.
For instance, parameters of the reducing:
0. Mesh object is the same for both operations;
1. Parameters of the command _ReduceMesh:
- Reduced by - 75 percent;
- Accuracy of the reduction - max (Accurate);
2. Parameters of the function "bool RhinoReduceMesh(...)":
RhinoReduceMesh(t_mesh, 25 * t_mesh.FaceCount() / 100, true, 10, true);Is it possible to reduce mesh using the function "bool RhinoReduceMesh(...)" and obtain the reduced mesh similar (or better exactly the same) to the mesh generated with command _ReduceMesh?
Thanks in advance for any ideas.
Posts: 2
Participants: 2
@cidelab wrote:
hello to all
Please, can someone helps me to resolve this issue?
I need to print through code, but the command _-SavePrintWindowAs its not recognized by rhino. What should I use instead?
I'm doing this:string loc = "C:\\Users\\cricri\\Desktop\\hey.pdf"; RhinoApp.RunScript("_-Print Go _-SavePrintWindowAs \n\"" + loc + "\"\n _-Enter", true);
any clue will be very helpful
thanks in advance
Carlos
Posts: 2
Participants: 2
@cidelab wrote:
Hello to all,
does anyone experiment this issue using VS 2015 community Update 3.When I try to debug and Inspect a class created by me, VS close Rhino and doesn't allow me inspect the variables.
I tried:
Repair VS 2015.
Change the debugging options
Reset the settings as wellany clue comment that could be?
kind regards
C.
Posts: 1
Participants: 1
@Markus_Erhardt wrote:
Hi, in the Example given by Dale Fugier (https://github.com/dalefugier/SampleCsWpfPanel) to add a Wpf window to a Plugin, how do you pass the RhinoDoc reference to the WpfWindow?
could you give an implemented version please?
you take from the class SampleCsWpfPanelCommand the RhinoDoc doc reference from the RunCommand and it has to be given to the SampleCsWpfUserControl.xaml .
How to Implement It?
Posts: 1
Participants: 1
@dimcic wrote:
Hi,
I would appreciate some help in the certain task I want to do. It is a relatively simple problem that I would normally approach with RhinoApp().RunScript...but here is the task and the question:
Task: (Batch) export every object in the Rhino file to a separate.obj file together with the.mtl file (textures)
Question: If RunScript is the best way to do this then how would that look for this task? How to attach mtl files to the obj ones? Can this be done on a "lower level" programmatically?
Thanks!
Milos
Posts: 1
Participants: 1
@pagarcia wrote:
Hello,
In C++, I was wondering if I can create several kinds of custom grips for the same custom
CRhinoMesh
orCurveObject
, and deploying them via plugin toolbars. These should be exclusive, i.e. when a set of grips is enabled, then the others are disabled.More specifically, I'm creating a plugin to represent surfaces via several sets of polynomial functions that can be controlled through control grips. Every function has its own type of grips or handles, but they all map the surface with the same precision.
I made the code for one set of functions with a custom
CRhinoMeshObject
and overriding itsEnableGrips
, which as far as I know is connected to the default Rhino toolbar button "Point on/off". It would be great to have a sort ofEnableGrips2
and connect it to a newly created "Point2 on/off" button, with a newly coded set of custom grips, and so on. How to control this?Many thanks!
Pablo
Posts: 3
Participants: 2
@GKumar wrote:
In our new plug-in we use conduits to display simulation results using a
collection of dense surface meshes. We want users to be able to pick
points on the surface constrained to any of these meshes... like
GetPoint.Constrain() except with multiple meshes.So I think we have to do the picking geometrically with mesh-line
intersections, except usingGeometry.Intersect.Intersection.MeshLine()
will not register an
intersection if the user picks precisely on a vertex. One solution
seems to be to perform multiple mesh-line intersection tests in the
neighborhood around the pick point, then use the nearest vertex if it is
within some epsilon of the nearest identified intersection point.Does anyone have any other ideas to allow users to select points
constrained to be on the surface of a set of meshes?
Posts: 4
Participants: 3
@Pascal_Schon wrote:
Hi,
I need to split a mesh with an array of (joined) NurbsCurves. In the command line, I can simply type MeshSplit, which does the job. I can't find such a function in RhinoCommon, only three versions to split with a Plane, Mesh or collection of Meshes.
Do I just not see it or is this not implemented in RhinoCommon?
Cheers,
Pascal
Posts: 5
Participants: 2
@Andrew_Zukoski wrote:
Hello!
I have an event handler attached to BeforeTransformObjects. I want to be able to extract the objects in the document that the transform is being applied to and the transformation. There's a known bug around the Objects field in the RhinoTransformObjectsEventArgs passed to the event handler being null, even when the ObjectCount is non-zero. I've been working around this by grabbing a list of selected objects from the active document, and this setup works in most cases.
However, if I add curves to a document, turn control points on, and transform one of the points, my transform handler gets called with object count 0,
To repro:
Download, build and install (or set up your own event handler):
DemoTransformHandler.zip (38.0 KB)
Open a new document
Install the plugin
Then:
(1) Run "DemoTransformHandler" to attach the event handler.
(2) Add a new line
(3) Drag the line to translate it.
(4) Note that the event handler is called with an objectCount of 1, a null objects array (see known bug above), and that the document reports one selected object.
(5) Run PointsOn, select the line, finish the command.
(6) Drag the line's start point to a new location.
(7) Note that the event handler is called with ObjectCount 0, and that the document is reporting that no objects are selected.Anybody have ideas on whether there's a way for me to find a structured representation of the transformation and the particular control point that it's being applied to?
Posts: 3
Participants: 2
@Ilidio_Antunes wrote:
Hi, I would like to know what is the RhinoCommon method that is equivalent to the Blend command in Rhino? I mean the Blend command used to create a curve connecting two curves (the "quick" version). I initially thought it was Curve.CreateBlendCurve, but after trying a while, I can't produce the same curve. That method produces a curve more like the Connect command. I want a smooth, curvature-continuous curve like the one the Blend does.
Can someone help me?
Thanks,
Ilidio.
Posts: 3
Participants: 2
@Markus_Erhardt wrote:
I am looking for a way to throw every tool bar into Rhino and you my owns. Perhaps with some of Rhino's functionnalities-> buttons.
do you think it is possible ?
Posts: 1
Participants: 1