forked from 1b-agent/opencadstudio-upstream
fix(area): measure the curve, not a polygon through some of its points
A hatch's area was not the area of anything. Its boundary was flattened into a ring by pushing an arc's *centre* into it, and a spline's control points — neither of which is on the boundary — and the shoelace formula was run over the result. Boundary edges now go through the kernel, which measures each for what it encloses: an arc contributes its sector, a spline is integrated. AREA had three measurements between them. The bulged-polyline one carried its own arc corrections; the planar entities it did not cover fell through to mass properties. Both are now one call on the entity's curve, which gets the bulges, the ellipse and the spline right in the same place. What is left is the genuinely spatial — a 3D polyline, a spline whose points wander off any plane — measured as rings of points by Newell's method rather than by projecting them flat. Regions were doing the same Newell sum by hand. They share it now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9babf355b1
commit
77a9167e34
4 files changed
+168
-141
No files matched your search
Generated
+1
-1
@@ -935,7 +935,7 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
||||
[[package]]
|
||||
name = "cadkernel"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/HakanSeven12/cadkernel.git#77d8ee9d3ee7f8bfafecbafb0ee3097c4b413ccd"
|
||||
source = "git+https://github.com/HakanSeven12/cadkernel.git#e4c9fe626a60fd1500e8f2264e5a712e939c4027"
|
||||
dependencies = [
|
||||
"cavalier_contours",
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user