Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Assertion of Minkowski_sum_3
- Date: Fri, 27 May 2011 14:45:19 +0200
Sorry for the late answer,
I am working on a issue I though was similar to your
but one problem I have with correct.off and error.off is
that if I call the Polyhedron_3 method is_valid(true,4), then
it tells me that the polyhedron is not valid.
If I try loading the Nef_polyhedron using the function
OFF_to_nef_3, then the Nef_polyhedron I have is open and
so the minkowski sum cannot be done.
S.
johnzjq wrote:
Dear Sebastien,
I apologize that I have to open a new thread for minkowski_sum_3.
The attached two models are nearly identical, in which the model
"correct.off" is produced by the translation and rotation of model
"error.off". The model "cube.off" is the element object.
http://cgal-discuss.949826.n4.nabble.com/file/n3432805/correct.off
correct.off http://cgal-discuss.949826.n4.nabble.com/file/n3432805/error.off error.off http://cgal-discuss.949826.n4.nabble.com/file/n3432805/cube.off cube.off
The assertion is as follows:
File: c:\Program File (x86)\CGAL-3.7\include\CGAL/Nef_3/SNC_decorator.h
Line: 368
Explanation: it is not possible to decide which one is a visible facet (if
any)
Code that produces assertion is attached as follows:
#include <CGAL/Cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/Nef_polyhedron_3.h>
#include
typedef CGAL::Simple_cartesian kernal;
typedef CGAL::Nef_polyhedron_3 Nef_polyhedron_3;
typedef CGAL::Polyhedron_3 Polyhedron_3;
#define INPUT_PATH "d:\\error.off"
#define ELEMENT_PATH "d:\\cube.off"
#define OUTPUT_PATH "d:\\output.off"
int main(int argc, char **argv) { Polyhedron_3 model, cube;
std::fstream file1,file2;
file1.open(INPUT_PATH);
file2.open(ELEMENT_PATH);
if (!file1.is_open()&&!file2.is_open())
{
return;
}
file1>>model;
file2>>cube;
file1.close();
file2.close();
//
if (model.is_closed()&&cube.is_closed())
{
Nef_polyhedron_3 nefmodel1(model);
Nef_polyhedron_3 nefmodel2(cube);
nefmodel1= CGAL::minkowski_sum_3(nefmodel1,nefmodel2);
//
if(nmodel1.is_simple())
{
nefmodel1.convert_to_polyhedron(model);
file1.open(OUTPUT_PATH, std::ios::out);
if(file1.is_open())
{
file1<<std::fixed<<std::setprecision(6)<<model;
file1.close();
}
}
//
return 0; }
It would be appreciated if you could do some investigation of this problem.
Thanks very much.
John
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Assertion-of-Minkowski-sum-3-tp3432805p3432805.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- Re: [cgal-discuss] Assertion of Minkowski_sum_3, Sebastien Loriot (GeometryFactory), 05/27/2011
- RE: [cgal-discuss] Assertion of Minkowski_sum_3, ZHAO Junqiao \(John\), 05/29/2011
- Re: [cgal-discuss] Assertion of Minkowski_sum_3, Sebastien Loriot (GeometryFactory), 05/30/2011
- RE: [cgal-discuss] Assertion of Minkowski_sum_3, ZHAO Junqiao \(John\), 05/29/2011
Archive powered by MHonArc 2.6.16.