Just wondering if there is a way to set a CPlane by temporarily switching to center Osnap (just for this particular command) and then snapping to center, then to another center, then pick a planar surface, so that the origin of the new CPlane will be sitting in the middle between the two center points projected from the planar surface, even if the planar surface is not equally oriented to the two centers? To make it easier to understand, here is a sample image and a 3dm file.
Set CPlane by surface plane, then midpoint between centers.3dm (299.6 KB)
This is very usable for design of machine parts for CNC-milling, but it could be handy for any other application, as well.
At the moment I use a custom macro that does something similar, except that it works by picking the planar surface initially, then picking the two centers, then manually snapping to the middle of the temporary line, then picking the Z-elevation for the CPlane. All this is a bit cumbersome and requires more mouse clicks than necessary.
“Set CPlane by surface plane, then midpoint between centers”
'_CPlane _Object _Pause _Line _Center _Pause _Center _Pause
_SelLast _CPlane _Mid _Pause delete
_Pause _CPlane _Elevation
This requires picking planar surface 3, then center of surface 1, then center of surface 2, then the middle between both centers, then adjusting the elevation by snapping to surface 3 (or any other surface).
An alternative shorter version of the macro could be used if additional adjustment of the elevation is not needed:
“Set CPlane by surface center, surface center and midpoint”
'_CPlane _Object _Pause _Line _Center _Pause _Center _Pause
_SelLast _CPlane _Mid _Pause delete
This requires picking surface 1, then center of surface 1, then center of surface 2, then the middle between both centers.
Ideally, a more intelligent way to execute that would require just the following 3 mouse clicks:
- Pick center number 1.
- Pick center number 2.
- Pick planar surface. Then Rhino automatically places the origin of the new CPlane along the planar surface so that its projected Z-vector aligns in the middle between the two centers.
The tricky part is that this also must orient the X-axis along the line between the two centers. My macros don’t take this into account, because the XY orientation is assigned to the target surface instead… You can test this shortcoming of my macros with this file consisting inclined parts:
Set CPlane by surface plane, then midpoint between centers (the macros can’t align the X-axis along the 2 centers).3dm (303.7 KB)