1pub mod advancing_front;
19#[cfg(test)]
21pub mod allocation_counter;
22mod alpha_shape;
23pub mod anisotropic_remesh;
26pub mod arrangement_3d;
28pub mod arrangements;
30pub mod authoring;
32pub mod benchmark_corpus;
35pub mod bentley_ottmann;
37pub mod boolean_2;
38pub mod boolean_3;
39mod box_join;
40mod bvh;
41pub mod calipers_enclosing_disk;
44pub mod capability_manifests;
46pub mod cdt_retriangulation;
48pub mod cknn_laplacian;
50mod combinatorial_map;
51mod connectivity;
52pub mod constrained_delaunay;
53pub mod convex_decomposition;
55pub mod corefine_3d;
57mod corpus_4;
58pub mod csg_section;
60mod csr_adjacency;
61pub mod dcel_overlay;
65pub mod ddg_operators;
66mod decimate_3;
67pub mod delaunay_2;
68mod delaunay_3;
69pub mod delaunay_refine;
71mod determinism_corpus;
72pub mod deterministic_geometry;
73mod distance;
74pub mod exact_arrangement;
76mod exact_construct_3;
77mod exact_kernel;
78mod expansion;
79mod features;
80pub mod fem_certificate;
81pub mod fixture_registry;
85pub mod geometry_integration;
86pub mod geometry_workspace;
89pub mod gpu;
90pub mod gpu_3d;
91pub mod gpu_oracle;
93pub mod half_plane_lp;
97pub mod ham_sandwich;
99mod hull;
100mod hull_3;
101mod incircle;
102mod insphere;
103mod isosurface;
104mod kd_tree;
105mod kernel;
106pub mod kirkpatrick;
109mod laplacian_3d;
110pub mod math_geometry;
111pub mod mesh_quality;
114mod minkowski_2;
115pub mod mixed_cell_topology;
116pub mod motion_planning;
117pub mod nary_boolean;
119pub mod nary_csg;
121pub mod natural_neighbour;
123pub mod nn_query;
125mod orient3d;
126pub mod parametric_cad;
127pub mod persistence;
129pub mod point_location;
131mod point_set_3d;
132pub mod polygon_soup;
133pub mod polygon_validation;
135mod primitives;
136pub mod quad_octree_mesh;
140pub mod query_frontend;
141pub mod range_reporting;
143pub mod range_trees;
146mod recon_section;
147mod reconstruct_3d;
148mod remesh_3;
149pub mod screened_poisson;
150pub mod segment_intersection_2;
152pub mod simplify_snap;
154pub mod sos;
156mod spatial_order;
157pub mod statistical_manifold;
159mod surface_mesh;
160mod surface_mesh_processing;
161mod tda;
162pub mod tet_quality_improve;
166mod tool;
167mod topology;
168pub mod trapezoidal_map;
171mod tri_tri_3;
172pub mod triangulation_2;
174pub mod triangulation_opt;
176mod voronoi_2;
177pub mod voronoi_variants;
179pub mod vr_filtration;
181
182#[cfg(test)]
183mod exact_test_helper;
184
185pub use advancing_front::{
186 advancing_front_tetrahedralise_3d, advancing_front_triangulate_2d, FrontError, FrontOptions2d,
187 FrontOptions3d, FrontResult2d, FrontResult3d,
188};
189pub use alpha_shape::{
190 alpha_shape_2d, alpha_shape_3d, alpha_shape_hash, max_triangles, AlphaEdge, AlphaShapeError,
191 AlphaShapeReport, EdgeClass, TriangleClass,
192};
193pub use anisotropic_remesh::{
194 anisotropic_remesh, required_anisotropic_output_capacity, AnisotropicRemeshError,
195 AnisotropicRemeshOptions, AnisotropicRemeshReport, FeatureEdge,
196};
197pub use arrangement_3d::{
198 build_arrangement_3d, radial_sort_around_edge, validate_arrangement, Arrangement3D,
199 ArrangementError as Arrangement3DError, EdgeKey, Region, Shell,
200};
201pub use benchmark_corpus::{
202 compute_p10_corpus_baseline_hash, run_p10_corpus, CorpusReport, CORPUS_VERSION,
203};
204pub use bentley_ottmann::{
205 bentley_ottmann_intersections, brute_force_intersections, brute_force_red_blue_intersections,
206 red_blue_intersections, SweepSegment,
207};
208pub use boolean_2::{
209 boolean_difference_area, boolean_intersection_area, boolean_union_area, point_in_polygon,
210 polygon_area, polygon_signed_area, verify_area_conservation, BooleanError, BooleanOp,
211};
212pub use boolean_3::{
213 boolean_3, boolean_3_exact, boolean_3_with_kernel, required_triangles_3, required_vertices_3,
214 Boolean3Error, Boolean3Op,
215};
216pub use box_join::{box_join_brute_force, box_join_bvh, BoxJoinError, BoxPair};
217pub use bvh::{
218 build_bvh_recursive, query_closest, query_overlap, BvhError, BvhNode, BVH_NODE_SIZE,
219 MAX_BVH_DEPTH,
220};
221pub use calipers_enclosing_disk::{
222 diameter_and_width, rotating_calipers, smallest_enclosing_disk, AntipodalPair, CalipersError,
223 CalipersResult, Disk, EnclosingDisk,
224};
225pub use cdt_retriangulation::{cdt_retriangulate_facet, CdtError};
226pub use combinatorial_map::{
227 darts_to_half_edges, half_edges_to_darts, validate_combinatorial_map, CMapError, Dart,
228};
229pub use connectivity::{
230 compute_connectivity, count_boundary_loops, euler_characteristic, genus_from_euler,
231 label_components, ConnectivityError, ConnectivitySummary,
232};
233pub use constrained_delaunay::{
234 conforming_delaunay_2, constraint_edge_present, ConstrainedDelaunayError,
235};
236pub use convex_decomposition::{
237 convex_decomposition_hm, convex_decomposition_triangulation, is_convex_polygon,
238 verify_convex_decomposition,
239};
240pub use corefine_3d::{
241 corefine_3d, count_shared_vertices, verify_refinement_preserves_triangles,
242 CorefinementResult3D, Mesh3D as Mesh3DCorefine,
243};
244pub use corpus_4::{
245 corpus_hash, run_delaunay_corpus, run_full_corpus, run_incircle_corpus, run_orientation_corpus,
246};
247pub use csg_section::{
248 decode_csg_section, deserialize_expr, encode_csg_section, repair_mesh, serialize_expr,
249 CsgSection, CsgSectionError, DecodedCsgSection, RepairReport as MeshRepairReport, CSG_MAGIC,
250 CSG_TYPE_ARRANGEMENT, CSG_TYPE_EXPRESSION, CSG_TYPE_REPAIR_REPORT, CSG_VERSION,
251};
252pub use csr_adjacency::{
253 build_face_adjacency_csr, build_vertex_adjacency_csr, required_face_neighbours,
254 required_face_offsets, required_vertex_neighbours, required_vertex_offsets, CsrError,
255 CsrHeader, CsrSummary,
256};
257pub use ddg_operators::{
258 boundary_of_boundary_is_zero, boundary_of_simplex, cotangent_laplacian, curvature_angle_defect,
259 encode_ddg_operator_section, face_vector_areas, geodesic_distances_dijkstra,
260 harmonic_parameterize_disk, heat_step, hodge_decomposition_summary, mean_curvature_flow_step,
261 parallel_transport_angle, solve_poisson_jacobi, surface_area_gradient, vertex_normals,
262 ChainTerm, CurvatureSample, DdgError, DdgReport, DdgSectionHeader, HodgeSummary, SparseEntry,
263 DDG_SECTION_MAGIC, DDG_SECTION_VERSION,
264};
265pub use decimate_3::{
266 decimate_qem, decimate_qem_with_kernel, required_triangles, required_vertices, DecimateError,
267 DecimateOptions, DecimateReport,
268};
269pub use delaunay_2::{
270 delaunay_triangulation_2, triangulation_hash, verify_delaunay, DelaunayError,
271};
272pub use delaunay_3::{
273 delaunay_tetrahedralization_3, delaunay_tetrahedralization_3_with_kernel,
274 required_tetrahedra_3, tetrahedralization_hash, verify_delaunay_3,
275 verify_delaunay_3_with_kernel, Delaunay3Error,
276};
277pub use delaunay_refine::{
278 delaunay_refine_2, verify_refined_mesh, RefineError, RefineOptions,
279 RUPPERT_TERMINATION_BOUND_DEG,
280};
281pub use determinism_corpus::compute_corpus_hash;
282pub use deterministic_geometry::{
283 all_nearest_neighbours, beta_skeleton_graph, bichromatic_nearest_pair,
284 build_batch_dynamic_kd_tree, conflict_graph_pairs, deterministic_pack_u32,
285 deterministic_reduce_f64, deterministic_scan_u64, dynamic_kd_compact, dynamic_kd_delete,
286 dynamic_kd_insert, dynamic_kd_nearest, euclidean_mst, external_memory_nearest_tiles,
287 gabriel_graph, generate_spatial_points, greedy_spanner, knn_graph, list_rank_successors,
288 nearest_pair, reproducible_benchmark_report, reservation_batch_hull_2d,
289 seeded_incremental_order, smallest_enclosing_ball, tree_contract_roots, well_separated_pairs,
290 BatchDynamicKdTree, BenchmarkReport, ConflictEdge, DeterministicGeometryError, DynamicKdRecord,
291 EnclosingBall, NearestPair, SpatialGeneratorKind, WeightedEdge, WellSeparatedPair,
292};
293pub use distance::{
294 distance_2d, distance_3d, distance_sq_2d, distance_sq_3d, point_line_distance_sq_2d,
295 point_segment_distance_2d, point_segment_distance_sq_2d, point_segment_distance_sq_3d,
296 point_triangle_distance_sq_3d, ray_triangle_intersect_3d, segment_segment_intersect_2d, Aabb,
297 RayTriangleHit, RayTriangleResult, SegmentIntersection2d,
298};
299pub use exact_arrangement::{
300 build_exact_arrangement, max_coordinate_error, verify_euler, verify_general_position_counts,
301 zone_traversal, ArrangementEdge, ArrangementError, ArrangementVertex, ExactArrangement,
302 ExactLine2, ZoneTraversal,
303};
304pub use exact_construct_3::{
305 construct_segment_plane_intersection_3, construct_segment_triangle_intersection_3,
306 orient_3d_exact_3, segment_plane_parameter_sign, Exact3Error, ExactPoint3, ParameterSpan,
307 TriangleContainment,
308};
309pub use exact_kernel::{
310 construct_segment_intersection, orientation_2_exact, ExactConstructionKernel, ExactPoint2,
311};
312pub use expansion::{
313 compress_expansion, expansion_sum, fast_two_sum, grow_expansion, negate_expansion,
314 scalar_product, scalar_sum, scale_expansion, sign_of_expansion, two_diff, two_product, two_sum,
315 ExpansionError, Sign, MAX_EXPANSION_INCIRCLE, MAX_EXPANSION_INSPHERE, MAX_EXPANSION_ORIENT2,
316 MAX_EXPANSION_ORIENT3,
317};
318pub use features::{
319 encode_topology_features_10d, encode_topology_features_10d_with_connectivity, FeatureError,
320};
321pub use fem_certificate::{
322 build_fem_certificate, decode_fem_certificate, encode_fem_certificate, BoundaryMarker,
323 FemCertificate, FemCertificateError, MaterialRegion, FEM_CERT_ENCODED_LEN, FEM_CERT_MAGIC,
324 FEM_CERT_VERSION,
325};
326pub use fixture_registry::{
327 validate_records, FixtureOrigin, FixtureRecord, FixtureRegistry, FixtureRegistryError,
328 LicenceKind, UsePermission, SEED_FIXTURES,
329};
330pub use geometry_integration::{
331 build_section_header, cancel_stream_at, closeout_summary, encode_section_header,
332 plan_stream_chunks, renderer_descriptor, schema_descriptor, validate_conformance,
333 validate_conformance_matrix, validate_operation_descriptor, GeometryBackendKind,
334 GeometryCloseoutRecord, GeometryConformanceMatrixRow, GeometryConformanceRecord,
335 GeometryEvidenceLevel, GeometryOperationDescriptor, GeometryRenderableDescriptor,
336 GeometrySchemaDescriptor, GeometrySchemaKind, GeometrySectionHeader, GeometryStreamChunk,
337 IntegrationError, GEOMETRY_SECTION_MAGIC,
338};
339pub use geometry_workspace::{
340 deterministic_partition, deterministic_reduce, Cancellation, GeometryWorkspace, WorkspaceError,
341 DEFAULT_WORKSPACE_BUDGET,
342};
343pub use gpu::{
344 emit_geometry_wgsl, evaluate_orientation_batch_f32, GeometryGpuError, GeometryGpuKernel,
345 GeometryGpuSchedule, GPU_ORIENTATION_UNCERTAIN,
346};
347pub use gpu::{
348 evaluate_aabb_overlap_batch_f32, gpu_candidate_box_join, merge_aabb_overlap_results,
349 GPU_OVERLAP_NO, GPU_OVERLAP_UNCERTAIN, GPU_OVERLAP_YES,
350};
351pub use gpu_3d::{
352 evaluate_point_in_tetra_batch_f32, gpu_filter_point_in_tetra_f32, point_in_tetra_wgsl,
353 Gpu3dError, POINT_IN_TETRA_BOUNDARY, POINT_IN_TETRA_INSIDE, POINT_IN_TETRA_OUTSIDE,
354 POINT_IN_TETRA_STRIDE, POINT_IN_TETRA_UNCERTAIN,
355};
356pub use half_plane_lp::{
357 half_plane_intersection, linear_program_2d, HalfPlane, HalfPlaneIntersection, LpResult2d,
358};
359pub use ham_sandwich::{
360 centrepoint, directional_width, ham_sandwich_cut, tukey_depth, width, width_coreset,
361 Centrepoint, HamSandwichCut, WidthCoreset,
362};
363pub use hull::{
364 convex_hull_2, convex_hull_indices_2, convex_hull_indices_2_with_kernel, convex_hull_tensor_xy,
365 convex_hull_tensor_xy_with_kernel, is_ccw_strongly_convex_2,
366 is_ccw_strongly_convex_2_with_kernel, HullError,
367};
368pub use hull_3::{convex_hull_3, convex_hull_3_with_kernel, required_hull_3_faces, Hull3Error};
369pub use incircle::incircle;
370pub use insphere::insphere;
371pub use isosurface::{isosurface_hash, marching_cubes, IsosurfaceError};
372pub use kd_tree::{
373 build_kd_tree_3d, query_nearest_3d, query_radius_3d, KdNode, KdTreeError, KD_NODE_SIZE,
374 MAX_KD_DEPTH,
375};
376pub use kernel::{
377 ConstructionKernel, ExactPoint2 as KernelExactPoint2, FilteredF64Kernel, GeometryKernel,
378 Unsupported,
379};
380pub use kirkpatrick::{KirkpatrickError, KirkpatrickHierarchy};
381pub use laplacian_3d::{
382 cknn_laplacian_3d, cknn_laplacian_normalised_3d, verify_laplacian_properties, LaplacianError,
383};
384pub use math_geometry::{
385 barycentric_tetra, best_translation_registration, caratheodory_reduce_3d,
386 convexity_certificate_polyline, cross_ratio_1d, curve_differential, frame_to_world,
387 householder_reflect, hyperplane_eval, point_from_projective, project_points_to_plane,
388 projective_from_point, quaternion_normalize, quaternion_slerp, quaternion_to_matrix,
389 schur_complement_2x2, separating_plane_aabb, so3_exp, so3_log, solve_diagonal_quadratic,
390 surface_patch_differential, world_to_frame, AffineFrame3, ConvexityCertificate,
391 CurveDifferential, HomogeneousPoint3, Hyperplane3, MathGeometryError, QuadraticSolution,
392 Quaternion, SeparatingPlane, SurfaceDifferential,
393};
394pub use mesh_quality::{
395 check_field_conformance_tet, check_field_conformance_tri, tet_mesh_quality_slice, tet_quality,
396 tet_quality_points, tri_mesh_quality_2d, tri_quality, tri_quality_points, tri_signed_area_2d,
397 AnisotropyField, FieldConformance, MeshQualityError, MetricTensor, SizeField,
398 TetMeshQualityStats, TetQuality, TriMeshQualityStats, TriQuality,
399};
400pub use minkowski_2::{
401 minkowski_difference_2, minkowski_sum_2, minkowski_sum_brute_force, minkowski_sum_convex,
402 minkowski_sum_non_convex, MinkowskiError,
403};
404pub use mixed_cell_topology::{
405 extract_boundary_faces, hex_to_tetrahedra, quad_to_triangles, tets_to_mixed,
406 triangles_to_mixed, validate_mixed_cells, BoundaryFace, MixedCell, MixedTopologyError,
407 MixedTopologyReport, CELL_KIND_HEX, CELL_KIND_QUAD, CELL_KIND_TETRA, CELL_KIND_TRIANGLE,
408};
409pub use motion_planning::{
410 belief_update_2d, configuration_obstacle_translate, continuous_segment_collision,
411 coverage_lawnmower, feedback_vector, forward_kinematics_2d, interpolate_pose2, jacobian_2d,
412 kinodynamic_propagate, multi_robot_conflict_free, normalize_pose, normalize_pose3,
413 pursuit_step, rrt_plan, seeded_roadmap, segment_collision_free, time_parameterize_path,
414 visibility_graph_path, BeliefState2, CollisionReport, Control2, Joint2, PlannedPath,
415 PlanningError, PolygonObstacle, Pose2, Pose3, TimedPose2,
416};
417pub use nary_boolean::{
418 evaluate_expr, nary_boolean, BoolExpr, MeshInput, NaryBoolError, RegionMask, MAX_OPERANDS,
419};
420pub use nary_csg::{
421 corefine_2d, nary_csg, verify_pairwise_inclusion_exclusion, CorefinementResult2D, Mesh2D,
422 NaryCsgError, NaryCsgResult, NaryOp, PolygonWithHoles as NaryPolygonWithHoles,
423};
424pub use orient3d::orient_3d;
425pub use parametric_cad::{
426 bezier_derivative_eval, bezier_eval, bspline_eval, bspline_insert_uniform_knot,
427 budgeted_evolution_optimize, classify_trim_uv, continuity_between_curves, helical_lattice,
428 latin_hypercube_samples, loft_profiles, nurbs_eval, offset_polyline, rbf_surrogate_predict,
429 revolve_profile, sdf_compose, sdf_eval, shape_distance, tensor_surface_eval,
430 tensor_surface_sample, tube_along_polyline, validate_parameters,
431 vascular_lattice_adapter_notice, CadError, ContinuityReport, DomainAdapterNotice,
432 NurbsControlPoint, OptimizationReport, ParameterConstraint, SdfOp, SdfPrimitive, ShapeDistance,
433 SurfaceSample, SurrogatePrediction,
434};
435pub use point_location::{
436 build_slab_map, locate_point, point_in_triangle, point_strictly_in_triangle,
437 triangulation_to_subdivision, walk_locate, LocateResult, PointLocationError, SlabMap,
438 SubdivisionEdge,
439};
440pub use point_set_3d::{
441 average_spacing_3d, cknn_graph_3d, cknn_hash, knn_all_brute_force_3d, knn_brute_force_3d,
442 knn_hash, knn_search_3d, local_density_3d, mean_knn_distance_3d, remove_outliers_3d, CknnEdge,
443 KnnEntry, PointSetError, MAX_K,
444};
445pub use polygon_soup::{
446 build_face_adjacency, count_flipped, filter_degenerate_faces, merge_vertices,
447 orient_consistently, repair_polygon_soup, FaceAdjacencyEntry, RepairReport, SoupError,
448};
449pub use polygon_validation::{
450 canonicalize_polygon_with_holes, canonicalize_simple_polygon, repair_for,
451 validate_polygon_with_holes, validate_pslg, validate_simple_polygon, PolygonWithHoles,
452 PslgEdge, RepairSuggestion, ValidationIssue, ValidationReport,
453};
454pub use primitives::{orientation_2, orientation_2_tensor_xy, Orientation, Point2, Point3};
455pub use quad_octree_mesh::{
456 balance_octtree_2to1, balance_quadtree_2to1, build_octtree, build_quadtree, const_size_fn_3d,
457 octtree_to_hexahedra, octtree_to_tetrahedra, quadtree_to_triangles, size_field_2d_fn,
458 size_target_refiner_2d, size_target_refiner_3d, OctLeaf, OctMeshError, OctMeshOptions, OctNode,
459 OctTree, QuadLeaf, QuadMeshError, QuadMeshOptions, QuadNode, QuadTree, OCT_MAX_LEVEL,
460 QUAD_MAX_LEVEL,
461};
462pub use query_frontend::{QueryFrontendError, QueryStats, SpatialIndexQuery};
463pub use range_reporting::{CuttingTree, Halfspace2, KdTree2, PartitionTree};
464pub use recon_section::{
465 crc32c, decode_recon_section, encode_recon_section, recon_hash, DecodedRecon,
466 ReconSectionError, RECON_HEADER_SIZE, RECON_MAGIC, RECON_TYPE_ALPHA_SHAPE_2D,
467 RECON_TYPE_ALPHA_SHAPE_3D, RECON_TYPE_ISOSURFACE, RECON_TYPE_LAPLACIAN, RECON_TYPE_PERSISTENCE,
468 RECON_VERSION,
469};
470pub use reconstruct_3d::{poisson_reconstruct_3d, ReconstructionError};
471pub use remesh_3::{
472 isotropic_remesh, isotropic_remesh_with_kernel, required_output_capacity, RemeshError,
473 RemeshOptions, RemeshReport,
474};
475pub use screened_poisson::{
476 required_screened_poisson_capacity, screened_poisson_reconstruct_3d, ScreenedPoissonError,
477 ScreenedPoissonOptions, ScreenedPoissonReport,
478};
479pub use segment_intersection_2::{
480 classify_and_construct, classify_segment_intersection_2, line_segment_intersection_2,
481 ray_segment_intersection_2, SegmentIntersectionClass, SegmentIntersectionResult, TJunctionSide,
482};
483pub use simplify_snap::{
484 simplify_coplanar_regions, snap_round_3d, SimplifyError, SimplifyOptions, SimplifyResult,
485};
486pub use sos::orient_3d_sos;
487pub use spatial_order::{
488 hilbert_encode_2d, morton_decode_2d, morton_encode_2d, morton_encode_3d, sort_by_hilbert_2d,
489 sort_by_morton_2d, sort_by_morton_3d, SpatialOrderError, SpatialOrderHeader,
490};
491pub use surface_mesh::{
492 build_surface_mesh_maps, BoundaryLoopWalker, FaceLoopCirculator, OneRingCirculator,
493 SurfaceMeshError, SurfaceMeshView,
494};
495pub use surface_mesh_processing::{signed_volume, surface_area, MeshMeasureError};
496pub use tda::{
497 alpha_filtration_2d, compute_persistence, persistence_hash, PersistencePair, Simplex, TdaError,
498};
499pub use tet_quality_improve::{
500 improve_tet_mesh, verify_improvement, TetImproveError, TetImproveObjective, TetImproveOptions,
501 TetImproveResult,
502};
503pub use tool::{execute_geometry_tool_json, GeometryToolError};
504pub use topology::{
505 build_triangle_half_edges, required_edge_slots, EdgeSlot, HalfEdge, TopologyError,
506 TopologySummary, INVALID_INDEX,
507};
508pub use trapezoidal_map::{TmSegment, Trapezoid, TrapezoidalMap, TrapezoidalMapError};
509pub use tri_tri_3::{
510 required_self_intersection_pairs, self_intersecting_pairs, self_intersecting_pairs_with_kernel,
511 tri_tri_intersect_3, tri_tri_intersect_3_exact, tri_tri_intersect_3_with_kernel,
512 ExactTriTriSegment, TriPair, TriTriError, TriTriSegment,
513};
514pub use triangulation_2::{
515 triangulate_ear_clipping, triangulate_monotone, triangulate_polygon, verify_triangulation,
516 Triangle,
517};
518pub use triangulation_opt::{
519 evaluate_objective, optimise_and_evaluate, optimise_triangulation, TriObjective,
520 TriangulationOptError,
521};
522pub use voronoi_2::{
523 circumcenter, nearest_site_brute_force, nearest_site_via_delaunay, verify_voronoi_vertices,
524 voronoi_diagram_2, voronoi_hash, VoronoiEdge, VoronoiError, VoronoiVertex,
525};
526
527pub const GEOMETRY_ABI_VERSION: u32 = 1;