View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017899 | Community | OCCT:Visualization | public | 2007-11-21 20:41 | 2011-12-15 16:30 |
Reporter | Assigned To | ||||
Priority | normal | Severity | trivial | ||
Status | closed | Resolution | fixed | ||
OS | All | ||||
Fixed in Version | 6.3.0 | ||||
Summary | 0017899: OCC Forum: Select3D_Box2d does not handle "void" correctly | ||||
Description | "void" state of Select3D_Box2d class is initalized and processed incorrectly. "void" currently means all four coordinates of a 2d box are zeros. Therefore, if Update() method is called with a point lying in a negative quadrant, 2d box is computed incorrectly: xmax and ymax remain zeros. Similar problem happens to xmin and ymin if a point lying in a positive quadrant is passed to Update(): xmin and ymin remain zeros. It is necessary either to introduce "isVoid" field in the 2d box class and take this flag into account in Update() method, or to use some "invalid" values for coordinates of a "void" box in order to detect this state correctly in Update(). ============================================== Original messages from the forum (http://www.opencascade.org/org/forum/thread_12459) Stephane Routelous 2007-11-20 15:20 I encounter the problem with Select3D_SensitiveCurve after the first rotation. This means the second time the detection areas are computed, I end up with a Select3d_Box2d "using" the point (0,0) as maximum. This cause the detection areas to be messed up. The original code will not work correctly if you add only positive of negative points to your box the problem is not in the IsVoid test, but in the Update method : ex : if you have Select3D_Box2d b; b.Update(gp_Pnt2d(-10,10)); b.Update(gp_Pnt2d(-20,-20)); you will endup with xmin=ymin=-20 xmax=ymax=0 instead of xmax=ymax=-10 because of the "aBox.Update(xmin, ymin, xmax, ymax);" inline void Update(const gp_Pnt2d& thePnt) { Bnd_Box2d aBox; aBox.Set(thePnt); if ( !isVoid ) //if you don't add that, the 2d box will be wrong aBox.Update(xmin, ymin, xmax, ymax); SetField(aBox); } | ||||
Additional information and documentation updates | Documentation remark, added by san 2008-02-11 13:20:10: Changes: Initialization of Select3D_Box2d class used by interactive selection has been corrected in order for the box coordinates to be updated properly and thus to avoid picking errors. | ||||
Tags | No tags attached. | ||||
Test case number | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2007-12-11 16:45 | bugmaster | Assigned To | bugmaster => san |
2007-12-11 16:45 | bugmaster | Status | new => assigned |
2008-02-11 15:20 |
|
Status | assigned => resolved |
2008-02-22 16:22 |
|
Status | resolved => tested |
2008-03-14 10:38 | bugmaster | Status | tested => verified |
2009-06-23 18:40 | bugmaster | Status | verified => closed |
2009-06-23 18:40 | bugmaster | Resolution | @0@ => fixed |
2011-08-02 11:24 | bugmaster | Category | OCCT:VIZ => OCCT:Visualization |
2011-12-15 16:30 |
|
Description Updated | |
2011-12-15 16:30 |
|
Additional Information Updated | |
2011-12-15 16:30 |
|
Project | Open CASCADE => Community |