Gp.Constrain method to be applied to set of Breps


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.


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:

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?


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

Thanks, Dale.