CSG mesh generation cell size broken

Bug #1154991 reported by Garth Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Committed
Undecided
Benjamin Kehlet

Bug Description

The 3D CSG mesh generation gives erratic results when the cell size if given. The problem appears to be with the line

    const double r = PolyhedronUtils::getBoundingSphereRadius(p);

in CSGCGALMeshGenerator3D::generate(Mesh& mesh). The return value r is not deterministic, and often returns extremely large values, e.g. 10^54

Revision history for this message
Benjamin Kehlet (benjamik) wrote :

Ok. Do you have a simple example that reproduces this?

Changed in dolfin:
assignee: nobody → Benjamin Kehlet (benjamik)
Revision history for this message
Garth Wells (garth-wells) wrote : Re: [Bug 1154991] Re: CSG mesh generation cell size broken

On 14 March 2013 09:12, Benjamin Kehlet <email address hidden> wrote:
> Ok. Do you have a simple example that reproduces this?
>

from dolfin import *
sphere1 = Sphere(Point(0.0, 0.0, 0.0), 1.0)
sphere0 = Sphere(Point(0.0, 0.0, 0.0), 0.2)
g3d = sphere1 - sphere0;
mesh3d = Mesh(g3d, 32);

and put

cout << "*** Cell size: " << r << ", " << cell_size << ", " <<
(double) parameters["edge_size"] << endl;

on line 150 of CSGCGALMeshGenerator3D.cpp.

Sometimes 'r' is roughly right, sometimes it's zero and sometimes it's huge.

Garth

> ** Changed in: dolfin
> Assignee: (unassigned) => Benjamin Kehlet (benjamik)
>
> --
> You received this bug notification because you are a member of DOLFIN
> Core Team, which is subscribed to DOLFIN.
> https://bugs.launchpad.net/bugs/1154991
>
> Title:
> CSG mesh generation cell size broken
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dolfin/+bug/1154991/+subscriptions

Johannes Ring (johannr)
Changed in dolfin:
status: New → Confirmed
Revision history for this message
Benjamin Kehlet (benjamik) wrote :

2013/3/14 Garth Wells <email address hidden>

> On 14 March 2013 09:12, Benjamin Kehlet <email address hidden>
> wrote:
> > Ok. Do you have a simple example that reproduces this?
> >
>
>
> from dolfin import *
> sphere1 = Sphere(Point(0.0, 0.0, 0.0), 1.0)
> sphere0 = Sphere(Point(0.0, 0.0, 0.0), 0.2)
> g3d = sphere1 - sphere0;
> mesh3d = Mesh(g3d, 32);
>
>
> and put
>
> cout << "*** Cell size: " << r << ", " << cell_size << ", " <<
> (double) parameters["edge_size"] << endl;
>
> on line 150 of CSGCGALMeshGenerator3D.cpp.
>
> Sometimes 'r' is roughly right, sometimes it's zero and sometimes it's
> huge.
>
> Garth
>

I'm not able to reproduce this on my (32 bit) laptop. I'll try tomorrow on
another computer.

Benjamin

>
>
> > ** Changed in: dolfin
> > Assignee: (unassigned) => Benjamin Kehlet (benjamik)
> >
> > --
> > You received this bug notification because you are a member of DOLFIN
> > Core Team, which is subscribed to DOLFIN.
> > https://bugs.launchpad.net/bugs/1154991
> >
> > Title:
> > CSG mesh generation cell size broken
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/dolfin/+bug/1154991/+subscriptions
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1154991
>
> Title:
> CSG mesh generation cell size broken
>
> Status in DOLFIN:
> New
>
> Bug description:
> The 3D CSG mesh generation gives erratic results when the cell size if
> given. The problem appears to be with the line
>
> const double r = PolyhedronUtils::getBoundingSphereRadius(p);
>
> in CSGCGALMeshGenerator3D::generate(Mesh& mesh). The return value r is
> not deterministic, and often returns extremely large values, e.g.
> 10^54
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dolfin/+bug/1154991/+subscriptions
>

Changed in dolfin:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.