Boxes.py with a burn above 0 leaves out an outline's last corner, so
the curved BreadBox sides ended 0.14 mm open and Separate split their
slots and edges into stray parts. Import now closes a subpath of three
or more segments that ends within 0.5 mm of its start, and warns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Boxes.py runs past each corner and straight back before turning. Merging
those overlapping lines dropped the point where the outline turned, so a
BreadBox's curved strips imported open and Separate counted their pieces
as parts. A straight segment that turns back along the previous one now
leaves only their net line; one that returns exactly to its start keeps
the line, as a slit cut there and back.
Text that import reads as a group's name is no longer reported as a
skipped element, so a Boxes.py sheet opens without the partial-import
message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Bezier that ends where it starts, inside a subpath that draws anything
else, imported as a tiny circle and became a hole. Boxes.py draws one at
every inside corner when its burn is above 0, so a SlidingDrawer came in
with 248 fake holes. Import now drops such loops and warns, asking for
burn 0 since the burn also enlarges every part. A loop that is its
subpath's whole drawing still imports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A group with no title that holds exactly one visible text child now
labels its geometry with that text, so Separate Parts names the pieces
of a Boxes.py sheet ("Top", "Wall 1"). Titles still take precedence,
and layer groups never use their text as a name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A file such as a sheet of ornaments imported as one drawing, with every
part but the largest treated as a cutout. PartBodies (Core) now finds the
separate parts by contour nesting, and the CAD Converter offers a
Separate (N) button plus Separate This Part / Separate All Parts in the
entity menu. Each part keeps its entity IDs, so roles, exclusions,
breakoffs, tabbed cutouts and dimensions follow it; separation is refused
when a breakoff or tabbed cutout spans parts.
SVG import keeps element titles as labeled regions, which name the
separated parts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CAD Converter's Export button only wrote DXF (or SVG) with every entity on
layer 0 and no bends, so a re-imported export lost its bends and turned the
bend etch marks into cut geometry. Exporting now goes through a new
OpenNest.IO CadExporter:
- DXF R14-2018, DWG 2004-2018 or SVG. ACadSharp cannot write DWG 2007, and
its DWG 2000/R14 output loses entities and layers, so those are not offered.
- Entities keep their layers; etch marks land on ETCH, which import drops and
regenerates from the bends. A line picked as a bend is written only as it.
- DXF/DWG bends are BEND-layer CENTER lines with an "UP 90° R 0.06" MText note,
the form SolidWorksBendDetector reads. Pre-2007 files escape non-ASCII note
text as \U+XXXX, since ACadSharp reads raw non-ASCII back mangled.
- SVG bends are lines in a BEND group with data-bend-* attributes; the SVG
reader now returns them as bends (scaled with the drawing units) instead of
dropping the layer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Geometry, nesting and import code now call PortableMath instead of
System.Math for Sin, Cos, Tan, Atan, Atan2, Asin and Acos (Core, Engine,
IO, Data; 269 calls in 64 files). A test fails if those projects call the
runtime's trig again.
With the runtime's trig, Windows and Linux disagreed in the last bit at
non-quarter angles and the same job could nest differently: the
learned-angle nests (a cross fixture) placed 23 parts in Strip on Windows
and 28 on Linux. Now every Engine.Tests pin gives the same layout on both
(3600 passing on Linux and on DesktopPC), Linux layouts are unchanged, and
the learned-angle rows are re-pinned to the shared layouts, which pass the
overlap and work-area checks, and run on every platform again.
Fixes Project Memory 518f3b58.
AutoCAD keeps an open DWG/DXF locked for writing, and ACadSharp's path
constructors (and File.OpenRead / XmlReader.Create) deny write sharing,
so the CAD Converter could not import a part while it was open in
AutoCAD. Open source files read-only with read/write sharing instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show Original drew nothing until Simplify ran, and then showed entities that
had already been through import cleanup. The importers now capture the
entities before any optimization and the overlay draws those from load, while
Simplify keeps starting from the cleaned entities.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Customers and design tools hand over SVGs, and getting them in meant a
trip through another CAD tool. CadImporter now reads them like any other
drawing, and plates, programs and converter entities can be written out.
An SVG's numbers are not drawing units, so import converts to the nest's
units and never guesses: only an absolute width or height counts as a
stated size, since px means 1/96 in to browsers but 1/72 in to
Illustrator. Without one the desktop asks, showing the size each choice
gives, and headless callers must pass the scale or the import fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>