Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent undefined behaviour when drawing axis #762

Merged
merged 1 commit into from
Jun 23, 2014
Merged

Prevent undefined behaviour when drawing axis #762

merged 1 commit into from
Jun 23, 2014

Conversation

VictorLamoine
Copy link
Contributor

Drawing XYZ axis with a negative size makes no sense
Worse, drawing axis with a 0 size may cause errors :

Warning: In /build/buildd/vtk-5.8.0/Graphics/vtkTubeFilter.cxx, line 362
vtkTubeFilter (0x1fbaae0): Coincident points!

Warning: In /build/buildd/vtk-5.8.0/Graphics/vtkTubeFilter.cxx, line 236
vtkTubeFilter (0x1fbaae0): Could not generate points!

Warning: In /build/buildd/vtk-5.8.0/Graphics/vtkTubeFilter.cxx, line 362
vtkTubeFilter (0x1fbaae0): Coincident points!

Warning: In /build/buildd/vtk-5.8.0/Graphics/vtkTubeFilter.cxx, line 236
vtkTubeFilter (0x1fbaae0): Could not generate points!

Warning: In /build/buildd/vtk-5.8.0/Graphics/vtkTubeFilter.cxx, line 362
vtkTubeFilter (0x1fbaae0): Coincident points!

Warning: In /build/buildd/vtk-5.8.0/Graphics/vtkTubeFilter.cxx, line 236
vtkTubeFilter (0x1fbaae0): Could not generate points!

I solved the problem by transforming bad values into the default value (size = 1.0) without throwing any error/warning

@taketwo
Copy link
Member

taketwo commented Jun 21, 2014

There are other versions of addCoordinateSystem() on lines 625, 703. Shouldn't they be fixed as well?

@VictorLamoine
Copy link
Contributor Author

Oh yes I didn't spot these!

jspricke added a commit that referenced this pull request Jun 23, 2014
Prevent undefined behaviour when drawing axis
@jspricke jspricke merged commit b46a149 into PointCloudLibrary:master Jun 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants