wip: Tunnel Network cave planner on Core caves (L134, route support still failing)
Seed + 21/47 legacy fields -> 30 compound rooms (72 primitives), 3 branches, destination chamber; mouths fixed; 8.67 deg max grade. Passage composer no longer skips native cave layers (incoming passage 21,425/21,425 open). Open: route-support audit has 380 unsupported samples near the arrival mouth. Not for merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
0065ee68e6
commit
75c6ad251d
9 files changed
+1008
-47
No files matched your search
@@ -1221,16 +1221,15 @@ public:
|
||||
double unionDistance=std::numeric_limits<double>::infinity();
|
||||
double unionShellDistance=std::numeric_limits<double>::infinity();
|
||||
const std::uint32_t reliefSeed=static_cast<std::uint32_t>(Owner?Owner->Seed:0);
|
||||
const auto* queryStratum=FindBoundStratumForManagerZ(Z);
|
||||
for(std::size_t passageIndex=0;passageIndex<ResolvedLayout->passages.size();
|
||||
++passageIndex)
|
||||
{
|
||||
const auto& passage=ResolvedLayout->passages[passageIndex];
|
||||
if(passage.controlPoints.size()<2)continue;
|
||||
if(queryStratum&&queryStratum->Resolved
|
||||
&&queryStratum->Resolved->passageCapabilities.hasNativeCaveField
|
||||
&&passage.lowerStrateIndex==queryStratum->StrateIndex)
|
||||
continue;
|
||||
// Native graph fields own their local rooms and tunnels, not the
|
||||
// inter-strate connection above their mouth. Union the shared passage
|
||||
// field here as well so the connector remains open through the boundary
|
||||
// band for both native caves and future native lattice layers.
|
||||
if(passageProfile)++passageProfile->passageIterations;
|
||||
if(passageTileScopeMatches&&!passageTileQueries->hasRouteFeature(passageIndex))
|
||||
continue;
|
||||
@@ -7488,7 +7487,16 @@ private:
|
||||
const double delta=(point[axis]-feature.centerMetres[axis])/radius;
|
||||
normalizedSquared+=delta*delta;meanRadius+=radius/3.0;
|
||||
}
|
||||
const double ellipsoid=(std::sqrt(normalizedSquared)-1.0)*meanRadius;
|
||||
double ellipsoid=(std::sqrt(normalizedSquared)-1.0)*meanRadius;
|
||||
if(feature.irregularityAmplitudeVoxels>0.0f)
|
||||
{
|
||||
const float fade=SmoothUnit((Z-feature.floorVoxels)/0.8f);
|
||||
ellipsoid+=StampValueNoise(
|
||||
X-feature.centerVoxels[0],Y-feature.centerVoxels[1],
|
||||
Z-feature.centerVoxels[2],
|
||||
feature.irregularityWavelengthVoxels,feature.irregularitySeed)
|
||||
*feature.irregularityAmplitudeVoxels*metresPerVoxel*fade;
|
||||
}
|
||||
const double floor=feature.room->floorMicrometres/1000000.0-point[2];
|
||||
const double width=feature.room->smoothWidthMicrometres/1000000.0;
|
||||
featureVoid=SmoothMaxMetres(ellipsoid,floor,width);
|
||||
@@ -7526,7 +7534,17 @@ private:
|
||||
}
|
||||
const double normalized=std::sqrt(radialSquared/(radius*radius)
|
||||
+vertical*vertical/(height*height));
|
||||
const double distance=(normalized-1.0)*std::min(radius,height);
|
||||
double distance=(normalized-1.0)*std::min(radius,height);
|
||||
if(feature.irregularityAmplitudeVoxels>0.0f)
|
||||
{
|
||||
const float floorVoxels=static_cast<float>(nearestFloor/metresPerVoxel);
|
||||
const float fade=SmoothUnit((Z-floorVoxels)/0.8f);
|
||||
distance+=StampValueNoise(
|
||||
X-feature.controlPointsVoxels[0][0],
|
||||
Y-feature.controlPointsVoxels[0][1],Z-floorVoxels,
|
||||
feature.irregularityWavelengthVoxels,feature.irregularitySeed)
|
||||
*feature.irregularityAmplitudeVoxels*metresPerVoxel*fade;
|
||||
}
|
||||
const bool clearlyCloser=distance<tube-SegmentDistanceTieToleranceMetres;
|
||||
const bool stableTie=std::abs(distance-tube)
|
||||
<=SegmentDistanceTieToleranceMetres&&segmentIndex<nearestSegment;
|
||||
|
||||
Reference in new issue
Block a user