Page MenuHome

Improved Bezier curve extrusion
AbandonedPublic

Authored by João Araújo (genio84) on Mar 8 2016, 10:59 PM.

Details

Reviewers
None
Summary

This patch implements the "Improved Extrusion" feature proposed in https://docs.google.com/document/d/1NSpMnKHn5LPL9_LUe2sRXiOtU52WFIfug26p3RaJAas/edit#.

The changes performed consist of adding two new interface options: "Extrude Symmetric" and "Reverse Extrude Direction". To ensure backwards compatibility, "Extrude symmetric" is turned on by default.

This patch only works when Bevel Depth is 0. Changing the value of Bevel Depth ignores the options mentioned above.

Diff Detail

Event Timeline

João Araújo (genio84) retitled this revision from to Improved Bezier curve extrusion.
João Araújo (genio84) updated this object.
Campbell Barton (campbellbarton) requested changes to this revision.EditedMar 23 2016, 3:48 PM

This patch behavior stops working once bevel Bevel Depth is nonzero.

This revision now requires changes to proceed.Mar 23 2016, 3:48 PM

Also think its more flexible to have a single extrude-offset setting here, instead of adding two toggles, made a patch: P342

That option sounds interesting, I am assuming it will allow controlling an offset distance for the extrusion direction in relation to the curve base line.
Would it be a percentage sort of thing or can it be controlled in absolute Blender units?
If it's in absolute value could this also be used to allow "detaching" the extrusion from the base curve?

@Duarte Farrajota Ramos (duarteframos), the current patch is a factor of the extrusion. (I think this is best). but it could work differently of course.

@João Araújo (genio84), are you going to finish this patch off? (resolve issue with non-zero Bevel Depth).

@Campbell Barton (campbellbarton) I intend to. I will try to do something today, and have an update ready tomorrow.

@Campbell Barton (campbellbarton) I have been looking at your patch. It is a nice solution, and is indeed more flexible than my original proposal. However, it does not address what I had in mind when I implemented this patch, which was to extrude 1 Blender Unit per unit entered in the extrude field (contrasting with the current behavior, where for each unit inputted the curve is extruded two units, one in each direction). This is slightly hard to handle, since it breaks backwards compatibility. That was the main reason behind the "Extrude Symmetric" toggle. Since by default it is turned on, all old files would be able to open fine. The "Reverse Extrude Direction" is actually a bit ridiculous. I tried to input negative values in the Extrude field. However Blender set them to 0. I tried to change this behavior, but to no avail. I believe I might have missed some crucial part on the code.

Regarding the integration of non-zero bevel depth with this patch, I have done it on top of your patch. It works relatively well (I found a way to trigger some memory allocation error which I do not know how to fix). However, before I submit it, I would only like to hear your opinion in my thoughts above. Should I build upon your patch, or should I stick with my implementation (and maybe improve it)?

Campbell Barton's solution does indeed miss the option to "single extrude".
Maybe instead of two textboxes "Extrude Symmetrically" and "Reverse Extrude" this could be condensed down into a single dropdown menu with three options "Front/Back/Both" just like the bevel options.
It could be simpler and more familiar for existing users. The default would be "Both" for backwards compatibility, and combined with the offset function would cover all cases.

One other question, could the "Offset" value be in absolute Blender units instead of a factor or percentage?
It would probably be simpler and more predictable to control, and wouldn't depend on other values, so that changing extrusion wouldn't also affect perceived offset.

I hope it's okay to close this patch:

  • It is 5 years old
  • The code is outdated
  • I would prefer to support features like this by making it easier to create a custom profile rather than having a bunch of specific options on the curve bevel generation.