Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Mesh only corefined after applying clipping function

Subject: CGAL users discussion list

List archive

[cgal-discuss] Mesh only corefined after applying clipping function


Chronological Thread 
  • From: Conny <>
  • To:
  • Subject: [cgal-discuss] Mesh only corefined after applying clipping function
  • Date: Sun, 12 May 2019 08:54:01 -0500 (CDT)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Neutral ; spf=Pass
  • Ironport-phdr: 9a23:ntGwXBSNfurE0tU3AXemlQxWiNpsv+yvbD5Q0YIujvd0So/mwa69ZBGN2/xhgRfzUJnB7Loc0qyK6vmmCDZLvs7JmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MQi6oR/Vu8UIjodvKLo9wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9DrhyvpwJxzY3Jbo6aKPVwcbjQfc8YSGZdQspdSzBNDp26YoASD+QBJ+FYr4zlqlYQqhu+Aw+sBePywTJPh3D5w6s60+U7Hg3c2AIvBdMOsGjKo9juNKYdS+C1zK7PzTnZcvxZxy7w5Y7VeR4vpvGMWKh/ccvXyUQ3EQPKlE6fppfhPzyLzOgCr2+b7+9mWOmyiGAnsxl8riWry8ookIXEiIEYxkrH+Ch42oo4JNy1RUhmatC+CpRQrTuVN45uT8MiXW5ovCE6x6UAuZO0ZiQKzo4oyAXEZPyDbYeE+A7sVOGUITtghXJlfqywhwqq/ES9zuDxUtO43VhJoyZfkdTBt2oB2h3S58SfT/ty5Eah2TKB1wDJ7eFEJFg5mqvFJJ4nw74/jIAfv0DZES/3hEX5krSbd0U+9eio7OTnZa/qqYKCOINskAHxLrwumtCjAeQ/KgUBQ2eb9v641LH64EL5Qa5KgeErkqnCq5DXPt8bp668Aw9NyIkv8Re/DzG80NQZh3YLNlxFeAjUx7TublrBKfS9AfakiEm3ix9qwerHN/vvGMbjNH/GxZzme7BsoxpsxQwyxJZ97pNIB5kQKfL0XQn9uYqLXVcCLwWozrO/W51G3YQEVDfXW/7LAObpqVaNo9kXDayJbY4Rtiz6LqF9te/njXg+31MQL/PwgMknLUugF/EjGH23JHrhhtBYTDUM4kw4RebgjFDEWjlWNS/rA/AMowojAYfjNr/tA5i3ieXZjjayHppRIGxLWAiB

Hello,

I am trying to split a cuboid into several patches using the clip function.
However after calling the function, the mesh seems to be corefined but not
clipped. I read in the documentation that this happens when the output mesh
is not manifold, but what can I do to solve this problem?
Thanks for your help!


#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Polygon_mesh_processing/internal/clip.h>
#include <CGAL/Surface_mesh.h>
#include <iostream>
#include <fstream>

namespace PMP = CGAL::Polygon_mesh_processing;
namespace params = PMP::parameters;

typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3> Surface_mesh;


int main()
{
Surface_mesh tm, clipper;

std::ifstream input("data/cuboid.off");
input >> tm;
input.close();
input.open("data/layer1.off");
input >> clipper;
input.close();

std::cout << "Start clipping of tm ( "
<< num_faces(tm) << " faces, " << num_vertices(tm) << " vertices)." <<
std::endl;

bool valid_clip = PMP::clip(tm, clipper, true);
if (valid_clip)
{
std::cout << "Clipping done" << " (" << num_faces(tm) << " faces, " <<
num_vertices(tm) << " vertices)." << std::endl;
}
else{
std::cout << "Clipping not successful (" << num_faces(tm) << " faces, "
<< num_vertices(tm) << " vertices)." << std::endl;
}

//Output
std::ofstream off_file("patch.off");
off_file << tm;
off_file.close();

return EXIT_SUCCESS;
}

cuboid.off
<http://cgal-discuss.949826.n4.nabble.com/file/t376108/cuboid.off>
layer1.off
<http://cgal-discuss.949826.n4.nabble.com/file/t376108/layer1.off>



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/



Archive powered by MHonArc 2.6.18.

Top of Page