はしくれエンジニアもどきのメモ

情報系技術・哲学・デザインなどの勉強メモ・備忘録です。

Illustrator, Inkscape で、パスファインダ・ブーリアン演算

Illustrator, Inkscape で、パスファインダ・ブーリアン演算

Illustrator のパスファインダ、Inkscape ではブーリアン演算についてまとめておきます。

パスファインダ・ブーリアン演算の種類

Illustrator のパスファインダ(形状モード)とInkscapeブーリアン演算の対応を 以下にまとめます(機能すべてではないです)。

IllustratorInkscape
合体(形状エリアに追加) 統合 Ctrl + +
形状エリアから前面オブジェクトで型抜き 差分 Ctrl + -
形状エリアを交差 f:id:cartman0:20151016015231j:plain 交差 Ctrl + *
重なりあう形状エリアを除外(中マド) 排他 Ctrl + ^
分割(パスファインダ) 分割 Ctrl + /

正方形(青、背面)の上に正円(赤不透明度70%、前面)を重ねたオブジェクトを 例にそれぞれ見ていきます。

元のオブジェクト

合体・統合

Illustrator では、 「合体」や「形状エリアに追加」と呼ばれ、Inkscape では、「統合」と呼ばれます。

Illustrator では、前面オブジェクトが基準となり、1つのオブジェクトになります。 Inkscape では、逆に、背面オブジェクトが基準となります。

Illustrator の場合「合体」

Illustrator では前面オブジェクトが基準となるので、 赤いAND素子のようなオブジェクトができる。

合体

Inkscape の場合「統合」

ショートカットキーCtrl + + で「統合」できる。

<rdf:rdf> <cc:work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"> <dc:title></dc:title> </dc:type></cc:work> </rdf:rdf>
統合

型抜き・差分

Illustrator では、 「形状エリアから前面オブジェクトで型抜き」と呼ばれ、Inkscape では、「差分」と呼ばれます。 bool演算でいうところの引き算です。

Illustrator の場合「型抜き」

円オブジェクトで型抜かれ、 青の正方形オブジェクトが残ります。

形状エリアから前面オブジェクトで型抜き

Inkscape の場合「差分」

ショートカットキー Ctrl + - で 「差分」になります。

<rdf:rdf> <cc:work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"> <dc:title></dc:title> </dc:type></cc:work> </rdf:rdf>
差分

交差

AND演算です。2つのオブジェクトの被っている部分のみが残ります。

Illustrator の場合「交差」

Illustrator では前面が基準となるので、赤の半円のみ残ります。

形状エリアを交差

Inkscape の場合「交差」

ショートカットキー Ctrl + * で「交差」になります。

Inkscape では背面が基準となるので、青の半円ができる。

<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer1" inkscape:cx="-9.3696981" inkscape:cy="-17.196206" inkscape:document-units="px" inkscape:object-nodes="true" inkscape:object-paths="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:snap-bbox="true" inkscape:snap-intersection-paths="true" inkscape:snap-smooth-nodes="true" inkscape:window-height="746" inkscape:window-maximized="1" inkscape:window-width="1298" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:zoom="1.4" pagecolor="#ffffff" showgrid="false" units="px"></sodipodi:namedview> <rdf:rdf> <cc:work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"> <dc:title></dc:title> </dc:type></cc:work> </rdf:rdf>
交差

中マド・排他

Illustrator では、「重なりあう形状エリアを除外」や「中マド」と呼ばれ、 Inkscape では、「排他」と呼ばれます。要は排他的論理和で、 重なっている部分が消え、それ以外が残ります。

Illustrator の場合「中マド」

前面が基準となるので赤色で、半円が抜けたようなオブジェクトになります。

重なりあう形状エリアを除外(中マド)

Inkscape の場合「排他」

ショートカットキーCtrl + ^ で「排他」になります。

前面が基準となるので、青色になります。

<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" fit-margin-bottom="0" fit-margin-left="0" fit-margin-right="0" fit-margin-top="0" id="base" inkscape:current-layer="layer1" inkscape:cx="-7.572324" inkscape:cy="-17.196174" inkscape:document-units="px" inkscape:object-nodes="true" inkscape:object-paths="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:snap-bbox="true" inkscape:snap-intersection-paths="true" inkscape:snap-smooth-nodes="true" inkscape:window-height="746" inkscape:window-maximized="1" inkscape:window-width="1298" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:zoom="1.4" pagecolor="#ffffff" showgrid="false" units="px"></sodipodi:namedview> <rdf:rdf> <cc:work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"> <dc:title></dc:title> </dc:type></cc:work> </rdf:rdf>
排他

分割

「分割」すると、パスを境に切り離しができる。

Illustrator の場合「分割」

 

分割

Inkscape の場合「分割」

Illustrator と少し違って、 背面オブジェクトが基準となり、 被っていない部分(半円)は削除される。

<rdf:rdf> <cc:work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"> <dc:title></dc:title> </dc:type></cc:work> </rdf:rdf>
分割