Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all 8686 articles
Browse latest View live

CRhinoPickContext questions

$
0
0

@gennaro wrote:

Hi everybody,
I am trying to emulate the mouse selection in a 3D space with the CRhinoPickContext but I have two problems:

  1. I define an area of selection which approximates a ray cast by a point towards the objects. While the mouse selection stops on the first object crossed, the PickObjects function selects everything in the area. I could do it if I could get the object distance. I think I can have it for some types of objects with functions like PickPoint, PickLine, PickMesh etc… The problem is that there is not a function to pick breps and surfaces.
  2. I would like to enable also brep and surfaces faces and edges selection. I thought m_bSubSelect=true could work but nothing seems to change.
    Ideas?
    Thanks!

Posts: 1

Participants: 1

Read full topic


Intersect quesstion

Grid ground through

Mesh NGon with holes

$
0
0

@Petras_Vestartas wrote:

Is it possible to define NGon in a mesh, if that mesh has holes?
NGon has vertex list and face list.

In situation when there are holes, ngon will have multiple boundaries.

Does this description fall in ngon description?

Posts: 6

Participants: 3

Read full topic

Modify size of standard Rhino views?

$
0
0

@david.browne wrote:

I’m looking for a way to modify the layout/size of the standard Rhino views using the RhinoCommon API. I want to be able to programatically modify the vertical split ratio so that they look something like this:

Is this possible? I’ve searched high and low through the documentation but I haven’t found anything.

Posts: 4

Participants: 2

Read full topic

Script compiler - How to load plugin at startup

$
0
0

@tobias wrote:

Hi all,
I am compiling a plugin with the Monkey script compiler and I need the plugin to load at startup. Is there a way to do this?

gr, Tobias

Posts: 1

Participants: 1

Read full topic

Null layers when reloading a model

$
0
0

@hanparker wrote:

I’ve been working around this problem that I have for a while but I thought I’d see if anyone know how to fix it properly today! Simplest scenario listed

If I start Rhino with a particular model and call a RhinoCommand that does this:

Rhino.DocObjects.RhinoObject[] rhobjs = _doc.Objects.FindByLayer(“whatever”);

Then I get a bunch of objects back.

If I maintain the same Rhino session but reload the model. Same layers and same objects, I then get “null” for the same call. It can’t find the layer. What can I do?

It’s not a typo, it’s definitely the same model with the same layers.

Posts: 4

Participants: 2

Read full topic

Mesh creation with Rhinocommon

$
0
0

@flecheria wrote:

Hi
is it possible to use Rhinocommon (OpenNurbs flavor) to create mesh plane inside another application?
Can I write something like:

Interval i = new Interval(0, 100)
Mesh m = Mesh.CreateFromPlane(Plane.WorldXY, 1, i, 4, 3)

And work with points and faces?
Thanks
Paolo

Posts: 1

Participants: 1

Read full topic


Block Transform Info

$
0
0

@ChristopherBotha wrote:

Hi I need to read the information about a block, how it was trnasformed from its original position. Cant find any info on how this is listed or how to access it.

example of info from WHAT, 12 seperate bits of data, if I assume position , scale , rotation I get 9.

What am I looking at, and for example if I knew original scale, location and rotation of the block, how can I access this info to determine how it transformed, for example to measure the current size of the block in relation to its original size?

Block Instance
  transformation:
    0.12790842443283043, -0.011492650154887275, -0.077507121940685375, -4.1975822785495396
    0.021765425319342915, 0.14774965431392495, 0.014010921125456904, 2.2725170261647651
    0.075270852391739237, -0.023193935468846849, 0.12765711941638022, 11.031683325180133
    0, 0, 0, 1

Posts: 3

Participants: 2

Read full topic

Trim/Split Brep with a Curve C++ SDK

$
0
0

@dimcic wrote:

Hi,

this is a pretty basic question, and I think there is a simple answer for RhinoCommon, but I haven`t found the satisfying solution for C++. So, if I have a (closed) curve projected onto a brep, and I want to trim or split the Brep, I basically found two functions:

  1. RhinoBrepSplit - this takes ON_Brep as a “splitter” argument, so I have to extrude or do something else with the Curve to transform it into a Brep before I can split the original Brep, which complicates the matter significantly…

  2. RhinoBrepTrim - I do not really understand the documentation and the implementation of this function and it seems like it also takes ON_Brep as the “cutter”…

So what would be the simples way?

Thanks!

Posts: 1

Participants: 1

Read full topic

Plug-in panel with huge datasets doesn't update

$
0
0

@chhadidg wrote:

Steve,

we are working on a Plugin for Rhino. We are dealing with big datasets/rhino objects and I was running our test script with the newest build (BETA) and the Plugin panel doesn’t update correctly anymore. After adding 1.5 Million objects to the viewport basically the display performance is leaking a lot.

Any thoughts on that.

Kindest
Christian

Posts: 2

Participants: 2

Read full topic

PreTranslateMessage in Modeless dialog

$
0
0

@kvrantzaliev wrote:

Dear all, I have a plugin having a modeless dialog and want to handle the Pretranslate message. Compiling the plugin for Rhino 5 has no problems, but with Rhino 6, I don’t get these messages.I have tried to add #define RHINO_SDK_MFC, but still cannot get it.
Do you have any idea what is wrong? Can you give me a small plugin example for v6 where the messages are handled in this modeless dialog?

Thank you in advance.

Posts: 1

Participants: 1

Read full topic

Add UserData to instancedefinition

$
0
0

@Matthieu_from_NAVINN wrote:

Hi,
I created a custom userdata class (Inherits Rhino.DocObjects.Custom.UserData), and I would like to .add it to an InstanceDefinition, but I can’t figure out how to do this. (I know how to do this for a classic RhinoObject because it has a geometry)
I need to store common data for my blocs.

Any Idea how to do this?
Best regards

Posts: 1

Participants: 1

Read full topic

Help textbook

How would y'all feel about a RhinoCommon Developer course on Udemy?

$
0
0

@jarombra wrote:

I’m sure it would be wildly popular amongst Rhino developers, hobbyists, and computational designers alike.

The purpose of the course would be to provide a comprehensive overview of RhinoCommon development using its C# SDK in Visual Studio, starting at such a pace to include those new to coding, but by mid-course accelerate to more advanced plugin projects (as to not bore the intermediate/expert students) without losing sight of the beginners.

If anyone is interested in taking the CS initiative on such a course, I’d be more than happy to provide whatever graphical, video, and content assistance as well – I guess that means I’m volunteering as a co-instructor, which I’m totally excited to do. I’m not a developer, nor a CS person, but I am C# literate and am interested in learning more about RhinoCommon; I am fluent in Rhino however. If you can handle the code teaching, I can do all the other work required to get this course up and running.

If anyone is interested in taking this on with me, let me know and we can start to get the ball rolling by outlining a syllabus. Presumably like you all, I have a busy work schedule, but I’m sure we could make good headway by putting it together on the weekends here and there.

I think there’s a dearth of RhinoCommon resources and with so many people getting into Unity’s C# API, the time is ripe to get people onboard with using C# to build cool custom tools and processes in Rhino.

Who among you CS coders specifically are interested in doing this with me?

  • Jason

Posts: 1

Participants: 1

Read full topic


Object Selection with Options - Plugin

$
0
0

@onrender wrote:

I have tried to follow the article of Object Selection with Options.

But I have got two errors during compilation;
VS file Object Selection with Options.zip (1.8 KB)

This is the second command in the plugin. The first one is the template “DrawLine” command.

Could you give me a hint what could cause the error.

Posts: 2

Participants: 2

Read full topic

Override DIM tool

$
0
0

@ChristopherBotha wrote:

Hey all, as is my want I have a sticky problem, I need a flexible linear dimension tool, that allows an override of the size it finds

Expanding on this code from samples, I can find the value in the dimension function, but cannot inject a custom value back into it (read only)

Any leads?

partial class Examples
{
public static Rhino.Commands.Result AddLinearDimension(Rhino.RhinoDoc doc)
{
Rhino.Geometry.LinearDimension dimension;
Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetLinearDimension(out dimension);
if (rc == Rhino.Commands.Result.Success && dimension != null)
{
if (doc.Objects.AddLinearDimension(dimension) == Guid.Empty)
rc = Rhino.Commands.Result.Failure;
else
doc.Views.Redraw();
}
return rc;
}
}

Posts: 2

Participants: 1

Read full topic

Missing deprecated information in Rhino_DotNet

$
0
0

@ModuleWorks_Marcelb wrote:

I have a plug-in that exists since Rhino 4 written in .NET. It uses both Rhino_DotNet and RhinoCommon but now that Rhino 6 is there it seems I have to get rid of the old code and move to the new RhinoCommon API. I noticed there are a lot of changes and whole classes have been remade. The problem for me is that sometimes I can’t figure out on my own how to refactor the code to use the new API.

Is there a more detailed documentation on the deprecated code from Rhino_DotNet and what to use from RhinoCommon instead?

Posts: 2

Participants: 2

Read full topic

OpenGL in Rhino 6

$
0
0

@ModuleWorks_Marcelb wrote:

I use a Rhino.Display.DisplayConduit for both Rhino 5 and 6. In Rhino 5 it behaves completely fine like I would expect. I’m doing some OpenGL calls there and everything looks ok.

Now in Rhino 6 either I cannot see anything or it seems to break the whole visualization. I tried to draw a simple triangle which works in Rhino 5 but not in 6 using the following code:

GL.Color3(Color.Red);
GL.ColorMaterial(GLEnum.FrontAndBack, GLEnum.AmbientAndDiffuse);
GL.Enable(GLEnum.ColorMaterial);

GL.Begin(GLEnum.Triangles);

GL.Vertex3(0, 0, 0);
GL.Vertex3(0, 0, 100);
GL.Vertex3(0, 100, 0);

GL.End();

The GL calls are going to an OpenGL wrapper I provide myself.

When I try to draw more complex stuff I get this result:

Are there any changes to OpenGL support in Rhino 6? How can I solve this?

Posts: 1

Participants: 1

Read full topic

Using Zoo server from a plugin

$
0
0

@kvrantzaliev wrote:

Hi, for version 6 of Rhino, there are changes in the node licensing of plugin for using zoo server. My plugin successfully was using Zoo6 server, but the ported version for Rhino 6 doesn’t. Is there a new working example of how a plugin of Rhino 6 can connect and get a license from the zoo 6 server? Also there are newly added functions which probably we will need to implement.
I see some documentation in the header file, but going to the website shows the ‘old version 5’ approach of the licensing mechanism.

Any information will be kindly appreciated.

Thanks

Posts: 1

Participants: 1

Read full topic

Viewing all 8686 articles
Browse latest View live


Latest Images