wip(l59): open helix shaft (ledge open to the core) -- PARKED: jagged inner ramp edge, audit ROI missed it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-25 20:27:04 +01:00
1 parent 6c6cc37e1d
commit 54ba1b49ab
17 files changed
+1167 -172

No files matched your search

+32 -5
View File
@@ -1032,8 +1032,9 @@ namespace
constexpr double FloorToSoffit=2.6;
constexpr double Pitch=5.0;
constexpr int Turns=4;
constexpr double RampSupportDepth=1.0;
constexpr double FloorBlend=1.9;
constexpr double FeatureUnionBlend=0.05;
constexpr double FeatureUnionBlend=1.0;
constexpr double CorridorSpacing=14.0;
constexpr double MazeCellSpan=16.0;
constexpr double RouteGradeLimit=13.0;
@@ -1053,7 +1054,7 @@ namespace
{for(int byte=0;byte<8;++byte){hash^=static_cast<std::uint8_t>(word>>(byte*8));hash*=1099511628211ull;}};
addWord(static_cast<std::uint32_t>(seed));
addWord(static_cast<std::uint32_t>(latticeStrateIndex));
addWord(1);
addWord(NativeLatticeFieldRecipeVersion);
for(unsigned char value:stableId){hash^=value;hash*=1099511628211ull;}
hash^=hash>>30;hash*=0xbf58476d1ce4e5b9ull;
hash^=hash>>27;hash*=0x94d049bb133111ebull;
@@ -1083,7 +1084,8 @@ namespace
edge.boreRadiusMicrometres=1500000;
edge.boreHeightMicrometres=static_cast<std::int64_t>(
std::llround(FloorToSoffit*1.0e6));
edge.floorSupportDepthMicrometres=1000000;
edge.floorSupportDepthMicrometres=static_cast<std::int64_t>(
std::llround(RampSupportDepth*1.0e6));
edge.smoothWidthMicrometres=static_cast<std::int64_t>(std::llround(FloorBlend*1.0e6));
edge.unionWidthMicrometres=static_cast<std::int64_t>(
std::llround(FeatureUnionBlend*1.0e6));
@@ -1121,6 +1123,26 @@ namespace
helixEnd[1]+orphanOffset[1],helixEnd[2]});
const std::string departureRoomId="lattice/spine/departure-room-v1";
addRoom(departureRoomId,{departure[0],departure[1],departureFloor});
constexpr double ShaftCoreRadius=CenterlineRadius-ClearWidth*0.5;
constexpr double ShaftCoreBottomExtension=2.0;
constexpr double ShaftCoreTopExtension=8.0;
const double shaftCoreBottom=helixEndFloor-ShaftCoreBottomExtension;
const double shaftCoreTop=helixStart[2]+ShaftCoreTopExtension;
ResolvedCavernRoomV1 shaftCore;
shaftCore.stableId="lattice/spine/shaft-core-v2";
shaftCore.strateIndex=latticeStrateIndex;
shaftCore.centerMicrometres=micronPoint({
helixCenter[0]+orphanOffset[0],helixCenter[1]+orphanOffset[1],
(shaftCoreBottom+shaftCoreTop)*0.5});
shaftCore.halfExtentsMicrometres={
static_cast<std::int64_t>(std::llround(ShaftCoreRadius*1.0e6)),
static_cast<std::int64_t>(std::llround(ShaftCoreRadius*1.0e6)),
static_cast<std::int64_t>(std::llround((shaftCoreTop-shaftCoreBottom)*0.5e6))};
shaftCore.floorMicrometres=static_cast<std::int64_t>(
std::llround(shaftCoreBottom*1.0e6));
shaftCore.smoothWidthMicrometres=0;
shaftCore.unionWidthMicrometres=0;
rooms.push_back(std::move(shaftCore));
edges.push_back(addEdge("lattice/spine/00-arrival-portal-v1",
arrivals.front()->stableId+"/lower-mouth",arrivalRoomId,
{{arrival[0],arrival[1],arrivalFloor},helixStart}));
@@ -1220,9 +1242,14 @@ namespace
std::printf("[LatticeResolvedMouths] arrival=%s side=lower xyz_m=(%.3f,%.3f,%.3f) departure=%s side=upper xyz_m=(%.3f,%.3f,%.3f) binding=actual-resolved status=PASS\n",
arrivals.front()->stableId.c_str(),arrival[0],arrival[1],arrival[2],
departures.front()->stableId.c_str(),departure[0],departure[1],departure[2]);
std::printf("[LatticeSpinePlan] recipe=Core.Lattice.PrimitiveField version=1 strate=%d stable_key=seed,strate,recipe_version,stable_id spine_first=true arrival=%s departure=%s helix_id=lattice/spine/01-helix-ramp-v1 centerline_radius_m=%.3f clear_width_m=%.3f pitch_m=%.3f turns=%d floor_to_soffit_m=%.3f centerline_grade_deg=%.3f inner_edge_grade_deg=%.3f floor_blend_m=%.3f union_envelope_m=%.3f maze_cells=%d dead_ends=2 orphan_control=%s status=PASS\n",
std::printf("[LatticeSpinePlan] recipe=Core.Lattice.PrimitiveField version=%u strate=%d stable_key=seed,strate,recipe_version,stable_id spine_first=true arrival=%s departure=%s helix_id=lattice/spine/01-helix-ramp-v1 shaft_core_id=%s shaft_core_radius_m=%.3f centerline_radius_m=%.3f clear_width_m=%.3f pitch_m=%.3f turns=%d inner_edge_margin_m=%.3f capsule_drop_clearance_m=%.3f support_depth_m=%.3f ramp_vertical_clearance_m=%.3f shaft_outer_envelope_m=%.3f maze_headroom_m=%.3f centerline_grade_deg=%.3f inner_edge_grade_deg=%.3f floor_blend_m=%.3f union_envelope_m=%.3f maze_cells=%d dead_ends=2 orphan_control=%s status=PASS\n",
NativeLatticeFieldRecipeVersion,
latticeStrateIndex,arrivals.front()->stableId.c_str(),departures.front()->stableId.c_str(),
CenterlineRadius,ClearWidth,Pitch,Turns,FloorToSoffit,centerlineGrade,innerEdgeGrade,
"lattice/spine/shaft-core-v2",ShaftCoreRadius,CenterlineRadius,ClearWidth,Pitch,Turns,
CenterlineRadius-ShaftCoreRadius,CenterlineRadius-ShaftCoreRadius-0.34,
RampSupportDepth,Pitch-RampSupportDepth,
2.0*(CenterlineRadius+ClearWidth*0.5+3.0),
FloorToSoffit,centerlineGrade,innerEdgeGrade,
FloorBlend,FeatureUnionBlend,routeEdges+1,orphanControl?"enabled":"disabled");
return true;
}
+31 -5
View File
@@ -1452,7 +1452,10 @@ namespace StandaloneStreamBenchmark
}
std::sort(mazeEdges.begin(),mazeEdges.end(),[](const auto* a,const auto* b)
{return a->stableId<b->stableId;});
const auto shaftCore=std::find_if(layout.cavernRooms.begin(),layout.cavernRooms.end(),
[](const auto& room){return room.stableId=="lattice/spine/shaft-core-v2";});
if(!arrivalPortal||!helix||!departurePortal||mazeEdges.size()<4
||shaftCore==layout.cavernRooms.end()
||layout.cavernRooms.size()<mazeEdges.size()+1)return false;
std::vector<const ResolvedCavernEdgeV1*> ordered={arrivalPortal,helix};
ordered.insert(ordered.end(),mazeEdges.begin(),mazeEdges.end());
@@ -1641,6 +1644,17 @@ namespace StandaloneStreamBenchmark
struct FIntervalCheck {const char* name;std::array<double,3> p;};
const auto mazeA=metres(mazeEdges.front()->polylineMicrometres.front());
const auto mazeB=metres(mazeEdges.front()->polylineMicrometres.back());
const auto helixFirst=metres(helix->polylineMicrometres.front());
const double helixCenterlineRadius=std::hypot(
helixFirst[0]-shaftCore->centerMicrometres[0]/1.0e6,
helixFirst[1]-shaftCore->centerMicrometres[1]/1.0e6);
const double helixBoreRadius=helix->boreRadiusMicrometres/1.0e6;
const double outerWallRadius=helixCenterlineRadius+helixBoreRadius;
const double wallScale=outerWallRadius/std::max(1.0e-9,helixCenterlineRadius);
const double outerWallX=shaftCore->centerMicrometres[0]/1.0e6
+(helixFirst[0]-shaftCore->centerMicrometres[0]/1.0e6)*wallScale;
const double outerWallY=shaftCore->centerMicrometres[1]/1.0e6
+(helixFirst[1]-shaftCore->centerMicrometres[1]/1.0e6)*wallScale;
const std::array<double,3> mazeMid={(mazeA[0]+mazeB[0])*0.5,
(mazeA[1]+mazeB[1])*0.5,(mazeA[2]+mazeB[2])*0.5};
const double mazeLength=std::hypot(mazeB[0]-mazeA[0],mazeB[1]-mazeA[1]);
@@ -1653,17 +1667,23 @@ namespace StandaloneStreamBenchmark
for(const auto& edge:layout.cavernEdges)if(edge.strateIndex==lattice->strateIndex)
for(const auto& point:edge.polylineMicrometres)
{const auto p=metres(point);maxX=std::max(maxX,p[0]);minY=std::min(minY,p[1]);maxY=std::max(maxY,p[1]);}
const std::array<FIntervalCheck,4> checks={{{"host-rock",{maxX+8.0,
const std::array<FIntervalCheck,6> checks={{{"host-rock",{maxX+8.0,
(minY+maxY)*0.5,midZ+1.2}},
{"maze-air",{mazeMid[0],mazeMid[1],mazeMid[2]+1.25}},
{"maze-wall-foot",{mazeMid[0]+wallX*1.30,mazeMid[1]+wallY*1.30,
mazeMid[2]+0.25}},
{"helix-air",{helix->polylineMicrometres[helix->polylineMicrometres.size()/2][0]/1.0e6,
helix->polylineMicrometres[helix->polylineMicrometres.size()/2][1]/1.0e6,
helix->polylineMicrometres[helix->polylineMicrometres.size()/2][2]/1.0e6+1.25}}}};
helix->polylineMicrometres[helix->polylineMicrometres.size()/2][2]/1.0e6+1.25}},
{"shaft-core-air",{shaftCore->centerMicrometres[0]/1.0e6,
shaftCore->centerMicrometres[1]/1.0e6,
shaftCore->centerMicrometres[2]/1.0e6}},
{"shaft-outer-wall",{outerWallX,outerWallY,
helixFirst[2]+1.25}}}};
std::uint64_t boxes=0,samples=0,misses=0,allAir=0,allSolid=0,mixed=0;
bool falseAllAirRejected=false,falseAllSolidRejected=false,wallMixed=false;
bool isTileShapeFreeAware=false,latticeTileFree=false;
bool shaftCoreAirProved=false,shaftCoreWallMixed=false;
for(const auto& check:checks)
{
const Vec3i origin{static_cast<int>(std::llround(check.p[0]/vm)),
@@ -1684,6 +1704,10 @@ namespace StandaloneStreamBenchmark
falseAllAirRejected|=bruteSolid&&verdict!=TileClass::allAir;
falseAllSolidRejected|=bruteAir&&verdict!=TileClass::allSolid;
if(std::string_view(check.name)=="maze-wall-foot")wallMixed=verdict==TileClass::mixed;
if(std::string_view(check.name)=="shaft-core-air")
shaftCoreAirProved=verdict==TileClass::allAir&&bruteAir;
if(std::string_view(check.name)=="shaft-outer-wall")
shaftCoreWallMixed=verdict==TileClass::mixed&&!bruteAir&&!bruteSolid;
if(std::string_view(check.name)=="maze-air")
{
const int32 tileWidth=CoreTileVoxelCount;
@@ -1701,9 +1725,9 @@ namespace StandaloneStreamBenchmark
(verdict==TileClass::allAir?!bruteAir:
verdict==TileClass::allSolid?!bruteSolid:false)?"yes":"no");
}
const bool intervalOk=boxes>=4&&allSolid>=1&&mixed>=1
const bool intervalOk=boxes>=6&&allAir>=1&&allSolid>=1&&mixed>=2
&&misses==0&&falseAllAirRejected&&falseAllSolidRejected&&wallMixed
&&isTileShapeFreeAware;
&&shaftCoreAirProved&&shaftCoreWallMixed&&isTileShapeFreeAware;
const bool pathOk=continuous&&capsuleClear&&allSupported&&headroomClear
&&maximumGrade<=15.0&&minimumHeadroom>=2.2;
std::printf("[LatticeCapsuleReachability] arrival=%s departure=%s edges=%zu path_points=%zu stations=%llu capsule_samples=%llu capsule_failures=%llu first_capsule_failure_m=(%.3f,%.3f,%.3f) support_samples=%llu support_failures=%llu first_support_failure_m=(%.3f,%.3f,%.3f) head_samples=%llu head_failures=%llu first_head_failure_m=(%.3f,%.3f,%.3f) max_grade_deg=%.3f min_headroom_m=%.3f required_headroom_m=2.200 support=every-station reachable=%s status=%s\n",
@@ -1721,10 +1745,12 @@ namespace StandaloneStreamBenchmark
minimumHeadroom, pathOk?"yes":"no",pathOk?"PASS":"FAIL");
std::printf("[LatticeFilletAudit] smooth_max=cubic width_m=%.6f measured_radius_m=%.6f ideal_radius_m=%.6f status=%s\n",
width,measuredFillet,idealFillet,measuredFillet>=0.5?"PASS":"FAIL");
std::printf("[LatticeIntervalOracle] boxes=%llu all_air=%llu all_solid=%llu mixed=%llu samples=%llu misses=%llu false_all_air=%s false_all_solid=%s wall_foot=%s isTileShapeFree=%s tile_free=%s status=%s\n",
std::printf("[LatticeIntervalOracle] boxes=%llu all_air=%llu all_solid=%llu mixed=%llu samples=%llu misses=%llu shaft_core_air=%s shaft_core_wall=%s false_all_air=%s false_all_solid=%s wall_foot=%s isTileShapeFree=%s tile_free=%s status=%s\n",
static_cast<unsigned long long>(boxes),static_cast<unsigned long long>(allAir),
static_cast<unsigned long long>(allSolid),static_cast<unsigned long long>(mixed),
static_cast<unsigned long long>(samples),static_cast<unsigned long long>(misses),
shaftCoreAirProved?"PROVED":"FAILED",
shaftCoreWallMixed?"mixed":"not-mixed",
falseAllAirRejected?"REJECTED":"FAILED",
falseAllSolidRejected?"REJECTED":"FAILED",wallMixed?"mixed":"not-mixed",
isTileShapeFreeAware?"BLOCKED":"FAILED",latticeTileFree?"yes":"no",
+2 -1
View File
@@ -1153,7 +1153,8 @@ namespace StandaloneWorldAssemblyPrototype
:nativeCaves?"Core.Caves.PrimitiveField"
:type==ECaveGeneratorType::SurfaceWorld?"SurfaceWorld.Heightfield2D"
:type==ECaveGeneratorType::FloatingIslands?"FloatingIslands.ClusterField":"legacy."+std::string(GeneratorKind(type));
s.recipeVersion=(nativeCaves||nativeLattice)?1
s.recipeVersion=nativeCaves?1
:nativeLattice?VoxelForgeCore::NativeLatticeFieldRecipeVersion
:type==ECaveGeneratorType::SurfaceWorld?assembly.recipe.schemaVersion
:type==ECaveGeneratorType::FloatingIslands&&!assembly.floatingIslands.empty()
?assembly.floatingIslands.front().manifest.recipe.geometryVersion:0;