Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Polyhedron_3 to Nef_Polyhedron_3
- Date: Thu, 14 Jan 2016 10:10:30 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:Se2igxPISBnVjfmor/El6mtUPXoX/o7sNwtQ0KIMzox0KPr9rarrMEGX3/hxlliBBdydsKIazbqG+Pm7AiQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTpkbDisMSIOE1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvdKsxSflUDS8tLnsuzMztrxjKCwWVtVUGVWBD2CFFCQHe8BD3WN/VtTH7sfY1mAaXOsj7Uaoldz2p86BxWV6iwHMcMzkj8WbLzMl0pK1eqROl4Rd4xtiHM8muKPNic/aFLpshTm1bU5MJWg==
- Organization: GeometryFactory
If you use Polyhedron, the off must be a valid manifold surface.
If not you can use the function OFF_to_nef_3 from
include/CGAL/OFF_to_nef_3.h
Sebastien.
On 12/22/2015 12:12 PM, SHYAM SUNDAR KANNAN wrote:
Hello Everyone,
I am trying to find the symmetric difference of two polyhedrons. In
order to perform this Boolean operation in 3D I want to convert my
Polyderon_3 to Nef_Polyhedron_3.
I constructed my polyhedron with data from an .OFF file. Later when I
try to convert the Polyhedron_3 to Nef_Polyhedron_3 as
std::ifstream stream(path/data.off");
if(!stream) {
std::cerr << "Cannot open the reconstructed.off file!\n";
return 1;
}
Polyhedron R;
stream >> R;
if(!stream) {
std::cerr << "reconstructed.off is not a polyhedron\n";
return 1;
}
Nef_polyhedron N(R); //getting error in this line
(I am using Extended_homogeneous Kernel)
the conversion fails in most of the cases. It works for simple 3D
objects like cube etc.
For example:
It works for a cube with rectangular hole but fails for a cube with a
cylindrical hole.
Can anyone explain the reason for this. Are there any constraints
causing this limitation.
Is there way to convert all Polyhedrons to Nef_Polyherdon?
Thanking You in advance,
Regards,
Shyam Sundar Kannan.
- Re: [cgal-discuss] Polyhedron_3 to Nef_Polyhedron_3, Sebastien Loriot (GeometryFactory), 01/14/2016
Archive powered by MHonArc 2.6.18.