Change to the GetPointOnSurface method?

I’ve noticed that I can’t select a face on a polysurface with this method like I could in V5.
This video will explain it better.

Thanks,

Dan

@DanBayn
Without an accurate category assignment, it’s not likely the developers will not see this post.

I was having this problem too, so I managed to write it as shown below, to get my script to determine the surface face of a polysurface, to use as the surface object in rs.GetPointOnSurface. It is a problem with the rs.GetObject not extracting the individual surface from the polysurface, to be able to be used as the input surface for rs.GetPointOnSurface. I say this too, as in the case of a filter, not allowing the selection of a surface in a polysurface, through the python method of object filtering.

objref = Rhino.Input.RhinoGet.GetOneObject(“Select Brep Face”, False, Rhino.DocObjects.ObjectType.Surface)
surface = objref.Surface()
surfaceId = objref.ObjectId

I thought this was the right category since it affects scripting in V6. Which category would be more appropriate?

Thanks,

Dan

Thanks Colby. I’ll try this and see if I can make it work.

Dan

It is now.
Your original listing had no category assigned.

Thanks John, I was being called to another building just as I was posting that so I guess I overlooked it. Too many things happening at once!!!

@DanBayn,

If you convert your extrusion to a polysurface, does your code work?

– Dale

Hi Dale,

Yes, that’s it. The Box command creates an extrusion, and that’s what I was using to test. If I convert to a polysurface it works as it should.

I will have to remember to convert before using this method.

Thanks,

Dan

Hi @DanBayn,

This does work differently than RhinoScript. I’ve logged an issue on this.

https://mcneel.myjetbrains.com/youtrack/issue/RH-41529

– Dale

Thanks. I can’t view the log, so I’m curious if it’s the Box command making an extrusion or the GetPointOnSurface method that doesn’t work on extrusions that needs fixing.

@DanBayn, you should be able to see the issue now - sorry. And it’s the latter…