Skip to content

fix: Make JsonSurfacesWriter work with ConvexPolygonBounds#5466

Merged
kodiakhq[bot] merged 3 commits into
acts-project:mainfrom
altsybee:main
May 19, 2026
Merged

fix: Make JsonSurfacesWriter work with ConvexPolygonBounds#5466
kodiakhq[bot] merged 3 commits into
acts-project:mainfrom
altsybee:main

Conversation

@altsybee

@altsybee altsybee commented May 19, 2026

Copy link
Copy Markdown
Contributor

Before PR #5195, SurfaceJsonConverter::toJson worked for any SurfaceBounds subclass. PR #5195 introduced the type-based TypeDispatcher, populated by Config::defaultConfig() in Plugins/Json/src/SurfaceJsonConverter.cpp. The default registration covers all bounds but not ConvexPolygonBounds<N>. The dispatcher then throws the error (TypeDispatcher.hpp:132–135) "RuntimeError: No function registered for type: Acts::ConvexPolygonBounds<4>").
The Fix:

  1. Added #include "Acts/Surfaces/ConvexPolygonBounds.hpp"
  2. Added a getSurfaceBoundsKind<> branch for ConvexPolygonBoundsBase returning "ConvexPolygon"
  3. Registered surfaceBoundsToJsonT<ConvexPolygonBoundsBase> in Config::defaultConfig()
  4. Registered "PlaneConvexPolygon" decoder.

Example from resulting .json:
image

@github-actions github-actions Bot added this to the next milestone May 19, 2026
@github-actions github-actions Bot added the Component - Plugins Affects one or more Plugins label May 19, 2026
@andiwand andiwand changed the title fix for JsonSurfacesWriter to work with ConvexPolygonBounds fix: Make JsonSurfacesWriter work with ConvexPolygonBounds May 19, 2026

@andiwand andiwand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 thanks @altsybee

@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

📊: Physics performance monitoring for 8c855e5

Full contents

physmon summary

@sonarqubecloud

Copy link
Copy Markdown

@kodiakhq kodiakhq Bot merged commit a8613c1 into acts-project:main May 19, 2026
46 checks passed
@andiwand andiwand modified the milestones: next, v46.6.0 May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Plugins Affects one or more Plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants