跳到正文
DEV Community· FrameSprite·· 2 小時前AI 評分35

為何 Inkscape 的布林切割會忽略可見描邊寬度?

Why does an Inkscape Boolean cut ignore the visible stroke width?

AI 導讀

Inkscape 的布林差集可能依據描邊底層的中心線路徑,而非畫面上可見的粗描邊;應先複製描邊並轉換為路徑,再用作切割器。保留原始中心線可便於日後調整通道寬度,並應檢查 32 和 64 像素匯出圖中的最小開口;文中所述流程尚未在編輯器或遊戲中實際執行。

正文

Disclosure: This draft was generated with AI and checked against the cited primary sources, with a separate AI editorial review. It was prepared for the FrameSprite team, which has a commercial interest in FrameSprite. Proposed examples are not executed tests unless explicitly identified as recorded fixture results.

A visible stroke and its underlying path are different geometry. If a thick line should cut a channel through an emblem, convert a duplicate of that stroke to a path before subtracting it. Otherwise, the Boolean operation may use a shape that does not match the thick outline you see.

Key Takeaways

  • Object to Path and Stroke to Path solve different conversion problems.
  • Preserve the original centerline if you need to edit the channel width later.
  • Confirm the cut at the shipped icon size, including its smallest opening.

Establish whether the cutter is a filled area

Select the intended cutter and inspect its fill and stroke separately. The Strokes manual explains that a stroke has its own paint and width. A line can appear broad while its underlying path still represents only a centerline.

Duplicate that object before converting it. In the Node Tool options, Stroke to Path converts the stroke into separate path geometry. Do not assume converting a rectangle or text object with Object to Path has also converted every visible stroke outline into the desired cutter.

Perform the subtraction with clear ownership

Place the filled cutter above the emblem you want to modify. Select both and apply the intended Boolean operation. The Boolean Operations guide documents Difference and the relevance of stacking order. Preserve a copy of the target too, because a destructive subtraction is not an editable channel-width control.

Temporarily remove decorative strokes from the result when checking the actual hole. A dark outline can conceal a sliver of remaining fill or make an opening look larger than it is. Use a contrasting background behind the emblem to identify real negative space.

Intended result Required representation
A decorative line on the emblem Stroke can remain a stroke
A wide channel removed from the emblem Filled cutter matching the stroke outline
An editable family of channel widths Preserved source centerline and repeatable conversion

Check the smallest usable opening

Consider a proposed, unexecuted example: a faction shield needs a diagonal slit following a curved line. The editor preview shows a thick red cutter. Converting its stroke outline makes that width explicit. After subtraction, export at 32 and 64 pixels and inspect whether the slit remains open at both sizes.

If the slit closes only in the smaller PNG, the Boolean result may be geometrically correct while the detail is too narrow for that raster output. Widen the intended channel or author a small-size variant. Repeating Difference with a different stacking order will not solve a detail that disappears during rasterization.

If the cutter creates unexpected end shapes, inspect its caps before conversion. Those visible shapes become part of the filled cutter. Choose them deliberately instead of trimming the final hole by eye without preserving the source.

Hand off both source intent and final pixels

Keep the original emblem and centerline in an editable source copy, with clear visibility states. Deliver the approved runtime export separately. Check that hidden source objects do not accidentally reappear in an export batch.

Related guides cover Combine versus Union and holes, stroke cap effects on weapon length and choosing an Inkscape export area. This workflow has not been executed in an editor or game; approval requires the actual Boolean result and its raster deliverables.

Written by the FrameSprite Workflow Team. Report a correction.

來源:DEV Community · dev.to