Inkscape: A Vector Drawing Tool

Extrude extension only works on two selected objects

Reported by Antonio Roberts on 2012-09-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
Alvin Penner

Bug Description

If you have multiple objects selected when using the Extrude extension (Extensions > Generate from path > Extrude) it only extrudes between to of the selected objects. I am unsure as to whether this is by design or is an error, but I believe that it should extrude between all selected object pairs. For example, if there are three objects selected there should be three extrusions, if there are five objects there should be ten extrusion. Please see this file for an example of the expected output https://bugs.launchpad.net/inkscape/+bug/1055155/+attachment/3335974/+files/extrusion.svg

Steps to reproduce:

Draw multiple objects
Select all of them
Run Extrude (Extensions > Generate from path > Extrude)
Only one extrusions occurs

I'm using Inkscape 48+devel+11689 on Ubuntu 12.04

Related branches

~suv (suv-lp) wrote :

> I am unsure as to whether this is by design or is an error

By design:
«Connects nodes in two paths with lines or with polygons. In the case of lines, it simply draws a line between each corresponding node in the two paths (i.e., a line between the first node of one path and the first node of the other path, etc.). If one path has more nodes than the other, the extra nodes are not used. All the lines are sub-paths of one path. In the case of polygons, a quadrilateral is drawn between corresponding adjacent pairs of points on the two lines. Each quadrilateral is a separate path. All the created paths are placed in a Group. In both cases, the original paths are not changed. »
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Extensions-GenerateFromPath.html#Extensions-Extrude>

Could you please provide a sample drawing illustrating how «if there are three objects selected there should be three extrusions, if there are five objects there should be nine extrusions» is supposed to work/look like?

tags: added: extensions-plugins
Changed in inkscape:
status: New → Incomplete
Alvin Penner (apenner) wrote :

just posted this to the user list, so I'll duplicate the question here:

if you select more than two objects, then there is some ambiguity as to which objects will be extruded, since it looks as if they will have to be extruded in pairs. Would you be interested in the following approach: If items 1,2,3,4, ... are selected then the extrusion will occur pairwise between 1-2, then 1-3, then 1-4, etc. ?

Alvin Penner

~suv (suv-lp) wrote :

Possibly this report is based on a confusion of the two extensions 'Extrude' (connects nodes between _two_ paths) and 'Motion' (connects nodes between original and a generated copy, input is angle/distance per path, works on multiple selected objects)?

Antonio Roberts (hellocatfood) wrote :

@suv
I want to connect the nodes of two different objects (i.e. object 1 may be different object path 2), not copies of the original object. I've attached an illustration that will hopeful show what output I expect when running the extension once on multiple objects

@Alvin Penner
If your comment suggests that _all_ possible pairs are extruded then yes, this is th effect that I'm after. Please see the attachment for a better illustration

Antonio Roberts (hellocatfood) wrote :
description: updated
Alvin Penner (apenner) wrote :

actually, my proposal was that the first object would be special and would be connected to everybody else.

so if you had a total of 5 objects, then there would be 4 extrusions,
while connecting all objects to all objects would lead to 10 extrusions (4+3+2+1).

~suv (suv-lp) wrote :

> my proposal was that the first object would be special and
> would be connected to everybody else.

IMHO this ought to result in a differently named extension then (in my understanding, 'Extrusion' refers to simulating a 3d effect).

Changed in inkscape:
importance: Undecided → Wishlist
status: Incomplete → New
Antonio Roberts (hellocatfood) wrote :

@Alvin
If a user simply clicks and drags over a number of objects how do you/they know which would be the first object

@suv
I misunderstood what Alvin was proposing, so that is not what I'm looking for. I want the existing Extrude extension to work on all selected objects, as shown in the illustration

~suv (suv-lp) wrote :

@Antonio, @Alvin - to clarify my earlier comment (which didn't quote what I actually was referring to): I'm not against implementing changes, but my concern is to not confuse regular users who are familiar with 'Extrude' and 'Motion' to simulate projected 3d-objects generated based on 2d profile paths.

My initial reaction (and apparently Alvin's too) to your report was trying to figure out how detecting corresponding pairs (i.e. precisely _two_) paths from a selection of multiple objects could possibly work, since the existing extension (as is) is designed to work on pairs of two paths: Making it work with multiple selected objects would require some magic which still eludes me.
- How to best detect the pairs of two - selection order, stack order, grouping, … (?) - so that a) the result is as expected (by the regular user), and consistently reproducible and b) the method is unambiguous and obvious (to the user)?
- If instead of finding pairs a single path is used as 'extrusion target' for all other selected paths: is this what users would expect based on how the extension currently works and is described in the manual - or would they rather have the extension applied to multiple pairs instead?

I do understand that your use case of the extensions is different (not related to the initial intention of the extension [1]). Your interpretation of inter-connecting (or meshing) all paths with each other (_all_ possible pairs) does not match IMHO with how the current extension works (on a pair of two paths) - hence my proposal to implement your request (shown in the illustration) as a new extension under a different name.

[1] 'Extrude' originally was the name for the extension which is now called 'Motion' (which matches what e.g. wikipedia tells about 'Extrusion'). Later on, the old 'Extrude' extension had been renamed to 'Motion', and the current 'Extrude' extension added. This already confused many users, and turned into a FAQ in forums and other user support venues, because many existing tutorials had been based on the old 'Extrude' extension. This is the main reason why I'd be cautious to yet again change what 'Extrude' actually does. An extension which inter-connects or (kind of) meshes all possible pairs of multiple paths (and no longer alludes to projected 3d objects created based on two 2d-profiles) might deserve a new name?

Alvin Penner (apenner) wrote :

1. currently the extension simply ignores any paths that are beyond two in the list of selections. Therefore there will be no incompatibility or inconsistency introduced if the extension is modified to use all the objects.

2. >> If a user simply clicks and drags over a number of objects how do you/they know which would be the first object
- good point. If you connect all objects to all objects then the order of selection does not matter. (I have no idea of how the first object is chosen in the case where you use the rubber band to select a group).

I think it would be quite feasible to implement this, will try to take a look at it in the next few weeks or so.

Antonio Roberts (hellocatfood) wrote :

@Alvin,

If you do decide to develop the extension further (which I hope you do!), also consider how grouping objects would affect which objects are paired. For example, should a group still be considered individual objects or treated as one object. Hopefully the attached illustration should explain this further.

I personally think it should be (2), as selecting individual objects with the rubber band I think implies selecting many individual objects, not a grouping of objects (1)

Alvin Penner (apenner) wrote :

attached is a modified version of the extrude extension. As before, it operates only on paths, not on groups.
However, one can now choose as many paths as desired, and they will all be linked pairwise with each other. In the case of two paths, it will behave the same as before.

Alvin Penner (apenner) wrote :

attached is a modified version of extrude.inx. A minor cosmetic change was made so that the combo box would be loaded with a default value in case the extension had never been used before. Previously this combo box was empty on first usage for reasons that I do not understand.

Antonio Roberts (hellocatfood) wrote :

That's brilliant , Alvin! Works as I expected it to

@suv Is there a possibility that this modified script could be included in Inkscape, possibly replacing the current one?

Alvin Penner (apenner) wrote :

if no new issues arise, then I'll commit this to trunk on Wednesday or so...

~suv (suv-lp) wrote :

My POV has not changed ('Extrude' is now a misnomer - only a special case (2 paths selected) produces a visual result resembling an extrusion). Since I don't have a better proposal (and I'd be even more opposed to renaming the extension yet again), I back out of the discussion.

~suv (suv-lp) wrote :

Addendum: @Antonio - I don't twitter, and can't reply your requests there: Please do not rename the extension - this would again obsolete tons of tutorials out there, and confuse users.

Commit the new version as is…

Alvin Penner (apenner) wrote :

committed to bzr rev 11734

Changed in inkscape:
status: New → Fix Committed
~suv (suv-lp) on 2012-10-03
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.49
Antonio Roberts (hellocatfood) wrote :

@suv please once again accept my apologies. I was more attempting to get knowledgeable people to contribute their thoughts and suggestions as I think the concerns that you raised are very valid and should be debated

~suv (suv-lp) wrote :

Antonio Roberts wrote:
> @suv please once again accept my apologies. (…)

@Antonio - no need to apologize, really :-) (I don't fully understand why I got so focused on such an "abstract" detail (I'm fully aware that most users won't even notice the current change, since they probably will rarely run the extension with more than the two paths selected)).

Here's a proposal how the extension could be enhanced to offer more options on how to "extrude" a selection of more than two paths:
-----
Mode: [x] Lines
      [ ] Polygons

With more than two paths selected:
[x] Extrude pairwise (in stack order)
[ ] Extrude all to first selected profile # or: bottom-most path
[ ] Extrude all to last selected profile # or: top-most path
[ ] Interconnect each path with each other (multiple pair-wise)

[ ] Live Preview

[ Close ] [ Apply ]
-----

Notes:
- "Extrude pairwise (in stack order)" would be based on the normal stack order which for example results when duplicating a selection of multiple paths: each duplicate is inserted stacked on top of the original -> the stack order is kind of "sorted pairwise". This option would allow to extrude multiple paths pairwise while keeping the current topic of "Extrusion" as a projected 3d object generated based on two extrusion profiles (paths).
- "Interconnect each path with each other (multiple pair-wise)" would be your requested feature, which generates rather abstract results (compared to the current "topic" as e.g. illustrated in the manual).
- the two remaining options would implement Alvin's proposal from comment #2, and use either the first / last selected (or bottom-/top-most) path as "base" (or "target") extrusion profile. I'm not sure what would be more consistent (selection or stack order), since current extensions don't really seem to follow a convention for this (compare e.g. 'Perspective' versus 'Pattern along Path').

~suv (suv-lp) wrote :

Addendum: with 6 selected paths, these results would be rendered depending on the chosen option:
1) 1-2, 3-4, 5-6
2) 1-2, 1-3, 1-4, 1-5, 1-6
3) 1-6, 2-6, 3-6, 4-6, 5-6
4) 1-2, 1-3, 1-4, 1-5, 1-6, 2-3, 2-4, 2-5 ,2-6, 3-4, 3-5, 3-6, 4-5, 4-6, 5-6

Changed in inkscape:
status: Fix Committed → Incomplete
status: Incomplete → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers