fix(com): hatch islands on a live seat — typed edges become temporary entities
hatch_add_boundary was refused on COM (hatch_edge_paths), so a transverse section of any hollow part — a bushing, a flange bore — could not be drawn in AutoCAD at all: draw_prims asked the capability map and refused up front. ActiveX takes a loop as whole objects, which is not the same as "cannot take a typed edge": each edge now becomes a real temporary LINE, true ARC or ELLIPSE in the hatch's own space, appended with AppendInnerLoop, evaluated and deleted. A loop that is only chained lines becomes one closed polyline — one COM call instead of 180 for a flattened bore. The edge list is validated in full first with the headless engine's messages; a loop AutoCAD refuses is taken back out with its temporaries. Measured on AutoCAD 2026 (25.1s), in scratch documents closed unsaved: - a two-arc island leaves exactly 10000 - 100*pi (9685.8407) of a 100 x 100 hatch; - the OD40/ID20 sleeve's transverse section B-B, drawn through the view engine and draw_prims, hatches 942.2864 mm2 — the engine's declared 180-gon; - an open chain is refused (E_FAIL) and the entity count is unchanged. hatch_edge_paths is now supported on both engines. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e6f685643d
commit
2bba18d0f7
@@ -1859,12 +1859,15 @@ async def hatch_add_boundary(
|
||||
],
|
||||
ctx: Context = None,
|
||||
) -> dict:
|
||||
"""Add one boundary path built from typed edges.
|
||||
"""Add one boundary path built from typed edges - an island inside the hatch.
|
||||
|
||||
Typed edges exist because a boundary that only accepts vertex lists
|
||||
silently straightens every curve it is given. Every edge is validated
|
||||
before any is written, so a malformed list refuses instead of leaving a
|
||||
half-built path.
|
||||
half-built path. Both engines: headlessly the edges become an edge path;
|
||||
on a live seat each becomes a temporary LINE, true ARC or ELLIPSE appended
|
||||
as an inner loop and then deleted (a chain of lines becomes one polyline).
|
||||
A loop that does not close is refused by AutoCAD and nothing is added.
|
||||
"""
|
||||
return await _backend(ctx).hatch_add_boundary(handle, edges)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user