Skip to content

Add surface meshing parameters to Poisson surface reconstruction#60

Merged
tomvanmele merged 7 commits into
mainfrom
copilot/add-additional-parameter-inputs
Dec 12, 2025
Merged

Add surface meshing parameters to Poisson surface reconstruction#60
tomvanmele merged 7 commits into
mainfrom
copilot/add-additional-parameter-inputs

Conversation

Copilot AI commented Dec 11, 2025

Copy link
Copy Markdown
Contributor
  • Review CGAL documentation for available Poisson reconstruction parameters
  • Update C++ implementation to accept optional parameters (sm_angle, sm_radius, sm_distance)
  • Update C++ header file with new function signature
  • Update Python wrapper to accept and pass through new parameters with sensible defaults
  • Update docstrings in Python to document new parameters
  • Create/update tests to verify new parameters work correctly
  • Update example code to demonstrate parameter usage
  • Apply code formatting with black
  • Address code review feedback (refactor tests)
  • Run security checks (no issues found)
  • Update CHANGELOG.md

Summary

Successfully implemented support for additional parameter inputs for Poisson Surface Reconstruction:

Added Parameters:

  1. sm_angle (default: 20.0): Surface meshing angle bound in degrees - controls minimum angle of triangles
  2. sm_radius (default: 30.0): Surface meshing radius bound - controls triangle size relative to point cloud density
  3. sm_distance (default: 0.375): Surface meshing approximation error bound - controls mesh fidelity

Key Features:

  • All parameters have sensible defaults matching CGAL's recommendations
  • Backward compatible - existing code continues to work without changes
  • Comprehensive documentation with usage examples
  • Tested with multiple parameter combinations
  • Code passes all linters and security checks
  • CHANGELOG.md updated

Benefits:

Users can now control mesh quality and density to filter out vertices that don't belong to the original point cloud by adjusting sm_radius and sm_distance parameters, directly addressing the issue request.

Original prompt

This section details on the original issue you should resolve

<issue_title>Support for additional parameter inputs for Poisson Surface Reconstruction</issue_title>
<issue_description>Thank you for the excellent work!

Feature Request

As a designer, I want additional parameter inputs for Poisson Surface Reconstruction so that I can have more control over the generated mesh.

Details

Is your feature request related to a problem? Please describe.
The generated mesh has too many mesh vertices that do not belong to the original point cloud.

Describe the solution you'd like
There should be a parameter to filter the vertices. Like the CockRoach plugin in Rhino using "isovalue" orthe Grasshopper plugin using "density".

Appreciate your contribution again!
</issue_description>

<agent_instructions>explore passing parameters to poisson surface reconstruction</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@tomvanmele @petrasvestartas

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits December 11, 2025 12:09
Co-authored-by: jf--- <620988+jf---@users.noreply.github.com>
Co-authored-by: jf--- <620988+jf---@users.noreply.github.com>
Co-authored-by: jf--- <620988+jf---@users.noreply.github.com>
Co-authored-by: jf--- <620988+jf---@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for additional parameter inputs in Poisson Surface Reconstruction Add surface meshing parameters to Poisson surface reconstruction Dec 11, 2025
Copilot AI requested a review from jf--- December 11, 2025 12:21
@jf---

jf--- commented Dec 11, 2025

Copy link
Copy Markdown
Collaborator

@copilot update the changelog.md

Co-authored-by: jf--- <620988+jf---@users.noreply.github.com>

Copilot AI commented Dec 11, 2025

Copy link
Copy Markdown
Contributor Author

@copilot update the changelog.md

Updated CHANGELOG.md in commit c4ab4ce with an entry documenting the new surface meshing parameters added to poisson_surface_reconstruction.

@jf--- jf--- marked this pull request as ready for review December 11, 2025 12:30
@jf---

jf--- commented Dec 11, 2025

Copy link
Copy Markdown
Collaborator

wait for merging of other PR's, than we need to rebase this PR

@petrasvestartas

Copy link
Copy Markdown
Collaborator

Let's merge them one by one, so that there would be no conflicts.

@jf--- jf--- left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

super clean, uses the Eigen::Ref<const compas::RowMatrixXd>.
@petrasvestartas this PR is not related to pending PR's so can be merged.

@jf---

jf--- commented Dec 12, 2025

Copy link
Copy Markdown
Collaborator

I guess updating the docs where changes in the reconstruction parameters are shown is relevant.

@tomvanmele

Copy link
Copy Markdown
Member

i have integrated everything in the new mkdocs setup
https://compas.dev/compas_cgal/examples/example_geodesics/

there is a bit more cleaning up to do, but getting there...

@tomvanmele tomvanmele merged commit 193cd06 into main Dec 12, 2025
5 checks passed
@jf---

jf--- commented Dec 13, 2025

Copy link
Copy Markdown
Collaborator

there is a bit more cleaning up to do, but getting there...

wow, looks great!

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.

Support for additional parameter inputs for Poisson Surface Reconstruction

4 participants