Skip to content

enhance: add fit_to_points method#295

Open
kshitij-maths wants to merge 1 commit intomathLab:masterfrom
kshitij-maths:set-default-bounding-box
Open

enhance: add fit_to_points method#295
kshitij-maths wants to merge 1 commit intomathLab:masterfrom
kshitij-maths:set-default-bounding-box

Conversation

@kshitij-maths
Copy link
Copy Markdown
Member

Summary

Add a fit_to_points method to the FFD class that automatically positions the FFD bounding box based on the input points. This provides a more intuitive default case for morphing setups. This is resolves issue #135

Changes

  • New method FFD.fit_to_points(points, padding_factor=0.05)
    • Computes the axis‑aligned bounding box of the given points.
    • Adds a configurable padding (default 5% of the object size) ensuring some room for deformations and covering boundary points.
    • Sets box_origin and box_length accordingly.

@kshitij-maths kshitij-maths changed the title enhance: add fit_to_points method to automatically position FFD box b… enhance: add fit_to_points method Mar 28, 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.

1 participant