New Voxel package

Hello,

I am trying to display a voxalized shape that can be created with the new voxel package. I use Voxel_FastConverter to Voxalize the shape but don't know how to dispaly it. Tried with Voxel_Prs but without any luck. The Voxel userguide didn't help much, could not find the code of the demo application they are talking about. I would like to see some simple code that displays a voxel representation of a shape.

Regards,

Arjan

crazymoon's picture

Hi, Arjan

I have the same question with you, have you solved it?

regards

liu

Gheorghiu's picture

Hi all,

I have also tried Voxel_FastConverter and Voxel_Prs without success. Do you have some positive results until now?

Best Regards.

Gheorghiu's picture

Hi all,

Do someone know what is wrong here?

TopoDS_Shape theShape;
//...ini the shape...

Voxel_BoolDS theVoxels;
Voxel_FastConverter fcp(theShape, theVoxels);
Standard_Integer progress;
Standard_Boolean c1ok= fcp.Convert(progress);

Handle(Voxel_Prs) theVPrs= new Voxel_Prs;
theVPrs->SetBoolVoxels(&theVoxels);
theVPrs->SetDisplayMode(Voxel_VDM_POINTS);
theVPrs->SetColor(Quantity_NOC_AZURE);
theVPrs->SetPointSize(1.);
theVPrs->SetQuadrangleSize(100);
theVPrs->SetTransparency(0);

myAISContext->SetColor(theVPrs,Quantity_NOC_GRAY,Standard_False);
myAISContext->SetMaterial(theVPrs,Graphic3d_NOM_DEFAULT,Standard_False);
myAISContext->Display(theVPrs,Standard_True);
Fit();

Any idea why can't I see anything? Thank you very much for any advice.

Best Regards.

Gheorghiu's picture

Hi all,

Do someone has an idea were can we find a demo application using the Voxel class package? I am stil interested in this package but I can not go very far with the tests.

Best regards.