View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023900 | Community | OCCT:Visualization | public | 2013-04-12 16:28 | 2013-04-22 12:21 |
Reporter | Pawel | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | no change required | ||
Platform | Windows | OS | VC++ 2008 | ||
Product Version | 6.6.0 | ||||
Summary | 0023900: Problems displaying Voxel_ROctBoolDS voxels | ||||
Description | I have used the class VoxelClient_VisDrawer from the samples to visualize voxels. It works fine with Voxel_BoolDS-voxels but not with Voxel_ROctBoolDS. In the sample code below: 1) Trying to visualize the sphere gives no result at all. The line Standard_Boolean value = voxels->Get(ix, iy, iz) == Standard_True; in drawBoolPointsStandard() always returns '0'. I guess something with filling does not work and might be related to the issue 0023899. 2) Trying to visualize the box gives result as in the attached image. Besides the method VoxelClient_VisDrawer::DisplayPoints executes the case: if (myData->myBoolVoxels) not if (myData->myROctBoolVoxels) so I'm a bit puzzled. | ||||
Steps To Reproduce | TopoDS_Shape shape = BRepPrimAPI_MakeSphere(gp_Pnt(11,8,11), 7); //TopoDS_Shape shape = BRepPrimAPI_MakeBox(gp_Pnt(7, 10, 10), 5, 3, 3); //use the box alternatively Standard_Real delfection = 0.1; Standard_Integer nbx = 200, nby = 200, nbz = 200; static Voxel_ROctBoolDS theVoxels(0,0,0, 50, 50, 50, nbx, nby, nbz); //using static variable to avoid the problem from issue 23899 Standard_Integer nbThreads = 1; Voxel_FastConverter fcp(shape, theVoxels, delfection, nbx, nby, nbz, nbThreads); Standard_Integer progress; Standard_Boolean c1ok = fcp.Convert(progress); fcp.FillInVolume(1); Handle(Voxel_Prs) theVPrs1 = new Voxel_Prs; theVPrs1->SetBoolVoxels(&theVoxels); theVPrs1->SetDisplayMode(Voxel_VDM_POINTS); theVPrs1->SetColor(Quantity_NOC_BLUE1); theVPrs1->SetPointSize(10.); theVPrs1->SetQuadrangleSize(25); theVPrs1->SetTransparency(0); myAISContext->Display(theVPrs1,Standard_True); | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Voxel_ROctBoolDS_BoxVisualized.png (23,931 bytes) |
|
Before displaying a point in drawBoolPointsStandard() I just put the following line: glColor3d(double(iz)/double(nbz), double(iy)/double(nby), double(ix)/double(nbx)); to be able to distinguish the depth (that's why the screenshot is so colorful). |
|
I think I've made a mistake when setting up Voxel_Prs (no SetROctBoolVoxels has been called). I have to verify it. |
|
Dear bugmaster, please close or delete this issue. The problem results from my erroneous code. My mistake! |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-04-12 16:28 | Pawel | New Issue | |
2013-04-12 16:28 | Pawel | Assigned To | => vro |
2013-04-12 16:28 | Pawel | File Added: Voxel_ROctBoolDS_BoxVisualized.png | |
2013-04-12 16:28 | Pawel | Relationship added | related to 0023899 |
2013-04-12 16:29 | Pawel | Steps to Reproduce Updated | |
2013-04-12 16:36 | Pawel | Note Added: 0024123 | |
2013-04-19 12:31 | Pawel | Assigned To | vro => Pawel |
2013-04-19 12:33 | Pawel | Note Added: 0024220 | |
2013-04-22 11:56 | Pawel | Status | new => resolved |
2013-04-22 11:56 | Pawel | Assigned To | Pawel => bugmaster |
2013-04-22 11:57 | Pawel | Note Added: 0024239 | |
2013-04-22 11:57 | Pawel | Status | resolved => assigned |
2013-04-22 12:21 |
|
Status | assigned => closed |
2013-04-22 12:21 |
|
Resolution | open => no change required |
2013-04-22 12:21 |
|
Target Version | 6.7.0 => |