Pt snap to nearest Crv

I have a flashlight sticking out of an opening that is smaller than the flashlight. I would like the opening to look as though it is being pushed outward as if someone pushed the flightlight out of it.

I ran the intersect command on the two and a crv displaying the intersecting line is created.

I then ran the cage command on the edges of the box. I would like for the selected points of the cage to snap to the part of the crv nearest to it.

how do I do that?

Hi Chris - if you are asking about flashlight-car-skull etc scene, I think you will be hard pressed to do this in a convincing way with surfaces.
To answer your question… it depends. The tedious way would be to run ClosestPoint : select the curve, start ClosestPoint and then snap to the points, one by one. To make this go faster, use


With the curve preselected, this will repeat the command so you can click one by one and just keep going

Then move the points with Point osnap

Another way is to start the Move command with a control point selected, snap to the point as a point to move From and then use the OnCrv and Perp osnaps to set the To point.

Your choice, as to tedium.

Let me see if I can make you a quick script to ease the pain.

@chris.prinsen2 - here is a python that should make this easy enough… (2.0 KB)
To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"


1 Like