Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#42 closed defect (fixed)

ModelGeometry division by 0.0 for a single ellipsoid shape

Reported by: Maciej Komosinski Owned by: oriona
Priority: major Milestone:
Component: Framsticks core Version:
Keywords: Cc:

Description (last modified by Maciej Komosinski)

For the following structure/genotype:

Simulator.print(ModelGeometry.forModel(Model.newFromString("//0\np:sh=1\n")).area());

in externalAreaOfSurface(), in the second iteration of

	while (surface.tryGetNext(point))

In function

void MeshBuilder::EllipsoidSurface::findNextAreaEdgeAndPhase()

There is div by 0.0 (invalid FP operation) because edge.x and edge.z are 0.0:

limit.z = edge.z*edge.z / sqrt(edge.x*edge.x + edge.z*edge.z);

Similar defect to fix: numerous sqrt: DOMAIN error exceptions when running geometry unit tests.

Change History (3)

comment:1 Changed 10 years ago by Maciej Komosinski

Description: modified (diff)

comment:2 Changed 8 years ago by oriona

Owner: set to oriona
Resolution: fixed
Status: newclosed

In 539:

Division by 0.0 for a single ellipsoid fixed [closes #42]. Sampling the same point twice fixed.

comment:3 Changed 8 years ago by oriona

In 541:

Division by 0.0 for a single ellipsoid fixed [closes #42]. Sampling the same point twice fixed.

Note: See TracTickets for help on using tickets.