Skip to content

Trim cycle diagram arcs to object bounds#2748

Closed
mgalavai wants to merge 1 commit into
terrastruct:masterfrom
mgalavai:main
Closed

Trim cycle diagram arcs to object bounds#2748
mgalavai wants to merge 1 commit into
terrastruct:masterfrom
mgalavai:main

Conversation

@mgalavai
Copy link
Copy Markdown

@mgalavai mgalavai commented May 12, 2026

Summary

  • route cycle diagram edges as true cubic Bezier circle segments instead of sampled pseudo-curves
  • trim arc start/end angles at source and destination object boxes so edges begin/end at bounds
  • regenerate cycle-diagram txtar expected JSON/SVG fixtures

Status

Withdrawn from bounty consideration.

Test plan

  • go test ./d2layouts/d2cycle ./d2renderers/d2svg
  • TA=1 ./ci/test.sh ./e2etests -run TestE2E/txtar/cycle-diagram -v

@nagiexplorer88
Copy link
Copy Markdown

I think this still misses the border-clipping part of #1578 for non-rectangular cycle children.

createCircularArc trims only against edge.Src.Box and edge.Dst.Box via trimStartAngle / trimEndAngle, then assigns edge.Route = cubicArcRoute(...). There is no follow-up through TraceToShape / TraceToShapeBorder, and the regenerated cycle-diagram fixture appears to cover only default rectangle nodes.

That means a cycle child with shape: circle, oval, or hexagon can stop on the bounding box instead of the visible shape outline, while the bounty asks for the paths to start/stop at shape bounds. Adding one non-rectangle cycle fixture and clipping the first/last route points to the actual shape border would cover that case.

@mgalavai
Copy link
Copy Markdown
Author

Withdrawing this PR from bounty consideration.

@mgalavai mgalavai closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants