Workflow involving project curves, joining them and then returning them

Good morning friends,

There is a workflow that I do over and over again and am wondering if it’s possible to come up with a macro/ script to automate it. Hard to describe but I will try:

  1. Working in an ortho view, with curves that I want to join, but aren’t in the same plane.
  2. I project them on the cplane (which usually is the default world axes cplane) where they get aligned and I join them there.
  3. I then have to go and drag them back to their original location before I can do anything with them… like create a surface out of them or a pipe.
    My question is whether there is anyway to automate the part where you select the curves, run a macro or script, and it projects them on to the cplane, joins them and then returns them to their original location?

Thank you.

Cosmas

Well the thing is, if they’re not in the same plane to begin with, what plane will you be sending them back to?

–Mitch

Hi Mitch,

Take a look at this video, if you would:

Thank you.

Cosmas

The video is not very clear - at one point when you switch to perspective (from seconds 40 to 45), it looks like you have two rectangles…

But I imagine you have 2 “L” shaped curves not on the same plane. So, after joining, they have to go back to either the plane of one or the other… But which?

–Mitch

have you tried using SetPt instead of projecting to the cplane?

with that, you would set to whichever curve you’d like the final height to be and could do it while remaining in the top view.

Good point, both of you. Mitch, you are right – I do have 2 “L” shaped curves, but how can we automate this, if we don’t know which curve’s plane to go back to … at the end? I can see the problem here. Thank you for trouble shooting this.

Jeff, your suggestion works. It’s not as automated as I had wanted, but it does save me the step of projecting them and then going and dragging them back to where I want them. Thank you to both of you.

@Helvetosaur
@jeff_hammond

that’s probably automate_able though… i was just outlining a different way to view what could happen instead of thinking the curves need to be sent to the cplane prior to bringing them back up to height… or- only one curve needs to move… not both.

Hi Cosmas, maybe this macro works for you:

_CurveBoolean _DeleteInput=_None _CombineRegions=_Yes _Pause _Pause _Enter _PlanarSrf _Delete _SelLast _SetPt

Hey Jess,

Thank you. We’re almost there. Can we leave the curves joined but not actually generate planarsrf? Sometimes, I want to use curves for pipe, for example, and sometimes planarsrf.

Thank you.

Cosmas

_CurveBoolean _DeleteInput=_None _CombineRegions=_Yes _Pause _Pause _Enter 

This is what you need than.
You still need to move the combined curve yourself.

Maybe create a button with left the planarsrf and right mouse button the pipe?

Well, you could choose one or the other, the one closer or further away from the camera, for example… Or average them. But if you’re only looking at them from the top view, I don’t know if you’ll see where they went.

–Mitch

Hey Mitch,

here’s an idea. Let’s say that your first curve is not on the cplane (the world cplane). But your 2nd curve is. You run this macro and it takes the first curve and projects it on to the world plane, joins it with the 2nd curve and then takes both curves and brings them back to where the 1st curve was. At that point, I will have the curves where I want them and can run planarsrf or pipe depending on what it is I am using them for.

Does that make sense?

! -SetPt X=no Y=no Z=yes Pause Join

select the two curves, run the macro, click on whichever curve you want for the height.

(edit-- oh wait, that’s only working in if you preselect and click the highest curve as the set point… otherwise it’s not joining??)


this seems to work whether or not curves are preselected… and doesn’t seem to matter which one you choose for height:

! Select Pause -SetPt X=no Y=no Z=yes Pause Sellast Join

Thank you, Jeff. There’s a lot here to work with. I appreciate it.