[vtkusers] vtkBoxWidget::Points values change between Debug and Release mode

Cory Quammen cory.quammen at kitware.com
Thu Jan 7 10:25:10 EST 2016


Amélie,

Two thoughts:

1). Some of the points may not be initialized. Could you post your
initialization code for the vtkPoints object?

2). You are accidentally mixing Release and Debug mode libraries. You
must link against either all Release or all Debug libraries - mixing
them will lead to a world of hurt.

Cory

On Thu, Jan 7, 2016 at 10:09 AM, Amélie Thery <theryame at gmail.com> wrote:
> Hi everybody,
> I am using vtkBoxWidget, and I use Points to control it size.
> I defined a public function vtkPoints * GetPoints(){return Points;}to access
> this protected member.
> For example, when my vtkBoxWidget is defined by
> {-1,0,0,
> 1,0,0,
> 1,0,1,
> -1,0,1,
>
> -1,1,0,
> 1,1,0,
> 1,1,1,
> -1,1,1}
>
> with one face under 0 and the opposite over 0 in x-axis,
> I do:
> vtkPoints* pts=GetPoints();
> double a[3],b[3];
> pts->GetPoint(0,a); //face under 0
> pts->GetPoint(2,b); //face over 0
>
> In debug mode, a[0]= -1  and b[0]= 1 as it is supposed to be,
> In release mode, a[0]= 1 and b[0]= 1 so I can not check the size of the box.
>
> I didn't change anything between both tests, if anyone has any idea it would
> be grateful :)
>
> Thank you for reading,
> Amélie
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list