What event deals with point entering closed curve and solid brep?

(IVELIN PEYCHEV) #1

I could not find anything in the api.

(IVELIN PEYCHEV) #2

@stevebaer , @Alain , @nathanletwory?

(Nathan 'jesterKing' Letwory) #3

Not sure what you mean by event for entering closed curve or closed surface. Are you really looking for motion of geometry?

Or do you just want to know how to know if a point is in the area of a closed (planar) curve or a closed surface.

(i.e. Grasshopper components Point In Curve and Point In Brep)

edit: Point In Curve:

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_Contains.htm

Point in Brep

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Brep_IsPointInside.htm

(IVELIN PEYCHEV) #4

Think of it as a live collision detection.
While you’re working on some object, say a surface you want that the points from that surface to not exit specific boundaries. If it does then a message should be displayed.

I know I can use Grasshopper but I do not want to.
I want it to be an event solely inside Rhino.
I also don’t want to use Node in code. I do not want to load grasshopper and all its plugins’ assemblies every time.

Another case is if you have an object expanding (scaling) based on some dynamic rules. And you want to trigger an event when this object collides with another, say trigger the other object to be shrunk or moved.

(Nathan 'jesterKing' Letwory) #5

There are no events for that, you’ll have to code up your own detection and handling using the two functions I just linked to. You’ll do that in some transform handler or so

Some example code to look at

(more here)

FWIW, Grasshopper is inside Rhino, so you are staying in Rhino…

1 Like
(IVELIN PEYCHEV) #6

Thanks for the links Nathan,

I meant not loading additional stuff. Everytime I use node-in-code GH loads upon the initial launch. I want to avoid this. GH about screen to popup, I don’t like this.

I logged this here as a wish RH-52534