Rhino for Windows
helvetosaur — 2013-07-18T17:30:40-04:00 — #1
I have some curves that I want to "project" onto some surfaces from a specific viewpoint. Imagine extruding the input curves to the viewpoint point and then extending the surfaces straight in the other direction to where they intersect the objects to project to... The intersection is what I want.
What i can do is exactly as above - get the view I want, show the camera, get the camera point, extrude the curves to the point, then extendsrf them backwards, etc. This is time consuming as you can't extend polysurface edges, so they all have to be exploded and extended individually. Is there any shortcut that I haven't thought of to to this? Anyone had to do this in the past?
I would like to be able to start extrude to point, snap to and Tab the "to" point to create a project direction and then pull the extrusion in the opposite direction...
pascal — 2013-07-18T17:37:12-04:00 — #2
Mitch, as it happens I just dredged up an old script to do this- they way I do in that script it is scale the input curves from the camera point so that they are scaled to the far side of the targets, then extrude back to the camera point.
dragon-drop for ProjectPersp... seems to work at least most of the time.
ProjectPersp (4).zip(952 Bytes)
sampage — 2013-07-18T17:41:46-04:00 — #3
Here is a script that Pascal wrote to do this.
(removed cause Pascal's is better)
And I see that he has replied as I type this
pascal — 2013-07-18T17:48:29-04:00 — #4
Sam, you might want to grab the one I added to my reply to Mitch- It has a fix for a dumb bug...
helvetosaur — 2013-07-18T18:03:28-04:00 — #5
Thanks, I was trying to work out the scaling thing manually - but I couldn't quite figure out how to get the proportions correct - haven't looked at the script yet, but it has to be along the line of finding the distance from the objects to the camera along the view centerline then finding the distance along that same line to somewhere behind the target and doing a proportional scale...
I have to explain remotely to a client how to do this...
pascal — 2013-07-18T18:34:13-04:00 — #6
Hi Mitch- It looks like I am getting a line from the camera eye-point to the back face of the bounding box of the curves, with the BB oriented to the camera plane, and a similar line to the back face of the target object bounding box in the same orientation- the proportion of those two lines or distances gives me the scale factor, scaling from the camera point. I add a little in the script to make sure it is scaled fully behind the target objects.
heath — 2013-07-20T06:19:57-04:00 — #7
Hey! That's the one you wrote at my request around three years ago, @pascal. Thanks again for that, it was quite helpful.
pascal — 2013-07-20T11:48:39-04:00 — #8
Hi Heath- you should snag the one I posted for Mitch to look at, a few posts up- the one I made for you, as far as I can see, had a dumb bug that would make it only get some of the curves in some cases. It came up when someone asked for this feature on our tech support the other day and I (miraculously) remembered having scripted it so we tried it on the user's file and it gave incomplete results... due entirely to density of the typist.
heath — 2013-07-20T16:23:19-04:00 — #9
I never had any problems with it, but I've downloaded the new one in case I need it again. Thanks again for all the fantastic help you give.