Gp.Constrain method to be applied to set of Breps

Hello,

Currently I see that GetPoint Constrain method can be applied to single brep only.
However I am looking for application of the same Constrain method to be applied to several (preselected) breps simultaneously, but not to all breps in the document.

Thanks,
Dmitriy

GetPoint only constrains to a single object. If you want to constrain to more than one one object, you will have to derive your own custom version.

Here is an sample that might help:

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsGetPointOnBreps.cs

It isn’t perfect. But its a good place to start…

Thanks @dale

In case if I need to pick point more than one time (still on the same set of surfaces) - what would be the best practice?
Should I just enclose GetPointOnBreps() in the loop and add an Option to Exit or?

Thanks,
Dmitriy

I’m not sure there is a best practice. Here is an example of one practice…

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsGetMultiplePoints.cs

Great.
Thanks, Dale.