Skip to content

Conversation

@maxmnemonic
Copy link
Contributor

@maxmnemonic maxmnemonic commented Mar 27, 2025

Added automatic transformation of page cell_bbox coord origin to the same as input bbox.coord_origin when requesting get_cells_in_bbox.

Current behavior - is to throw error and stop if the input coord_origin differs from backend page coord_origin, which is almost always when get_cells_in_bbox is used in a client code of Docling. This PR fixes it, and presents resulting cells pre-transformed into the same origin as input crop bbox.

This small fix removes the overhead in the client code we put in Docling.

…same as input bbox.coord_origin when requesting get_cells_in_bbox

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
@maxmnemonic maxmnemonic added the enhancement New feature or request label Mar 27, 2025
@maxmnemonic maxmnemonic requested a review from cau-git March 27, 2025 15:33
@maxmnemonic maxmnemonic self-assigned this Mar 27, 2025
@mergify
Copy link

mergify bot commented Mar 27, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@maxmnemonic maxmnemonic marked this pull request as ready for review March 27, 2025 15:50
@PeterStaar-IBM PeterStaar-IBM self-requested a review March 27, 2025 16:24
@maxmnemonic maxmnemonic changed the title fix: Automatic transformation of output cells bbox coord origin defined by input in get_cells_in_bbox fix: Automatic transformation of output cells bbox coord origin defined by input in get_cells_in_bbox (WIP) Mar 28, 2025
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
@maxmnemonic maxmnemonic force-pushed the dev/page_cells_in_bbox_fullauto_origin branch from 3ba1632 to 814f78a Compare March 28, 2025 10:41
…e a copy

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
@maxmnemonic maxmnemonic changed the title fix: Automatic transformation of output cells bbox coord origin defined by input in get_cells_in_bbox (WIP) fix: Automatic transformation of output cells bbox coord origin defined by input in get_cells_in_bbox Mar 28, 2025
Copy link
Contributor

@cau-git cau-git left a comment

Choose a reason for hiding this comment

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

🛠️ nice fix.

@cau-git cau-git merged commit 8e0e9b7 into main Mar 28, 2025
8 checks passed
@cau-git cau-git deleted the dev/page_cells_in_bbox_fullauto_origin branch March 28, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants