Skip to content

Generating a Polyhedron_3 from a triangle soup #8073

Closed Answered by gy114
gy114 asked this question in Q&A
Discussion options

You must be logged in to vote

This problem was fixed when I used a customized trait:

struct Array_traits {
        double marginSquared; // Member to store the squared margin for comparison

        // Constructor to initialize marginSquared
        Array_traits(double min_squared) : marginSquared(min_squared * 0.1) {} // Adjusting margin here directly

        struct Equal_3 {
            double marginSquared;
            Equal_3(double marginSquared) : marginSquared(marginSquared) {}

            bool operator()(const K::Point_3& p, const K::Point_3& q) const {
                return CGAL::squared_distance(p, q) < marginSquared;
            }
        };

        struct Less_xyz_3 {
            double marginSquared;
…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gy114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant