Skip to content

Commit

Permalink
Merge branch 'main' into importlib_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartboogert authored Oct 2, 2024
2 parents c52f2ab + c746f0d commit 4a3783d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
32 changes: 16 additions & 16 deletions src/pyg4ometry/pycgal/Polygon_mesh_processing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ typedef CGAL::Aff_transformation_3<Kernel_ECER> Aff_transformation_3_ECER;
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Polygon_mesh_processing/distance.h>
#include <CGAL/Polygon_mesh_processing/orientation.h>
#include <CGAL/Polygon_mesh_processing/remesh.h>
// #include <CGAL/Polygon_mesh_processing/remesh.h>
#include <CGAL/Polygon_mesh_processing/transform.h>
#include <CGAL/Polygon_mesh_processing/triangulate_faces.h>
// #include <CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h>
#include <CGAL/Polygon_mesh_processing/smooth_mesh.h>
// #include <CGAL/Polygon_mesh_processing/smooth_mesh.h>
#include <CGAL/Polygon_mesh_processing/smooth_shape.h>

PYBIND11_MODULE(Polygon_mesh_processing, m) {
Expand Down Expand Up @@ -92,13 +92,13 @@ PYBIND11_MODULE(Polygon_mesh_processing, m) {
m.def("volume", [](Surface_mesh_EPICK &pm1) {
return CGAL::to_double(CGAL::Polygon_mesh_processing::volume(pm1));
});
m.def("isotropic_remeshing", [](Surface_mesh_EPICK &pm1,
double target_mesh_length, int nb_iter) {
return CGAL::Polygon_mesh_processing::isotropic_remeshing(
faces(pm1), target_mesh_length, pm1,
CGAL::parameters::number_of_iterations(nb_iter).protect_constraints(
true));
});
// m.def("isotropic_remeshing", [](Surface_mesh_EPICK &pm1,
// double target_mesh_length, int nb_iter) {
// return CGAL::Polygon_mesh_processing::isotropic_remeshing(
// faces(pm1), target_mesh_length, pm1,
// CGAL::parameters::number_of_iterations(nb_iter).protect_constraints(
// true));
// });
/*
m.def("angle_and_area_smoothing", [](Surface_mesh_EPICK &pm1, int nb_iter) {
return CGAL::Polygon_mesh_processing::angle_and_area_smoothing(pm1,
Expand Down Expand Up @@ -163,13 +163,13 @@ PYBIND11_MODULE(Polygon_mesh_processing, m) {
m.def("volume", [](Surface_mesh_EPECK &pm1) {
return CGAL::to_double(CGAL::Polygon_mesh_processing::volume(pm1));
});
m.def("isotropic_remeshing", [](Surface_mesh_EPECK &pm1,
double target_mesh_length, int nb_iter) {
return CGAL::Polygon_mesh_processing::isotropic_remeshing(
faces(pm1), target_mesh_length, pm1,
CGAL::parameters::number_of_iterations(nb_iter).protect_constraints(
true));
});
// m.def("isotropic_remeshing", [](Surface_mesh_EPECK &pm1,
// double target_mesh_length, int nb_iter) {
// return CGAL::Polygon_mesh_processing::isotropic_remeshing(
// faces(pm1), target_mesh_length, pm1,
// CGAL::parameters::number_of_iterations(nb_iter).protect_constraints(
// true));
// });

/**********************************************************************
ECER
Expand Down
3 changes: 2 additions & 1 deletion src/pyg4ometry/visualisation/VtkViewerNew.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from .VisualisationOptions import (
getPredefinedMaterialVisOptions as _getPredefinedMaterialVisOptions,
)
from pyg4ometry.pycgal.Polygon_mesh_processing import isotropic_remeshing as _isotropic_remeshing

# from pyg4ometry.pycgal.Polygon_mesh_processing import isotropic_remeshing as _isotropic_remeshing


class VtkViewerNew(_ViewerBase):
Expand Down

0 comments on commit 4a3783d

Please sign in to comment.