voxel-occ

Here you will find the link to the voxel.

https://mail.gna.org/public/pythonocc-users/2010-03/msg00072.html

void OCCViewer::CreateVoxelfromShape(TopoDS_Shape& theShape)
{
Voxel_VisDrawer::Init();
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(10.);
theVPrs->SetQuadrangleSize(progress);
theVPrs->SetTransparency(0);
myAISContext->Display(theVPrs,Standard_True);
}

Good Luck

Attachments: