issue198:inkscape
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue198:inkscape [2023/10/29 06:59] – d52fr | issue198:inkscape [2023/10/31 11:59] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
Before I proceed too far, a note for the pedants: I’ll refer to all these tools under the umbrella of “Boolean operations” for convenience. Technically speaking, the true Boolean operations are those that are based on Boolean algebra – a branch of mathematics named after George Boole, who formalised it in 1847. Only a few of the tools in the Path menu actually work in a strictly Boolean manner. But given that those tools are concerned with creating new shapes by combining and removing overlapping parts of multiple paths, it makes sense that other tools which achieve similar goals are grouped with them in the same menu. So for the purposes of simplicity, all the shape manipulation tools under the Path menu are Boolean operations as far as this column is concerned.** | Before I proceed too far, a note for the pedants: I’ll refer to all these tools under the umbrella of “Boolean operations” for convenience. Technically speaking, the true Boolean operations are those that are based on Boolean algebra – a branch of mathematics named after George Boole, who formalised it in 1847. Only a few of the tools in the Path menu actually work in a strictly Boolean manner. But given that those tools are concerned with creating new shapes by combining and removing overlapping parts of multiple paths, it makes sense that other tools which achieve similar goals are grouped with them in the same menu. So for the purposes of simplicity, all the shape manipulation tools under the Path menu are Boolean operations as far as this column is concerned.** | ||
+ | |||
+ | Le mois dernier, j'ai jeté un coup d'œil au nouvel outil de construction de formes (Shape Builder) dans Inkscape 1.3, qui offre un moyen très pratique d' | ||
+ | |||
+ | Avant d' | ||
+ | |||
**This month, we’ll look at the first new addition, which was introduced in Inkscape 1.2: Path > Split Path. This is a little like the existing Path > Break Apart feature, except that it breaks paths apart in a way that probably makes more sense – and will be more useful – to most people. Let’s start with a very simple example: here I’ve used Path > Difference to cut one circle out of the center of another, creating a donut shape. I’ve then duplicated the donut, and used Path > Combine (or Path > Union) to convert the whole arrangement into a single, complex path. As a quick reminder, I use the term ‘complex path’ to refer to any path which is made up of multiple sub-paths. | **This month, we’ll look at the first new addition, which was introduced in Inkscape 1.2: Path > Split Path. This is a little like the existing Path > Break Apart feature, except that it breaks paths apart in a way that probably makes more sense – and will be more useful – to most people. Let’s start with a very simple example: here I’ve used Path > Difference to cut one circle out of the center of another, creating a donut shape. I’ve then duplicated the donut, and used Path > Combine (or Path > Union) to convert the whole arrangement into a single, complex path. As a quick reminder, I use the term ‘complex path’ to refer to any path which is made up of multiple sub-paths. | ||
With the Node tool active, you can see from the image that there are four sub-paths, one for each dark-red circle, and each consisting of four nodes. Let’s suppose that a little later we decide that it would be better to separate these objects in order to move them around independently. In previous versions, a naive user might reach for Path > Break Apart, only to be rather disappointed with the result.** | With the Node tool active, you can see from the image that there are four sub-paths, one for each dark-red circle, and each consisting of four nodes. Let’s suppose that a little later we decide that it would be better to separate these objects in order to move them around independently. In previous versions, a naive user might reach for Path > Break Apart, only to be rather disappointed with the result.** | ||
+ | |||
+ | Ce mois-ci, nous allons examiner la première nouveauté, qui a été introduite dans Inkscape 1.2 : Chemin > Découper chemin (celui du bas). Cette fonction ressemble un peu à la fonction existante Chemin > Séparer, sauf qu' | ||
+ | |||
+ | Avec l' | ||
+ | |||
**Break Apart reduces a complex path to a collection of individual simple paths, by breaking each sub-path out into a separate object. In this case, we end up with four separate path objects, but because the larger paths no longer have a hole in the middle, their fill obscures the fact that there are a couple of smaller paths behind. Sending the outer circles down in the z-stack makes things a little more obvious – this screenshot leaves the left-hand circles untouched, but moves the large right-hand circle to the bottom of the stack. | **Break Apart reduces a complex path to a collection of individual simple paths, by breaking each sub-path out into a separate object. In this case, we end up with four separate path objects, but because the larger paths no longer have a hole in the middle, their fill obscures the fact that there are a couple of smaller paths behind. Sending the outer circles down in the z-stack makes things a little more obvious – this screenshot leaves the left-hand circles untouched, but moves the large right-hand circle to the bottom of the stack. | ||
That may have made it a bit clearer what has happened, but it doesn’t really get us to the result we wanted – two separate donuts. For that, we have to select the two circles on the left and use Path > Combine, followed by doing the same to the two circles on the right. Finally we have two complex paths, each representing a single donut, which can be moved independently.** | That may have made it a bit clearer what has happened, but it doesn’t really get us to the result we wanted – two separate donuts. For that, we have to select the two circles on the left and use Path > Combine, followed by doing the same to the two circles on the right. Finally we have two complex paths, each representing a single donut, which can be moved independently.** | ||
+ | |||
+ | Séparer réduit un chemin complexe à une collection de chemins simples individuels, | ||
+ | |||
+ | Cela permet de comprendre un peu plus clairement ce qui s'est passé, mais cela ne nous permet pas vraiment d' | ||
+ | |||
**In this particular case, a user who is already familiar with the behaviour of Break Apart might have chosen to duplicate the original and cut half the content out from each copy using direct node editing, or some other Boolean technique that involves creating a quick sacrificial cutting shape. But for a more complex shape with lots of sub-paths, those approaches can quickly become unwieldy. Whichever approach you take, there’s no doubt that it’s a lot of steps just to split two visually separate objects into individual complex paths. | **In this particular case, a user who is already familiar with the behaviour of Break Apart might have chosen to duplicate the original and cut half the content out from each copy using direct node editing, or some other Boolean technique that involves creating a quick sacrificial cutting shape. But for a more complex shape with lots of sub-paths, those approaches can quickly become unwieldy. Whichever approach you take, there’s no doubt that it’s a lot of steps just to split two visually separate objects into individual complex paths. | ||
Now let’s try the same thing using Path > Split Path. Starting with our complex path containing four sub-paths, applying this function gets us directly to the desired outcome (the same as the previous screenshot), | Now let’s try the same thing using Path > Split Path. Starting with our complex path containing four sub-paths, applying this function gets us directly to the desired outcome (the same as the previous screenshot), | ||
+ | |||
+ | Dans ce cas particulier, | ||
+ | |||
+ | Essayons maintenant de faire la même chose en utilisant Chemin > Découper le chemin (celui du bas). En partant de notre chemin complexe contenant quatre sous-chemins, | ||
+ | |||
**Of course Inkscape isn’t able to read your mind to determine how you want it to split your four sub-paths, and there are still cases where Break Apart might be the better option, so it’s important to understand the logic used within this new feature. Quite simply, it breaks your path based on whether the sub-paths overlap or not. Any group of overlapping sub-paths will be split out into a new complex path. An individual sub-path that doesn’t overlap with any other sub-path will be split out into its own new simple path. The net result is that a previously complex combination of shapes will be broken up into independent objects, based (broadly) on how visually separate they are. | **Of course Inkscape isn’t able to read your mind to determine how you want it to split your four sub-paths, and there are still cases where Break Apart might be the better option, so it’s important to understand the logic used within this new feature. Quite simply, it breaks your path based on whether the sub-paths overlap or not. Any group of overlapping sub-paths will be split out into a new complex path. An individual sub-path that doesn’t overlap with any other sub-path will be split out into its own new simple path. The net result is that a previously complex combination of shapes will be broken up into independent objects, based (broadly) on how visually separate they are. | ||
An example with two donuts makes for a good introduction, | An example with two donuts makes for a good introduction, | ||
+ | |||
+ | Bien sûr, Inkscape n'est pas capable de lire dans vos pensées pour déterminer comment vous voulez qu'il divise vos quatre sous-chemins et il y a toujours des cas où Séparer peut être la meilleure option. Il est donc important de comprendre la logique utilisée par cette nouvelle fonctionnalité. Tout simplement, elle divise votre chemin en fonction du fait que les sous-chemins se chevauchent ou non. Tout groupe de sous-chemins qui se chevauchent sera divisé en un nouveau chemin complexe. Un sous-chemin individuel qui ne se chevauche avec aucun autre sous-chemin sera divisé en un nouveau chemin simple. Le résultat net est qu'une combinaison de formes auparavant complexe sera divisée en objets indépendants, | ||
+ | |||
+ | Un exemple avec deux beignets constitue une bonne introduction, | ||
+ | |||
**Use Path > Split Path, however, and the result is a lot closer to what you probably wanted. | **Use Path > Split Path, however, and the result is a lot closer to what you probably wanted. | ||
Ligne 24: | Ligne 49: | ||
Another gotcha with this feature is Inkscape’s notion of what constitutes a non-overlapping path. Consider this variation on our earlier donut, this time with an additional ‘island’ in the middle.** | Another gotcha with this feature is Inkscape’s notion of what constitutes a non-overlapping path. Consider this variation on our earlier donut, this time with an additional ‘island’ in the middle.** | ||
+ | |||
+ | Cependant, si vous utilisez Chemin > Découper le chemin (celui du bas), vous obtiendrez un résultat beaucoup plus proche de ce que vous souhaitiez probablement. | ||
+ | |||
+ | Sachez toutefois que ce n'est pas parfait. Inkscape ne sait pas que ce chemin représente des caractères, | ||
+ | |||
+ | Un autre problème avec cette fonctionnalité est la notion d' | ||
+ | |||
**What do you think Path > Split Path will do in this case? It’s pretty clear that the nodes for the island are all inside the outer sub-path, and therefore can be considered to be overlapping. Sure enough, Split Path has no effect on this shape at all. But what about this one? | **What do you think Path > Split Path will do in this case? It’s pretty clear that the nodes for the island are all inside the outer sub-path, and therefore can be considered to be overlapping. Sure enough, Split Path has no effect on this shape at all. But what about this one? | ||
Ligne 30: | Ligne 62: | ||
Now let’s extend that example a little further by moving the ends of the broken shape so that they cross.** | Now let’s extend that example a little further by moving the ends of the broken shape so that they cross.** | ||
+ | |||
+ | Que pensez-vous que Chemin > Découper le chemin (celui du bas) fera dans ce cas ? Il est clair que les noeuds de l'île se trouvent tous à l' | ||
+ | |||
+ | Cette fois, la forme extérieure présente un petit espace sur le côté droit. Le trait épais le dissimule quelque peu, mais il est là. À l'œil nu, on pourrait considérer que l'île se trouve « à l' | ||
+ | |||
+ | Étendons maintenant cet exemple un peu plus avant en déplaçant les deux extrémités de la forme brisée de façon qu' | ||
+ | |||
**From a human perspective the island is most definitely inside the shape this time. But, again, in mathematical terms, the two paths are not overlapping, | **From a human perspective the island is most definitely inside the shape this time. But, again, in mathematical terms, the two paths are not overlapping, | ||
I really wish this tool had been available a few years ago, when I was writing a weekly comic strip for my local newspaper. I created it in collaboration with Vince, a far more artistically competent friend. In order to turn the strips round quickly, he would draw the various elements of each comic separately on a sheet of paper, and I would then scan the entire sheet and trace it with Inkscape. Here’s an example of a typical character sheet, after scanning and tracing.** | I really wish this tool had been available a few years ago, when I was writing a weekly comic strip for my local newspaper. I created it in collaboration with Vince, a far more artistically competent friend. In order to turn the strips round quickly, he would draw the various elements of each comic separately on a sheet of paper, and I would then scan the entire sheet and trace it with Inkscape. Here’s an example of a typical character sheet, after scanning and tracing.** | ||
+ | |||
+ | D'un point de vue humain, l'île se trouve cette fois à l' | ||
+ | |||
+ | J' | ||
+ | |||
**The problem here is that Inkscape’s Trace Bitmap feature produces a single complex path for the entire traced image. In this case the path consists of over 15,000 nodes! Part of my job was therefore to create numerous duplicates of the traced image, each overlaid with a different cutting path. Path > Intersection was then used on each pair, removing all the parts that were not covered by the cutting path in each case. The final result was a separate complex path for each character or part on the sheet. | **The problem here is that Inkscape’s Trace Bitmap feature produces a single complex path for the entire traced image. In this case the path consists of over 15,000 nodes! Part of my job was therefore to create numerous duplicates of the traced image, each overlaid with a different cutting path. Path > Intersection was then used on each pair, removing all the parts that were not covered by the cutting path in each case. The final result was a separate complex path for each character or part on the sheet. | ||
Ligne 40: | Ligne 84: | ||
The first three images are perfectly cut out, and ready to go. The last one on the top row requires a small amount of re-combining to ensure that the shadow and the movement marks all remain with the character. The bottom row did a little worse, though it’s hard to see from this screenshot. For each head there are some small elements – a wart here, an eye there – which have been split into separate paths. These are all due to the fact that the neck is not closed off, resulting in what Inkscape sees as an open shape, much like the broken circle I presented earlier. A little re-combining fixes the issue, but in reality we would have quickly learned that, while drawing, Vince should close the end of the shape in such situations, reducing the problem going forwards. Across dozens of character sheets and pages of props and backgrounds, | The first three images are perfectly cut out, and ready to go. The last one on the top row requires a small amount of re-combining to ensure that the shadow and the movement marks all remain with the character. The bottom row did a little worse, though it’s hard to see from this screenshot. For each head there are some small elements – a wart here, an eye there – which have been split into separate paths. These are all due to the fact that the neck is not closed off, resulting in what Inkscape sees as an open shape, much like the broken circle I presented earlier. A little re-combining fixes the issue, but in reality we would have quickly learned that, while drawing, Vince should close the end of the shape in such situations, reducing the problem going forwards. Across dozens of character sheets and pages of props and backgrounds, | ||
+ | |||
+ | Le problème est que la fonction « Vectoriser un objet matriciel » d' | ||
+ | |||
+ | Comment se comporte Chemin > Découper le chemin (celui du bas) face à une telle tâche ? Pas mal du tout, en fin de compte. | ||
+ | |||
+ | Les trois premières images sont parfaitement découpées et prêtes à l' | ||
+ | |||
**If you frequently work with complex paths, text-as-paths, | **If you frequently work with complex paths, text-as-paths, | ||
Next month, I’ll continue this theme, to take a look at the new Boolean operations that were added with Inkscape 1.3.** | Next month, I’ll continue this theme, to take a look at the new Boolean operations that were added with Inkscape 1.3.** | ||
+ | |||
+ | Si vous travaillez fréquemment avec des tracés complexes, du texte sous forme de tracé ou des tracés bitmap, j' | ||
+ | |||
+ | Le mois prochain, je poursuivrai sur ce thème, en jetant un coup d'œil aux nouvelles opérations booléennes qui ont été ajoutées à Inkscape 1.3. | ||
issue198/inkscape.1698559146.txt.gz · Dernière modification : 2023/10/29 06:59 de d52fr