Skip to content

Conversation

@petrasvestartas
Copy link
Collaborator

Added

  • Added Clipper2 to CMakeLists.txt

Changed

  • Mapping method crops the pattern mesh to the boundaries of the target mesh.

Removed

  • Removed all the modules from init.py

Screenshot from 2025-06-03 18-04-48

tomvanmele
tomvanmele previously approved these changes Jun 3, 2025
Copy link
Member

@tomvanmele tomvanmele left a comment

Choose a reason for hiding this comment

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

LGTM although i think the mapping loop looks a bit weird

@tomvanmele tomvanmele dismissed their stale review June 3, 2025 20:41

builds not passing

@petrasvestartas
Copy link
Collaborator Author

petrasvestartas commented Jun 4, 2025

The output of the mesh map function is a list of points and faces representing individual polygons:

mv, mf = map_mesh((v, f), (pv, pf), clip_boundaries=True)
mesh_mapped = Mesh.from_vertices_and_faces(mv, mf)

This means, that duplicates points have to be removed.
This can be done in COMPAS:

mesh = Mesh.from_polygons(mesh_mapped.to_polygons())
mesh.weld()

Otherwise, if duplicate points are removed in libigl in the cropping method, mapping should be faster too.

UPDATE:

below hash method is implemented to remove duplicate points within a tolerance.

@tomvanmele tomvanmele merged commit 2d21043 into main Jun 4, 2025
5 checks passed
@jf---
Copy link

jf--- commented Jun 5, 2025

very cool the clipper2 integration!

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.

4 participants