Perpendicular / Normal Extrusion Confusion

I’m not sure if this is a wishlist item or me asking a ‘how-to’ question but…

i sometimes need to extrude multiple curves or surfaces whose normals aren’t always facing the same direction… if i do any single extrusion (ExtrudeCrv or ExtrudeSrf) , the results are as i want them to be… however, if i select more than one curve or surface, all extrusions occur in one direction depending on the first item selected… in those instances, i’d like to be able to select multiple curves/surfaces at once and they extrude in the direction as if the commands were being run on them individually.

strangely, the preview of the MoveFace command (with normal constraint) does do what i’m asking but upon running the command, the behavior reverts to a single direction.

any insight/help appreciated. thx

+1 for wanting to know the answer to this.

Hi Jeff,

I assume you’re talking about a collection of planar curves and surfaces, for which Rhino takes the plane normal as the extrusion direction default when there is a single object. Something can be probably scripted for this with multiple objects, relatively easily if you just want to input a distance, more work if you want to have a preview…

Cheers, --Mitch

i suppose it could be scripted but it really does seem as if the commands themselves are messed up…

there’s an option for ‘direction’ in these commands and that’s what (i feel) should be used if you want the behavior to be as it works now… if you don’t assign a direction, the objects should extrude as if each of them were being done individually…

also, regarding the MoveFace glitch(?) i mentioned… i guess that example only works when the faces arent connected… if you do something like this example, you’ll be able to see what i’m talking about.

so the preview show like that but once you return , they all move in one direction.

OK, I can see where an option like this would be useful, and I also see what I would consider to be @pascal a bug - that is to say that the direction of the first curve picked determines the direction for all - which is completely arbitrary and cannot be determined if the objects are selected via window.

I checked in V4 and the behavior is different - there, several planar curves not having the same plane all extrude in the direction of the active CPlane (which is what I was expecting). I did not realize it had been changed for V5.

Question - if there are one or more non-planar curves included in the selection what should it do? How should it determine the direction for those?

In my case, when extruding multiple curves simultaneously most of the time I do want them all to go in the same direction, usually the active CPlane like V4… But I would definitely support an option to extrude each curve in its own plane - if the above question can be satisfactorily resolved.

–Mitch

hmm… i didn’t even realize ExtrudeCrv worked on nonplanar curves (due to some conflicting info in the mac menus which has the solid menu entry ‘Extrude Planar Curve’)

regardless… i don’t see a problem with non-planar curves/surfaces either… if you select 1 non-planar curve then extrude it, you should get identical results when you select that curve along with others… they should just do whatever it is they do when selected as single items (perp to Cplane when non-planar)… if you’d like to change the direction of the extrusion and/or have multiple extrusions all go in the same direction regardless of their orientation, then you would use the ‘direction’ option within the command.

does that make any sense as typed? :smile:

here’s a simple little 3dm to help explain incase i’m not being clear enough…

https://dl.dropboxusercontent.com/u/16524160/startcrvs.3dm

this same stuff should also apply to the ExtrudeSrf command…

The tricky part here is figuring out which direction is “up” for each of the curves. Each curve has a natural up direction that is defined by the direction of the curve (run the Dir command to see that direction). If you simply want Rhino to extrude “up” relative to the curve direction, this is straight forward to script. However, it is incredibly simple to draw two curves that are in the same plane but have “up” pointing in two directions. For an example, draw a curve using the Curve command - one picking points clockwise, the other counter clockwise.

Now, take a whole bunch of curves and randomly scatter them in different orientations around your screen, and without looking at the direction of each curve try to predict which direction it will extrude. Unfortunately, you may wish they’d all extrude in the “obvious” direction, but no such obvious direction actually exists.

In your example with rectangles below, it is possible that one of them is actually oriented backwards, and the resulting correct extrusion would be opposite the red arrow you drew.

This is why Rhino chooses a single direction when you select multiple curves or surfaces to extrude - doing anything else is usually wrong, unless you’re very strict about making sure all the curses are oriented properly. We try to make it so that you don’t have to care about curve orientation in Rhino - and this behavior is a side effect of that.

The Extrude command is even smarter than I described: if your curves lie parallel to a known construction plane or canonical world direction (x, y, z), the Up direction is selected based on that direction. If you orient your curves out of those canonical directions, then the curve direction is used to decide which direction is up.

Simple question - complicated answer!

hey brian… thanks a lot for chiming in

[quote=“brian, post:8, topic:649, full:true”]
The tricky part here is figuring out which direction is “up” for each of the curves. Each curve has a natural up direction that is defined by the direction of the curve (run the Dir command to see that direction). If you simply want Rhino to extrude “up” relative to the curve direction, this is straight forward to script. However, it is incredibly simple to draw two curves that are in the same plane but have “up” pointing in two directions. For an example, draw a curve using the Curve command - one picking points clockwise, the other counter clockwise.[/quote]

right, i see that… when it comes to extruding them though, they still both go in a positive Z direction (or x or y direction if they’re 90º to the plane)… i.e.- they extrude in a predictable direction regardless of their Dir…

still, i don’t think i’m getting my point across… lets say i have two circles drawn-- one is flat on the cplane and the other is at 90º to the cplane…

if i select the flat one and ExtrudeCrv, it will extrude in the z direction… if i select the vertical circle and extrude it, it will extrude in a direction parallel to the cplane…

but, if i select both circles at once and ExtrudeCrv, only one of them will actually extrude… the other circle will preview as if it’s sliding along it’s plane but will not form any new geometry upon running the command…

and i can’t for the life of me think of any user’s scenario where this would actually be desirable… as far as i can gather, user’s in this scenario would expect one circle to extrude vertically and one to extrude sideways… i think they would expect all selected curves to extrude in the same direction as they would if ExtrudeCrv were run on them individually… it should default to that then, if they want the behavior as it is now, they’d use the direction option in the command.

again, the obvious direction (to me at least) is the same direction as they would extrude if using ExtrudeCrv individually… it makes much more sense than having randomly scattered curves which all must extrude in one single direction… because the direction that’s ‘right’ for the first one selected is almost guaranteed to be wrong for all the other curves in the selection… (but again, if the user does in fact want all extrusions to go in the same direction, the command(s) are already designed to handle it via the ‘direction’ option…

[quote=“brian”]
In your example with rectangles below, it is possible that one of them is actually oriented backwards, and the resulting correct extrusion would be opposite the red arrow you drew.[/quote]

that example is with the MoveFace command but yeah, that’s how it should work… the option used was ‘normal’ so i’d expect them to move in the normal direction… even if one were flipped

but that example was maybe meant more as me pointing out a possible bug… the preview shows one thing but the resulting geometry is completely different. (but i do feel in the case of MoveFace, if you select multiple faces, they should all be treated as if they were selected individually… and should only move in one direction if the user opts to chose a single direction… same goes for ExtrudeSrf )

but rhino doesn’t always choose a single direction… if i have a planar curve, it will extrude perpendicularly to it’s plane… regardless of where the cplane is at… this is what i feel is the proper way to do it… this is the way ExtrudeCrv (and Srf) works when running the command on a single curve and it’s how (again, a guess) everyone would expect it to work…

however, throw 2+ curves into the mix and it completely ignores that logic and extrudes everything in one single direction depending on the orientation of the first picked curve…

you’re explanation isn’t too clear for me because the info is conflicting… if a curve extrudes ‘properly’ when using a single curve in the selection then that’s the way it should extrude in a multiple selection… right?

fwiw, here’s a rhino drawing which shows where i bumped into this problem:

every one of those ribs had to be extruded individually because ExtrudeCrv has no capability to select the whole lot and have them go in the proper direction… but when i select them individually and run the command, they automatically extrude in the proper direction… rhino is ‘right’ when doing them one-by-one… and it should be equally right when doing them all at once…
thanks
jeff

The geometry isn’t created when the extrusion direction is parallel to the plane of the curve because the object isn’t valid. The extrude command perhaps could be smarter about knowing that the object will not be valid and refuse to preview for you - but that still doesn’t help you get what you actually want.

I realize it looks like it’s obvious to humans. But you’re likely to get the opposite direction as frequently as you get the correct direction, because to a computer, there isn’t such a thing as “obvious”.

It is easy to make all of the planar curves in the scene extrude perpendicular to the plane that they lay in. The difficult part is getting them all to extrude in the “right” direction. In the image you sent with the ribs, there’s nothing that indicates to Rhino which way is “up” for each curve - unless you’ve managed to orient each one properly before extruding the curve.

My guess is that if I were to write a script for you to extrude all these curves, some of them would end up extruding to the left instead of the right.

Perhaps for this kind of geometry you’d be best off doing the work in Grasshopper anyway, but that’s digressing a lot from your original question.

Hi Mitch- I don’t know if this was changed deliberately at some point, but what I expect, and how V4 works, I think, (stuck with McMac this weekend so cannot check) is that in a multi-selection of planar curves that are not in parallel planes, all go normal to the CPlane by default in ExtrudeCrv.

-Pascal

[quote=“brian, post:11, topic:649”]
The geometry isn’t created when the extrusion direction is parallel to the plane of the curve because the object isn’t valid. The extrude command perhaps could be smarter about knowing that the object will not be valid and refuse to preview for you - but that still doesn’t help you get what you actually want.[/quote]


hmm… maybe we’re talking about two different things with regards to direction… i get what you’re saying about whether or not it should extrude up or down in relation to it’s plane… as far as i can gather, if i use ExtrudeCrv on a single curve and enter, say, 10 units, it will always move in a positive Z direction if on the cplane… if it’s on an angle other than the cplane, it will always move ‘up’ in a positive X or Y direction… always… it doesn’t matter what Dir(ection) the curves are drawn… i can flip a curve but it still follows the cplane rules as opposed to curve Dir…

[quote=“brian”]
My guess is that if I were to write a script for you to extrude all these curves, some of them would end up extruding to the left instead of the right.[/quote]

well, even then… lets say some extruded in the ‘wrong’ direction in the image i posted above… it would still be a lot faster to select all the bad ones then run the command again in the opposite direction as opposed to needing to do each curve by itself… (though in this exact instance it wouldn’t really matter so much… the curves were centers and i used the ‘both sides’ option)

that said, i did that drawing quite a while ago but if i did it again, i’d just select all the curves and run PlanarSrf then OffsetSrf (solid&both sides) which would do it properly and quickly…

(and this is almost a solution for the poor ExtrudeSrf behavior except it doesn’t work on solids… there’s a lot of exploding and deleting and rejoining involved in order to get a solid with an offset surface back to a solid again… ExtrudeSrf works great for this as long as you only do one surface at a time)

regarding this being scripted… i guess the problem i see with that is i assume there wouldn’t be any preview and maybe more importantly, no inferencing (?)
(along with the fact that i truly believe the actual commands aren’t working properly)

.
.

i can’t wait! (note screenshot above = mac :wink:


here’s my problem though so far in this conversation :wink:

i really do understand all the stuff you’re saying about ‘what’s obvious to me is not obvious to the computer’… and i do understand how a user may get undesirable results when some of their curves might extrude ‘right’ and some ‘wrong’… this is clear to me.

my problem though is that, in turn, these same arguments you’re making should also apply to single selected curves as well then… because all the same arguments apply there as well… which Dir is the curve-- which way is up/down --etc…

but rhino does have rules (consistent rules as far as i see) which deal with these problems… why don’t those same rules apply when these commands are used with multiple selection?

the way it works now though, it’s who cares if they went up or down because the results are way more screwed up than that…

example: using the bottom half of the rendering i posted above (with extrusion distance exaggerated for clarity)

that’s what happens if i select the curves then ExtrudeCrv… up/down is wholly irrelevant at this stage because only one of those has actually extruded in the right direction… (and which one, i don’t even know)… it’s just completely unusable results… but what frustrates (and hey, i’m not actually frustrated here, you know?.. just nerding out some)… but what frustrates me even more is that if i actually wanted those results, i could have them easily by using the ‘direction’ option… ie- i’m not asking to change the way the command works -or- other users aren’t going to be bummed because the command already includes ways to give these results via the direction option… it’s almost as if having the direction option is redundant in the commands…

all i’m asking is for a little consistency between the way ExtrudeSrf and ExtrudeCrv (and even MoveFace) works…

if i select one curve and extrude it 10 units, i (and i think everyone else) would expect it to do the same exact thing as when i select 2 curves and extrude 10 units…

because as it is now, i can select curveA, extrude 10 units and end up with one thing but, if i select a non-planar curve then curveA and extrude it, the extrusion goes in the Z direction regardless of which plane curveA is on ??

this, to me, makes zero sense… it should do the same exact thing as if i selected the curve by itself… and follow the same exact rules rhino has in place regarding up&down…

am i making sense yet?

thanks for listening

1 Like

[off-topic]

just realized you’re brian gillespie.
i have 97 emails from you (well, the automated version of you) for the wenatchee links.
glad to finally meet you
:smiley:

[/off-topic]

one other thing regarding the topic… i don’t know if it’s taboo or in bad taste to refer to other software as being ‘right’ so if it’s taken that way, i apologize in advance…

but Moi does do these multiple extrusions in (what i feel) the proper way… the rules might be a little different. (with ExtrudeSrf, they’re better i think… it extrudes in the normal direction as opposed to how the plane may lie in reference to the Cplane.)

dunno… if you have a copy of that application, try it out… then i can stop jibberjabbering with my explanations because that’s a perfect example of what i’m trying to say. :bulb:

Ok, I get you. It sounds like we already have better rules in Rhino for choosing the up direction than I thought. I’ve added this bug as http://mcneel.myjetbrains.com/youtrack/issue/RH-20132 (our bugs are not publicly visible yet, but we plan for them to be soon)

This will not get done until V6 at the earliest.

It is nice to meet you, too :smile:

Hi Jeff- I’ll see if this can be done in V6… for the moment, V5 seems incorrect to me even without considering what you suggest- it should extrude all curves normal to the CPlane if they are not all planar in parallel planes, like V4.

-Pascal

awesome. thanks guys… and thanks for hearing me out

but not normal to each surface if the surfaces are not parallel to the CPlane?