![]() |
Project
|
#include <boost/test/unit_test.hpp>#include "CADSupport/O2BVHSurfaceSolid.h"#include "CADSupport/O2SurfaceSolidIO.h"#include "CADSupport/O2SolidHarness.h"#include "../src/BoundedSurface.h"#include "TFile.h"#include "TGeoBBox.h"#include "TGeoBoolNode.h"#include "TGeoCompositeShape.h"#include "TGeoCone.h"#include "TGeoManager.h"#include "TGeoMaterial.h"#include "TGeoMatrix.h"#include "TGeoMedium.h"#include "TGeoNode.h"#include "TGeoShape.h"#include "TGeoSphere.h"#include "TGeoTorus.h"#include "TGeoTube.h"#include "TGeoVolume.h"#include "TMath.h"#include "TNamed.h"#include <array>#include <cmath>#include <cstdint>#include <filesystem>#include <fstream>#include <initializer_list>#include <string>#include <memory>#include <utility>#include <vector>#include "XRayTransport.h"#include "RepresentationBench.h"Go to the source code of this file.
Classes | |
| class | o2::cad::surface::DummyBoundedSurface |
| A trivial bounded surface, a single 3D triangle, to exercise the BoundedSurface interface. More... | |
Namespaces | |
| namespace | o2 |
| a couple of static helper functions to create timestamp values for CCDB queries or override obsolete objects | |
| namespace | o2::cad |
| namespace | o2::cad::surface |
Macros | |
| #define | BOOST_TEST_MODULE Test O2BVHSurfaceSolid class |
| #define | BOOST_TEST_MAIN |
| #define | BOOST_TEST_DYN_LINK |
Typedefs | |
| using | XRayPoint = o2::cad::harness::Point3D |
Functions | |
| BOOST_AUTO_TEST_CASE (PlanarBoxNavigationMatchesTGeoBBox) | |
| BOOST_AUTO_TEST_CASE (WireValidationAndOrientation) | |
| BOOST_AUTO_TEST_CASE (DummyBoundedSurfaceInterface) | |
| BOOST_AUTO_TEST_CASE (SolidClosureDetectsMissingAndReversedFaces) | |
| BOOST_AUTO_TEST_CASE (NavigationReliabilityIsQueryable) | |
| BOOST_AUTO_TEST_CASE (NumericalConventions) | |
| BOOST_AUTO_TEST_CASE (WireDataModel) | |
| BOOST_AUTO_TEST_CASE (TrimmedCurveBoundaries) | |
| BOOST_AUTO_TEST_CASE (BSplineTrimCurveKernels) | |
| BOOST_AUTO_TEST_CASE (BSplineSamplingIsNotFooledBySymmetry) | |
| BOOST_AUTO_TEST_CASE (CurvedPlanarDiskKernels) | |
| BOOST_AUTO_TEST_CASE (CylindricalSurfaceKernels) | |
| BOOST_AUTO_TEST_CASE (ClosedCylinderMatchesTGeoTube) | |
| BOOST_AUTO_TEST_CASE (HollowCylinderMatchesTGeoTube) | |
| BOOST_AUTO_TEST_CASE (SphereMatchesTGeoSphere) | |
| BOOST_AUTO_TEST_CASE (SphericalSectionKernels) | |
| BOOST_AUTO_TEST_CASE (TruncatedConeMatchesTGeoCone) | |
| BOOST_AUTO_TEST_CASE (ApexConeClosesWithSingleCap) | |
| BOOST_AUTO_TEST_CASE (ToroidalSurfaceKernels) | |
| BOOST_AUTO_TEST_CASE (FullTorusMatchesTGeoTorus) | |
| BOOST_AUTO_TEST_CASE (WireTrimmedTorusMatchesSection) | |
| BOOST_AUTO_TEST_CASE (BVHConstructionAndTraversal) | |
| BOOST_AUTO_TEST_CASE (ContainsBoundaryPointsAndCapsule) | |
| BOOST_AUTO_TEST_CASE (DistanceBVHMatchesLoopOnAllFixtures) | |
| BOOST_AUTO_TEST_CASE (DistanceSweepsMatchRootPrimitives) | |
| BOOST_AUTO_TEST_CASE (DistanceHardCases) | |
| BOOST_AUTO_TEST_CASE (RayTMaxPruningIsOptimizationOnly) | |
| BOOST_AUTO_TEST_CASE (RayTMaxPruningKeepsNearTies) | |
| BOOST_AUTO_TEST_CASE (CurvedPlanarStadiumPrism) | |
| BOOST_AUTO_TEST_CASE (WireTrimmedCylinderMatchesTube) | |
| BOOST_AUTO_TEST_CASE (WireTrimmedConeMatchesCone) | |
| BOOST_AUTO_TEST_CASE (WireTrimCapacityMatchesTheClosedForm) | |
| BOOST_AUTO_TEST_CASE (WireTrimmedQuadricKernels) | |
| BOOST_AUTO_TEST_CASE (ParametricMetricIsTheFirstFundamentalForm) | |
| BOOST_AUTO_TEST_CASE (WireJoinToleranceIsALength) | |
| BOOST_AUTO_TEST_CASE (PolygonAndCurveWiresShareOneJoinRule) | |
| BOOST_AUTO_TEST_CASE (SurfaceSidecarRoundTrip) | |
| BOOST_AUTO_TEST_CASE (SidecarModelToleranceRoundTrip) | |
| BOOST_AUTO_TEST_CASE (WireTrimmedSidecarRoundTrip) | |
| BOOST_AUTO_TEST_CASE (TorusSidecarRoundTrip) | |
| BOOST_AUTO_TEST_CASE (StreamY_LoaderHonoursTheDeclaredModelTolerance) | |
| BOOST_AUTO_TEST_CASE (BoundaryBandMatchesTheRepresentation) | |
| BOOST_AUTO_TEST_CASE (TrimBoundaryHitsAreFlaggedAsAmbiguous) | |
| BOOST_AUTO_TEST_CASE (BSplineSidecarRoundTrip) | |
| BOOST_AUTO_TEST_CASE (BSplineWindowInCylinderWall) | |
| BOOST_AUTO_TEST_CASE (BSplineHoleInCylinderWall) | |
| BOOST_AUTO_TEST_CASE (PersistenceRoundTrip) | |
| BOOST_AUTO_TEST_CASE (EmptySolidIsNotReliable) | |
| BOOST_AUTO_TEST_CASE (ContainsIsDirectionIndependentOnClosedSolids) | |
| BOOST_AUTO_TEST_CASE (ContainsReshootsThroughSurfaceGaps) | |
| BOOST_AUTO_TEST_CASE (ContainsWorksBeforeCloseShape) | |
| BOOST_AUTO_TEST_CASE (BoundaryPointsAgreeBetweenContainsAndDistances) | |
| BOOST_AUTO_TEST_CASE (EdgeGrazesAreNotCrossings) | |
| BOOST_AUTO_TEST_CASE (DescribeContainsCrossingsTakesAnExplicitDirection) | |
| BOOST_AUTO_TEST_CASE (LPrismSweeps) | |
| BOOST_AUTO_TEST_CASE (UnclampedBSplineEndpointsAreOnTheCurve) | |
| BOOST_AUTO_TEST_CASE (NearFullTurnTrimIsNotRejectedOnItsPoleHull) | |
| BOOST_AUTO_TEST_CASE (RejectedFacesAreNeverSilentlyAdded) | |
| BOOST_AUTO_TEST_CASE (RimClosureMeasuresTheGapInCentimetres) | |
| BOOST_AUTO_TEST_CASE (RimClosureSurvivesUnequalChordCounts) | |
| BOOST_AUTO_TEST_CASE (RimReportsNameTheOffendingLoop) | |
| BOOST_AUTO_TEST_CASE (RimCountsAreLoopsAndLengthsNotChords) | |
| BOOST_AUTO_TEST_CASE (RimMatchToleranceComesFromTheModel) | |
| BOOST_AUTO_TEST_CASE (ClosedCurveReportsItsTravelNotItsEndpointGap) | |
| BOOST_AUTO_TEST_CASE (HoleInWireTrimIntegratesToTheAnalyticCapacity) | |
| BOOST_AUTO_TEST_CASE (UnclampedBSplineEndpointsAreEvaluatedNotReadOffThePoles) | |
| BOOST_AUTO_TEST_CASE (EdgeIdentityDecidesClosureByCounting) | |
| BOOST_AUTO_TEST_CASE (EdgeIdentityFindsTheMissingFace) | |
| BOOST_AUTO_TEST_CASE (EdgeIdentityFindsReversedAndDuplicatedFaces) | |
| BOOST_AUTO_TEST_CASE (SharedEdgeDeviationMeasuresHowFarApartTheFacesAre) | |
| BOOST_AUTO_TEST_CASE (TrimCurveIdentitySurvivesWireReorientation) | |
| BOOST_AUTO_TEST_CASE (PartialEdgeIdentityFallsBackToTheRimMeasurement) | |
| BOOST_AUTO_TEST_CASE (EdgeIdentitySurvivesPersistence) | |
| BOOST_AUTO_TEST_CASE (SidecarV3EdgeIdentityRoundTrip) | |
| BOOST_AUTO_TEST_CASE (EdgeIdentityVerdictIsIndependentOfChordSampling) | |
| BOOST_AUTO_TEST_CASE (StreamE_TorusQuarticIsScaleCovariantWhereItWorks) | |
| BOOST_AUTO_TEST_CASE (StreamE_TorusQuarticKeepsEveryRootBelowTheOldResolventGuard) | |
| BOOST_AUTO_TEST_CASE (ShapeSidecarRoundTripsAnyTGeoShape) | |
| BOOST_AUTO_TEST_CASE (ShapeSidecarRefusesWhatIsNotAShape) | |
| BOOST_AUTO_TEST_CASE (OracleValidatorsScoreAPlainRootShape) | |
| BOOST_AUTO_TEST_CASE (CsgSelfUnionCarriesARigidTransformExactly) | |
| BOOST_AUTO_TEST_CASE (CsgTwoLeafUnionRoundTripsAndMatchesTheClosedForm) | |
| BOOST_AUTO_TEST_CASE (XRayCrossingListsMatchClosedFormOnPrimitives) | |
| BOOST_AUTO_TEST_CASE (XRayCrossingListsAgreeBetweenBVHAndLoopOnAllFixtures) | |
| BOOST_AUTO_TEST_CASE (XRayCrossingComparatorCatchesInjectedDefects) | |
| BOOST_AUTO_TEST_CASE (XRayParityAuditContradictsATruncatedList) | |
| BOOST_AUTO_TEST_CASE (XRayChordIntegralIsExactForABoxAndConvergesForASphere) | |
| BOOST_AUTO_TEST_CASE (XRayRasterRaysStartOutsideAndFansAreDirectionDiverse) | |
| BOOST_AUTO_TEST_CASE (StreamM_QuarticFindsTheALICE3ProductionScaleRoots) | |
| BOOST_AUTO_TEST_CASE (StreamM_QuarticIsScaleInvariantOnAnAsymmetricQuartic) | |
| BOOST_AUTO_TEST_CASE (StreamM_QuarticStillSelectsTheBiquadraticBranch) | |
| BOOST_AUTO_TEST_CASE (StreamM_QuarticStillDeclinesDegenerateConfigurations) | |
| BOOST_AUTO_TEST_CASE (StreamM_QuarticHasNoCliffAsAQuarticApproachesBiquadratic) | |
| BOOST_AUTO_TEST_CASE (StreamK_InnerWallIsExactlyTheSignOfTheOutwardNormal) | |
| BOOST_AUTO_TEST_CASE (ShapeSidecarRoundTripsAPlacement) | |
| BOOST_AUTO_TEST_CASE (AbsentPlacementMeansIdentity) | |
| BOOST_AUTO_TEST_CASE (PlacedPrimitiveAnswersExactlyLikeTheSelfUnionComposite) | |
| BOOST_AUTO_TEST_CASE (PlacedPrimitiveRecoversTheAnalyticCapacity) | |
| BOOST_AUTO_TEST_CASE (NodeMatrixIsPartPlacementTimesShapePlacement) | |
| BOOST_AUTO_TEST_CASE (RepBenchTimingHarnessRunsTheRequestedPasses) | |
| The timing harness runs the requested passes over a sample set that exercises both branches. | |
| BOOST_AUTO_TEST_CASE (RepBenchSampleSetIsReproducibleAndActuallyHits) | |
| BOOST_AUTO_TEST_CASE (RepBenchBooleanLadderHasTheStructureItClaims) | |
| BOOST_AUTO_TEST_CASE (StreamS_PatchDistanceIsNeverBelowTheDistanceToItsOwnBoundingBox) | |
| BOOST_AUTO_TEST_CASE (StreamS_SafetyAndNormalAreIdenticalToTheAllSurfacesLoop) | |
| Accelerated == brute force, exactly, for both kernels, over every fixture and every regime. | |
| BOOST_AUTO_TEST_CASE (StreamS_SafetyFallsBackBeforeCloseShapeAndOnAnEmptySolid) | |
| BOOST_AUTO_TEST_CASE (StreamS_ComputeNormalKeepsTheLowestIndexTieBreak) | |
| BOOST_AUTO_TEST_CASE (StreamS_BreakingThePruningBoundIsCaught) | |
| BOOST_AUTO_TEST_CASE (StreamS_SafetyVisitsFarFewerPatchesThanTheLoop) | |
The sub-patch BVH | |
One conservative box per surface makes every swept quadric a giant leaf: a full cylinder's box is the box of its two full rim circles, a sphere's is the whole ball, and every ray through that box pays an analytic patch intersection that mostly reports nothing. The sub-patch BVH lets each surface contribute several tighter boxes (appendCoverBoxes) and dedups the surfaces a query actually tests, so the leaf boxes hug the geometry and the answers stay bit-identical to the loop twins. | |
| BOOST_AUTO_TEST_CASE (StreamX_CoverBoxesAreATightLowerBoundEnvelopePerFamily) | |
| BOOST_AUTO_TEST_CASE (StreamX_RaysThroughEmptyBoxRegionsReachNoPatch) | |
| BOOST_AUTO_TEST_CASE (StreamX_CurvedFixturesStayIdenticalToTheLoop) | |
| #define BOOST_TEST_DYN_LINK |
Definition at line 16 of file testBVHSurfaceSolid.cxx.
| #define BOOST_TEST_MAIN |
Definition at line 15 of file testBVHSurfaceSolid.cxx.
| #define BOOST_TEST_MODULE Test O2BVHSurfaceSolid class |
Definition at line 14 of file testBVHSurfaceSolid.cxx.
| using XRayPoint = o2::cad::harness::Point3D |
Definition at line 5206 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | AbsentPlacementMeansIdentity | ) |
Definition at line 5843 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ApexConeClosesWithSingleCap | ) |
Definition at line 1425 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BoundaryBandMatchesTheRepresentation | ) |
Definition at line 3036 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BoundaryPointsAgreeBetweenContainsAndDistances | ) |
Definition at line 3756 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BSplineHoleInCylinderWall | ) |
Definition at line 3319 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BSplineSamplingIsNotFooledBySymmetry | ) |
Definition at line 1041 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BSplineSidecarRoundTrip | ) |
Definition at line 3212 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BSplineTrimCurveKernels | ) |
Definition at line 953 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BSplineWindowInCylinderWall | ) |
Definition at line 3243 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | BVHConstructionAndTraversal | ) |
Definition at line 1627 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ClosedCurveReportsItsTravelNotItsEndpointGap | ) |
N1. contourIntegralAlongCurve sized its quadrature from the difference between a curve's endpoints. A closed trim loop – every hole – has identical endpoints, so it reported zero travel in u and was handed a single interval, and because max(1, ceil(0 / x)) is 1 the interval cap could not reach it at any value. Curve2D::uVariation measures the travel instead.
Definition at line 4222 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ClosedCylinderMatchesTGeoTube | ) |
Definition at line 1193 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ContainsBoundaryPointsAndCapsule | ) |
Definition at line 1697 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ContainsIsDirectionIndependentOnClosedSolids | ) |
Definition at line 3606 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ContainsReshootsThroughSurfaceGaps | ) |
Definition at line 3645 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ContainsWorksBeforeCloseShape | ) |
Definition at line 3736 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | CsgSelfUnionCarriesARigidTransformExactly | ) |
Definition at line 5012 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | CsgTwoLeafUnionRoundTripsAndMatchesTheClosedForm | ) |
Definition at line 5101 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | CurvedPlanarDiskKernels | ) |
Definition at line 1099 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | CurvedPlanarStadiumPrism | ) |
Definition at line 2056 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | CylindricalSurfaceKernels | ) |
Definition at line 1147 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | DescribeContainsCrossingsTakesAnExplicitDirection | ) |
Definition at line 3831 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | DistanceBVHMatchesLoopOnAllFixtures | ) |
Definition at line 1778 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | DistanceHardCases | ) |
Definition at line 1836 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | DistanceSweepsMatchRootPrimitives | ) |
Definition at line 1803 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | DummyBoundedSurfaceInterface | ) |
Definition at line 580 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | EdgeGrazesAreNotCrossings | ) |
Definition at line 3792 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | EdgeIdentityDecidesClosureByCounting | ) |
N3, the core of it. Closure is a count of edge identities, and no tolerance, band or sampling enters the verdict. The self-check is the box: 12 edges, every one of them shared by exactly two faces running opposite ways, and the two faces' realisations of each edge coincide exactly.
Definition at line 4379 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | EdgeIdentityFindsReversedAndDuplicatedFaces | ) |
The sense bit carries the orientation, and it is checked. Two faces that traverse a shared edge the same way disagree about which side is out, whatever their normals happen to look like.
Definition at line 4428 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | EdgeIdentityFindsTheMissingFace | ) |
A missing face is a missing face however close the survivors happen to lie. Five faces of a box leave four edges used once, and that is decided by counting rather than by how far apart anything is – the old criterion had to find the nearest chord and compare it against a band.
Definition at line 4404 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | EdgeIdentitySurvivesPersistence | ) |
The identity is persistent state, not derived state: a solid that loses it on the way through a ROOT file would come back deciding closure by a different rule than the one that was written.
Definition at line 4547 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | EdgeIdentityVerdictIsIndependentOfChordSampling | ) |
The point of the exercise, stated as a test: the verdict must not depend on how finely a B-spline trim is flattened. Under the old criterion it did, and inversely – tightening kBSplineFlatness shrank the per-chord sagitta faster than it shrank the disagreement it was standing in for, so a better-resolved solid read as more open. Sampling cannot reach this criterion at all: it counts identities, and the deviation it reports is evaluated on the curves rather than on their polylines.
Definition at line 4648 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | EmptySolidIsNotReliable | ) |
Definition at line 3563 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | FullTorusMatchesTGeoTorus | ) |
Definition at line 1546 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | HoleInWireTrimIntegratesToTheAnalyticCapacity | ) |
N1, the defect itself: the contour integrator spent one 20-node Gauss-Legendre rule across a B-spline's whole knot domain, and Gauss-Legendre's geometric convergence needs the integrand analytic on the interval it covers – a B-spline is one polynomial only within a span. The hole here is an exact circle written the way a CAD kernel writes one, a closed rational quadratic over four knot spans. Verified to fail (by 8e-4 absolute) with the knot subdivision removed.
The endpoint-based interval count is the second defect, and it is why this one hid: a closed loop has coincident endpoints, so it reported zero travel in u, and max(1, ceil(0 / x)) is 1 at every x – a sweep of kContourMaxSpanU moved nothing while the defect sat behind it. That half is pinned by ClosedCurveReportsItsTravelNotItsEndpointGap; on this corpus it is worth 4e-5 cm^3 on ExcavatorArm/BoomCylinderInner against the knot subdivision's 1.1e-2, so it is a correctness fix rather than the cause.
Definition at line 4250 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | HollowCylinderMatchesTGeoTube | ) |
Definition at line 1258 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | LPrismSweeps | ) |
Definition at line 3860 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | NavigationReliabilityIsQueryable | ) |
Definition at line 639 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | NearFullTurnTrimIsNotRejectedOnItsPoleHull | ) |
Definition at line 3940 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | NodeMatrixIsPartPlacementTimesShapePlacement | ) |
Definition at line 5975 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | NumericalConventions | ) |
Definition at line 701 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | OracleValidatorsScoreAPlainRootShape | ) |
Definition at line 4888 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ParametricMetricIsTheFirstFundamentalForm | ) |
Definition at line 2408 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | PartialEdgeIdentityFallsBackToTheRimMeasurement | ) |
Partial identity is no identity. A face that names no edges looks exactly like a face with no missing neighbours, which is the failure this replaces, so the whole solid falls back on the geometric rim measurement unless every face states its edges.
Definition at line 4527 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | PersistenceRoundTrip | ) |
Definition at line 3490 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | PlacedPrimitiveAnswersExactlyLikeTheSelfUnionComposite | ) |
Definition at line 5872 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | PlacedPrimitiveRecoversTheAnalyticCapacity | ) |
Definition at line 5948 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | PlanarBoxNavigationMatchesTGeoBBox | ) |
Definition at line 381 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | PolygonAndCurveWiresShareOneJoinRule | ) |
Definition at line 2548 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RayTMaxPruningIsOptimizationOnly | ) |
Definition at line 1943 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RayTMaxPruningKeepsNearTies | ) |
Definition at line 1993 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RejectedFacesAreNeverSilentlyAdded | ) |
Definition at line 3994 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RepBenchBooleanLadderHasTheStructureItClaims | ) |
Both memory columns have to move when memory moves, and the heap column has to come back when it is released. The 64 MB block is deliberately over glibc's mmap threshold: uordblks alone does not see such an allocation at all, which is exactly how this check earned its place. Linux only: readMemory() reads /proc/self/statm and mallinfo2, both no-ops elsewhere. The synthetic boolean ladder is a fixture whose whole purpose is a scaling exponent, so the structure it claims has to be the structure it built – and the two tree shapes have to be genuinely different, or the "chain vs balanced" column compares a thing with itself.
Definition at line 6179 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RepBenchSampleSetIsReproducibleAndActuallyHits | ) |
The sample set is the whole basis of "the same questions from the same sample sets": every representation of a part is handed this one object. So its labels must agree with the reference that produced them, and rays must actually reach the solid – a DistFromOutside column measured on rays that all miss prices the early-out, not the kernel.
Definition at line 6135 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RepBenchTimingHarnessRunsTheRequestedPasses | ) |
The timing harness runs the requested passes over a sample set that exercises both branches.
Definition at line 6107 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RimClosureMeasuresTheGapInCentimetres | ) |
Definition at line 4032 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RimClosureSurvivesUnequalChordCounts | ) |
Definition at line 4073 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RimCountsAreLoopsAndLengthsNotChords | ) |
Definition at line 4167 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RimMatchToleranceComesFromTheModel | ) |
Definition at line 4201 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | RimReportsNameTheOffendingLoop | ) |
Definition at line 4116 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ShapeSidecarRefusesWhatIsNotAShape | ) |
Definition at line 4863 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ShapeSidecarRoundTripsAnyTGeoShape | ) |
Definition at line 4813 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ShapeSidecarRoundTripsAPlacement | ) |
Definition at line 5806 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | SharedEdgeDeviationMeasuresHowFarApartTheFacesAre | ) |
maxSharedEdgeDeviation is a measurement, and it has to measure the thing it is named after. Move one face of the box bodily by a known delta while it keeps claiming the same edges: the solid is still closed by identity (nothing about which edges exist has changed) and the deviation reports the delta. That separation is the whole design – the verdict says whether the faces are meant to meet, the number says how well they do.
Definition at line 4464 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | SidecarModelToleranceRoundTrip | ) |
Definition at line 2763 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | SidecarV3EdgeIdentityRoundTrip | ) |
The version-3 sidecar: the edge identities reach the kernel through the file, a version-2 file still loads and still gets the geometric verdict, and a file that claims v3 without carrying the identities is rejected as truncated rather than parsed into whatever follows.
Definition at line 4566 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | SolidClosureDetectsMissingAndReversedFaces | ) |
Definition at line 610 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | SphereMatchesTGeoSphere | ) |
Definition at line 1297 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | SphericalSectionKernels | ) |
Definition at line 1341 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamE_TorusQuarticIsScaleCovariantWhereItWorks | ) |
Definition at line 4743 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamE_TorusQuarticKeepsEveryRootBelowTheOldResolventGuard | ) |
Definition at line 4759 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamK_InnerWallIsExactlyTheSignOfTheOutwardNormal | ) |
Definition at line 5715 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamM_QuarticFindsTheALICE3ProductionScaleRoots | ) |
Definition at line 5528 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamM_QuarticHasNoCliffAsAQuarticApproachesBiquadratic | ) |
Definition at line 5677 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamM_QuarticIsScaleInvariantOnAnAsymmetricQuartic | ) |
Definition at line 5563 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamM_QuarticStillDeclinesDegenerateConfigurations | ) |
Definition at line 5649 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamM_QuarticStillSelectsTheBiquadraticBranch | ) |
Definition at line 5603 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamS_BreakingThePruningBoundIsCaught | ) |
The negative control. A cross-check that cannot fail has not passed, so the pruning bound is deliberately replaced by one that is not a lower bound – the distance to the node's bounding box centre, which is larger than the distance to the box for any box with extent – and the comparison against the loop must then break.
It must break in a stated direction: an over-large bound prunes subtrees that hold the true nearest patch, so the accelerated Safety comes out too large. That is the failure mode that matters (a valid safety may never exceed the true distance to the boundary), and it is the one the sabotage reproduces, so the healthy case is being watched by a test that has been shown to see exactly the thing it is there to see.
Definition at line 6563 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamS_ComputeNormalKeepsTheLowestIndexTieBreak | ) |
ComputeNormal's tie-break, isolated. At the exact centre of a box all six faces are the same distance away, so which one wins is decided entirely by the loop's strict < – the first, i.e. the lowest-indexed, patch. A traversal that visits patches in BVH order would legitimately pick a different face and return a different normal, so the accelerated path carries the index tie-break explicitly and declines to prune a node whose bound merely equals the current best.
This is a real configuration, not a contrived one: the centre of a box, the axis of a tube and the centre of a sphere all produce exact ties, and a navigator that asks for a normal there gets an answer that must not depend on how the tree happened to be built.
Definition at line 6528 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamS_PatchDistanceIsNeverBelowTheDistanceToItsOwnBoundingBox | ) |
The invariant the whole acceleration rests on, pinned at the level it is a property of.
A node is pruned when the distance from the query point to its bounding box already exceeds the best patch distance found so far. That is only sound if the box distance is a lower bound on the distance to every patch inside it – and the box is built from each surface's own conservativeBounds(), so per surface the statement is
distance(point, conservativeBounds) <= sqrt(distanceSqToPatch(point)) for every point.
It holds because every distanceSqToPatch in BoundedSurface.h is realised on the patch's untrimmed window – the wire itself for the planar families, the full rim band for a cylinder or cone, the full sphere, the full torus – and each family's conservativeBounds() encloses exactly that window. Reading the code says so; this measures it, on every surface family, from points in every regime. If a future surface family returned a distance realised outside its own bounds, Safety() would silently start answering too much and only this case would say so.
Definition at line 6396 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamS_SafetyAndNormalAreIdenticalToTheAllSurfacesLoop | ) |
Accelerated == brute force, exactly, for both kernels, over every fixture and every regime.
Definition at line 6470 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamS_SafetyFallsBackBeforeCloseShapeAndOnAnEmptySolid | ) |
The traversal must also be right before there is anything to traverse, and on a solid whose surface set is empty – the two states where the accelerated path has to fall back rather than crash or answer something else.
Definition at line 6495 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamS_SafetyVisitsFarFewerPatchesThanTheLoop | ) |
What the acceleration actually buys, in the currency the defect was measured in: patches handed to distanceSqToPatch per call. The loop's number is GetNsurfaces() by construction; the traversal's is what this counts. The bounds below are deliberately far looser than the measured values so the case pins the existence of pruning rather than becoming a performance trap.
Definition at line 6627 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamX_CoverBoxesAreATightLowerBoundEnvelopePerFamily | ) |
The cover boxes of every family, against that family's own kernels. The curved families must emit more than one box – a single conservative box passes the two properties trivially and tightens nothing – and the properties must hold on awkward frames, partial sweeps and wire trims, not just on the axis-aligned full-sweep cases.
Definition at line 6769 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamX_CurvedFixturesStayIdenticalToTheLoop | ) |
With several boxes per surface a ray can enter the same surface's leaves more than once, and a duplicated appendIntersections call would flip parity and corrupt the graze clustering. So the dedup is not an optimization but a correctness requirement, and the sharpest way to pin it is the crossing lists themselves: same multiset, both traversals, on the curved fixtures whose surfaces now own many boxes.
Definition at line 6927 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamX_RaysThroughEmptyBoxRegionsReachNoPatch | ) |
Rays that cross a swept quadric's old conservative box while missing the surface itself must reach no patch at all once the leaves are sub-patch boxes. Each case here is a ray the single per-surface box turns into a paid analytic intersection and the sub-patch boxes reject on the box test alone.
Definition at line 6895 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | StreamY_LoaderHonoursTheDeclaredModelTolerance | ) |
Definition at line 2909 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | SurfaceSidecarRoundTrip | ) |
Definition at line 2685 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | ToroidalSurfaceKernels | ) |
Definition at line 1472 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | TorusSidecarRoundTrip | ) |
Definition at line 2873 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | TrimBoundaryHitsAreFlaggedAsAmbiguous | ) |
Definition at line 3137 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | TrimCurveIdentitySurvivesWireReorientation | ) |
The correspondence between edge identity i and trim curve i survives the wire reorientation that CurveWire/SurfaceWire perform on load. A loop handed in with the wrong winding is reversed in place, so storage index i stops being input index i; pairing the wrong two curves would still produce a number, and a plausible one, which is why the mapping is recorded rather than assumed. Handing the same box in with every loop wound the other way must not move the deviation off zero.
Definition at line 4492 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | TrimmedCurveBoundaries | ) |
Definition at line 829 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | TruncatedConeMatchesTGeoCone | ) |
Definition at line 1379 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | UnclampedBSplineEndpointsAreEvaluatedNotReadOffThePoles | ) |
N2. The loader read a B-spline edge's endpoints off its first and last poles, which are the endpoints only for a clamped knot vector. On an unclamped one the kernel (since K1) evaluates and the loader did not, so the two measured the same wire join between different points.
Definition at line 4293 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | UnclampedBSplineEndpointsAreOnTheCurve | ) |
Definition at line 3892 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireDataModel | ) |
Definition at line 749 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireJoinToleranceIsALength | ) |
Definition at line 2514 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireTrimCapacityMatchesTheClosedForm | ) |
Definition at line 2199 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireTrimmedConeMatchesCone | ) |
Definition at line 2161 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireTrimmedCylinderMatchesTube | ) |
Definition at line 2121 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireTrimmedQuadricKernels | ) |
Definition at line 2311 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireTrimmedSidecarRoundTrip | ) |
Definition at line 2829 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireTrimmedTorusMatchesSection | ) |
Definition at line 1587 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | WireValidationAndOrientation | ) |
Definition at line 454 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | XRayChordIntegralIsExactForABoxAndConvergesForASphere | ) |
The chord integral is EXACT for an axis-aligned box whose raster window is its own bounding box, at every raster density. No convergence argument and no tolerance: either the quadrature is the volume or it is not. This is what fixed the raster geometry – with the window inflated by 2 % instead, the same box came out 5.1e-02 too large at N = 32.
Definition at line 5383 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | XRayCrossingComparatorCatchesInjectedDefects | ) |
The comparator's own positive AND negative controls. A comparison that cannot fail is not a comparison, and the distinction this one has to preserve is LOST (a wall a track walks through) against DISPLACED (a wrong step length) – merging them was the first version's bug.
Definition at line 5299 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | XRayCrossingListsAgreeBetweenBVHAndLoopOnAllFixtures | ) |
The transport-level BVH == _Loop guard.
DistanceBVHMatchesLoopOnAllFixtures above compares the twins one query at a time from generated points. This compares whole ORDERED CROSSING LISTS produced by stepping, where every query after the first starts from a point the previous query put on a boundary. That is a harder condition and a different one: a traversal-order difference that is invisible on an isolated query can still send the two loops down different sequences of states.
Definition at line 5247 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | XRayCrossingListsMatchClosedFormOnPrimitives | ) |
A box has exactly two crossings and a hollow tube has four – and the second fact is the one no single-shot query can express, because DistFromOutside reports the first of the four and stops. Both distances are known in closed form, so this needs no oracle and no fixture.
Definition at line 5211 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | XRayParityAuditContradictsATruncatedList | ) |
The parity audit is the only check in the benchmark that is independent of the stepping: both modes produce an alternating list by construction, so nonAlternating can never fire on them. Asking Contains() at the midpoint of every interval is what can contradict a list.
Definition at line 5355 of file testBVHSurfaceSolid.cxx.
| BOOST_AUTO_TEST_CASE | ( | XRayRasterRaysStartOutsideAndFansAreDirectionDiverse | ) |
The raster's own contract, because every number above depends on it: the rays start strictly outside the solid, the lattice covers the bounding box, and a fan is direction-diverse where the axis beams are not. The last property is not cosmetic – it is why the fan finds the torus quartic defect at x0.1 and the three axis beams do not.
Definition at line 5422 of file testBVHSurfaceSolid.cxx.