Skip to content

HCAD v0.25.0 — snap helpers, assembly sections, dimensions that hold

Pre-release
Pre-release

Choose a tag to compare

@Tibiaworx Tibiaworx released this 09 Aug 03:13
· 76 commits to main since this release

Three things, all about geometry staying where you put it.

Snap helpers for slots and polygons

Lines already pinned their endpoints onto body features, and that lock is what stops the small ledges: an unpinned point keeps a degree of freedom, so a later solve slides it a few microns off the edge it was snapped to and the extruded wall misses the one below it. Slots used the unpinned path; polygons never welded at all.

  • Slots pin their end centres (and an arc slot's bend point) like a line's endpoints.
  • Polygons pin their centre onto a hole or face centre, and any vertex onto a body corner. A polygon vertex can now snap to body features at all, which it previously could not.

The lock takes a deliberate aim — a quarter of the snap radius, the same tolerance lines use. The full radius grows with zoom, and using it here is what used to yank a polygon vertex across the screen to a far target. A point merely nearby stays free, and so does anything drawn in open space: pinning points you never aimed would quietly make the sketch undraggable.

Section views in assembly mode

The section state was already there; nothing applied it. Components share one cached mesh per part, but a single world plane meets two instances of that part differently — so the cut has to be per instance, or the second copy comes out cut in the wrong place and any fit you read off it is a lie.

Each component's mesh is now cut in its own frame, by carrying the plane into it rather than the mesh into the world. Cuts follow explode, component edges are filtered to the kept half so they do not hang in the air past the plane, and a part lying wholly past it is hidden rather than drawn uncut.

Dimensions that hold their anchor

A plain solve spread the correction over both endpoints, so a 20 mm side set to 30 landed at -5 and 25: right size, right shape, slid sideways under the rest of the sketch.

The anchor now goes to the end the body is holding — a corner welded to a body vertex, or one snapped onto a body edge carrying a PointOnLine. Dimensioning a side moves the free end and leaves the attached one on the geometry it was drawn against. Without that, a box sitting on an edge had its bottom corner pushed off and sheared into a trapezoid. With neither end attached it holds the end you picked first.

Dimensioning a side of a closed four-sided loop also ties the opposite side to it with an Equal relation. The far side stays undefined but always matches, so the box keeps its shape without a second dimension over-defining it.

And a silent failure alongside: a side with both ends locked to the body used to swallow its dimension without a word. It now reports what was asked against what the sketch could actually reach.

Verification

268 tests. Each fix has a test confirmed to fail on the old code: the slot and polygon locks, the box on a body edge losing its bottom corner, the square sliding sideways. The assembly section is checked by shifting an instance along the plane normal and confirming it cuts where it sits.

Known issue

A box carrying Horizontal/Vertical relations whose corners are pinned to a body edge that is not parallel to the sketch axes can still report "Over defined — conflicting relations". The anchoring change stops that showing up as a sheared box, but the underlying conflict is untouched.


Install

Windows: download hcad-v0.25.0-windows-x86_64.exe and run it.

Linux (AppImage): download hcad-v0.25.0-linux-x86_64.AppImage below, then:

chmod +x hcad-v0.25.0-linux-x86_64.AppImage
./hcad-v0.25.0-linux-x86_64.AppImage

Self-contained — no install needed. Requires a working Vulkan driver and xdg-desktop-portal (standard on modern desktops). Built for x86_64, glibc 2.39+ (Ubuntu 24.04+ / Fedora 40+ etc.).