View Issue Details

IDProjectCategoryView StatusLast Update
0023900CommunityOCCT:Visualizationpublic2013-04-22 12:21
ReporterPawel Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionno change required 
PlatformWindowsOSVC++ 2008 
Product Version6.6.0 
Summary0023900: Problems displaying Voxel_ROctBoolDS voxels
DescriptionI 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 ReproduceTopoDS_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);
TagsNo tags attached.
Test case number

Attached Files

  • Voxel_ROctBoolDS_BoxVisualized.png (23,931 bytes)

Relationships

related to 0023899 closedPawel Crash in Voxel_ROctBoolDS::SetZero 

Activities

Pawel

2013-04-12 16:28

developer  

Voxel_ROctBoolDS_BoxVisualized.png (23,931 bytes)

Pawel

2013-04-12 16:36

developer   ~0024123

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).

Pawel

2013-04-19 12:33

developer   ~0024220

I think I've made a mistake when setting up Voxel_Prs (no SetROctBoolVoxels has been called). I have to verify it.

Pawel

2013-04-22 11:57

developer   ~0024239

Dear bugmaster,

please close or delete this issue. The problem results from my erroneous code. My mistake!

Issue History

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 abv Status assigned => closed
2013-04-22 12:21 abv Resolution open => no change required
2013-04-22 12:21 abv Target Version 6.7.0 =>