Project
Loading...
Searching...
No Matches
testFlatCSG.cxx File Reference
#include <boost/test/unit_test.hpp>
#include "CADSupport/O2FlatCSG.h"
#include "CADSupport/O2SurfaceSolidIO.h"
#include "TFile.h"
#include "TGeoBBox.h"
#include "TGeoShape.h"
#include "TGeoTorus.h"
#include "TGeoTube.h"
#include "TMath.h"
#include <algorithm>
#include <cmath>
#include <filesystem>
#include <limits>
#include <vector>

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   Test O2FlatCSG class
 
#define BOOST_TEST_MAIN
 
#define BOOST_TEST_DYN_LINK
 

Functions

 BOOST_AUTO_TEST_CASE (box_from_six_planes_contains_like_TGeoBBox)
 
 BOOST_AUTO_TEST_CASE (tube_from_two_cylinders_and_two_planes_contains_like_TGeoTube)
 
 BOOST_AUTO_TEST_CASE (two_disjoint_cells_are_a_union)
 
 BOOST_AUTO_TEST_CASE (box_distances_match_TGeoBBox)
 
 BOOST_AUTO_TEST_CASE (tube_distances_match_TGeoTube_through_the_bore)
 
 BOOST_AUTO_TEST_CASE (a_ray_leaving_one_cell_into_a_touching_one_does_not_stop_between_them)
 
 BOOST_AUTO_TEST_CASE (tangential_ray_on_a_cylinder_from_a_point_on_its_surface_has_no_nan_root)
 
 BOOST_AUTO_TEST_CASE (torus_contains_and_distances_match_TGeoTorus)
 
 BOOST_AUTO_TEST_CASE (a_tilted_torus_is_the_same_solid_as_an_upright_one_rotated)
 
 BOOST_AUTO_TEST_CASE (the_range_bound_encloses_the_sampled_range)
 
 BOOST_AUTO_TEST_CASE (the_boxes_cover_the_solid_and_their_active_lists_are_sound)
 
 BOOST_AUTO_TEST_CASE (a_box_wholly_inside_a_cell_carries_no_active_halfspaces)
 
 BOOST_AUTO_TEST_CASE (a_cell_without_a_bbox_fails_loudly_instead_of_vanishing)
 
 BOOST_AUTO_TEST_CASE (an_inverted_cell_bbox_fails_loudly_instead_of_being_kept_as_solid)
 
 BOOST_AUTO_TEST_CASE (a_nan_cell_bbox_fails_loudly_instead_of_defeating_the_inverted_box_check)
 
 BOOST_AUTO_TEST_CASE (the_accelerated_contains_is_bit_identical_to_its_twin)
 
 BOOST_AUTO_TEST_CASE (the_sampled_boundary_points_flip_containment)
 
 BOOST_AUTO_TEST_CASE (the_accelerated_distances_are_bit_identical_to_their_twins)
 
 BOOST_AUTO_TEST_CASE (a_ray_along_the_long_arm_crosses_every_cell_it_should)
 
 BOOST_AUTO_TEST_CASE (the_accelerated_distances_track_their_twins_when_a_plane_is_rescaled)
 
 BOOST_AUTO_TEST_CASE (a_shape_that_failed_to_close_still_answers_through_the_loop_twins)
 
 BOOST_AUTO_TEST_CASE (safety_is_sound_and_matches_its_twin)
 
 BOOST_AUTO_TEST_CASE (safety_is_sound_when_the_inside_bound_is_actually_nonzero)
 
 BOOST_AUTO_TEST_CASE (capacity_is_the_sum_of_the_cell_volumes)
 
 BOOST_AUTO_TEST_CASE (the_bounding_box_is_tight_around_the_retained_boxes)
 
 BOOST_AUTO_TEST_CASE (the_normal_on_a_face_is_the_face_normal)
 
 BOOST_AUTO_TEST_CASE (the_normal_selection_is_scale_invariant_across_cells)
 
 BOOST_AUTO_TEST_CASE (a_zero_extent_cell_bbox_does_not_burn_the_whole_cubify_budget)
 
 BOOST_AUTO_TEST_CASE (a_sidecar_round_trip_reproduces_the_solid)
 
 BOOST_AUTO_TEST_CASE (writing_an_unclosed_shape_is_refused)
 
 BOOST_AUTO_TEST_CASE (a_truncated_sidecar_is_refused_rather_than_half_loaded)
 
 BOOST_AUTO_TEST_CASE (the_shape_survives_a_ROOT_file_without_its_sidecar)
 
 BOOST_AUTO_TEST_CASE (a_far_box_that_extends_the_union_is_recovered_by_the_unpruned_retry)
 
 BOOST_AUTO_TEST_CASE (the_pruned_DistFromInside_is_bit_identical_to_its_twin_on_the_staggered_chain)
 

Macro Definition Documentation

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK

Definition at line 16 of file testFlatCSG.cxx.

◆ BOOST_TEST_MAIN

#define BOOST_TEST_MAIN

Definition at line 15 of file testFlatCSG.cxx.

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Test O2FlatCSG class
Author
Sandro Wenzel sandr.nosp@m.o.we.nosp@m.nzel@.nosp@m.cern.nosp@m..ch
Since
2026-08

Definition at line 14 of file testFlatCSG.cxx.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/34]

BOOST_AUTO_TEST_CASE ( a_box_wholly_inside_a_cell_carries_no_active_halfspaces  )

Definition at line 662 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [2/34]

BOOST_AUTO_TEST_CASE ( a_cell_without_a_bbox_fails_loudly_instead_of_vanishing  )

Definition at line 686 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [3/34]

BOOST_AUTO_TEST_CASE ( a_far_box_that_extends_the_union_is_recovered_by_the_unpruned_retry  )

Definition at line 1416 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [4/34]

BOOST_AUTO_TEST_CASE ( a_nan_cell_bbox_fails_loudly_instead_of_defeating_the_inverted_box_check  )

Definition at line 733 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [5/34]

BOOST_AUTO_TEST_CASE ( a_ray_along_the_long_arm_crosses_every_cell_it_should  )

Definition at line 901 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [6/34]

BOOST_AUTO_TEST_CASE ( a_ray_leaving_one_cell_into_a_touching_one_does_not_stop_between_them  )

Definition at line 314 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [7/34]

BOOST_AUTO_TEST_CASE ( a_shape_that_failed_to_close_still_answers_through_the_loop_twins  )

Definition at line 996 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [8/34]

BOOST_AUTO_TEST_CASE ( a_sidecar_round_trip_reproduces_the_solid  )

Definition at line 1284 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [9/34]

BOOST_AUTO_TEST_CASE ( a_tilted_torus_is_the_same_solid_as_an_upright_one_rotated  )

Definition at line 420 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [10/34]

BOOST_AUTO_TEST_CASE ( a_truncated_sidecar_is_refused_rather_than_half_loaded  )

Definition at line 1336 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [11/34]

BOOST_AUTO_TEST_CASE ( a_zero_extent_cell_bbox_does_not_burn_the_whole_cubify_budget  )

Definition at line 1253 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [12/34]

BOOST_AUTO_TEST_CASE ( an_inverted_cell_bbox_fails_loudly_instead_of_being_kept_as_solid  )

Definition at line 716 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [13/34]

BOOST_AUTO_TEST_CASE ( box_distances_match_TGeoBBox  )

Definition at line 214 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [14/34]

BOOST_AUTO_TEST_CASE ( box_from_six_planes_contains_like_TGeoBBox  )

Definition at line 123 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [15/34]

BOOST_AUTO_TEST_CASE ( capacity_is_the_sum_of_the_cell_volumes  )

Definition at line 1149 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [16/34]

BOOST_AUTO_TEST_CASE ( safety_is_sound_and_matches_its_twin  )

Definition at line 1067 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [17/34]

BOOST_AUTO_TEST_CASE ( safety_is_sound_when_the_inside_bound_is_actually_nonzero  )

Definition at line 1099 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [18/34]

BOOST_AUTO_TEST_CASE ( tangential_ray_on_a_cylinder_from_a_point_on_its_surface_has_no_nan_root  )

Definition at line 339 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [19/34]

BOOST_AUTO_TEST_CASE ( the_accelerated_contains_is_bit_identical_to_its_twin  )

Definition at line 830 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [20/34]

BOOST_AUTO_TEST_CASE ( the_accelerated_distances_are_bit_identical_to_their_twins  )

Definition at line 871 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [21/34]

BOOST_AUTO_TEST_CASE ( the_accelerated_distances_track_their_twins_when_a_plane_is_rescaled  )

Definition at line 940 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [22/34]

BOOST_AUTO_TEST_CASE ( the_bounding_box_is_tight_around_the_retained_boxes  )

Definition at line 1158 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [23/34]

BOOST_AUTO_TEST_CASE ( the_boxes_cover_the_solid_and_their_active_lists_are_sound  )

Definition at line 601 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [24/34]

BOOST_AUTO_TEST_CASE ( the_normal_on_a_face_is_the_face_normal  )

Definition at line 1198 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [25/34]

BOOST_AUTO_TEST_CASE ( the_normal_selection_is_scale_invariant_across_cells  )

Definition at line 1216 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [26/34]

BOOST_AUTO_TEST_CASE ( the_pruned_DistFromInside_is_bit_identical_to_its_twin_on_the_staggered_chain  )

Definition at line 1432 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [27/34]

BOOST_AUTO_TEST_CASE ( the_range_bound_encloses_the_sampled_range  )

Definition at line 499 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [28/34]

BOOST_AUTO_TEST_CASE ( the_sampled_boundary_points_flip_containment  )

Definition at line 845 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [29/34]

BOOST_AUTO_TEST_CASE ( the_shape_survives_a_ROOT_file_without_its_sidecar  )

Definition at line 1350 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [30/34]

BOOST_AUTO_TEST_CASE ( torus_contains_and_distances_match_TGeoTorus  )

Definition at line 366 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [31/34]

BOOST_AUTO_TEST_CASE ( tube_distances_match_TGeoTube_through_the_bore  )

Definition at line 250 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [32/34]

BOOST_AUTO_TEST_CASE ( tube_from_two_cylinders_and_two_planes_contains_like_TGeoTube  )

Definition at line 147 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [33/34]

BOOST_AUTO_TEST_CASE ( two_disjoint_cells_are_a_union  )

Definition at line 183 of file testFlatCSG.cxx.

◆ BOOST_AUTO_TEST_CASE() [34/34]

BOOST_AUTO_TEST_CASE ( writing_an_unclosed_shape_is_refused  )

Definition at line 1310 of file testFlatCSG.cxx.