MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #23894 All Revisions ] Back to Issue ]
Summary 0023894: Voxel_BooleanOperation (Cut) gives incorrect results
Revision 2013-04-11 19:17 by Pawel
Steps To Reproduce I'm not sure how to reproduce the problem in DRAW therefore only C++ reproducer:

TopoDS_Shape shape = BRepPrimAPI_MakeSphere(gp_Pnt(11,8,11), 7);
TopoDS_Shape shape1 = BRepPrimAPI_MakeBox(gp_Pnt(7, 10, 10), 5, 3, 3);

Standard_Real delfection = 0.1;
Standard_Integer nbx = 200, nby = 200, nbz = 200;
Voxel_BoolDS theVoxels(0,0,0, 50, 50, 50, nbx, nby, nbz);
Voxel_BoolDS theVoxels1(0,0,0, 50, 50, 50, nbx, nby, nbz);
Standard_Integer nbThreads = 1;

Voxel_FastConverter fcp(shape, theVoxels, delfection, nbx, nby, nbz, nbThreads);
Standard_Integer progress;
fcp.Convert(progress);
fcp.FillInVolume(1);

Voxel_FastConverter fcp1(shape1, theVoxels1, delfection, nbx, nby, nbz, nbThreads);
progress = 0;
fcp1.Convert(progress);
fcp1.FillInVolume(1);

Voxel_BooleanOperation op;
Standard_Boolean result = op.Cut(theVoxels1, theVoxels);
==========================

You can also try using a bigger box:

TopoDS_Shape shape1 = BRepPrimAPI_MakeBox(gp_Pnt(5, 10, 10), 10, 20, 30);

to see the problem occurs frequently.
Revision 2013-04-11 19:12 by Pawel
Steps To Reproduce TopoDS_Shape shape = BRepPrimAPI_MakeSphere(gp_Pnt(11,8,11), 7);
TopoDS_Shape shape1 = BRepPrimAPI_MakeBox(gp_Pnt(7, 10, 10), 5, 3, 3);

Standard_Real delfection = 0.1;
Standard_Integer nbx = 200, nby = 200, nbz = 200;
Voxel_BoolDS theVoxels(0,0,0, 50, 50, 50, nbx, nby, nbz);
Voxel_BoolDS theVoxels1(0,0,0, 50, 50, 50, nbx, nby, nbz);
Standard_Integer nbThreads = 1;

Voxel_FastConverter fcp(shape, theVoxels, delfection, nbx, nby, nbz, nbThreads);
Standard_Integer progress;
fcp.Convert(progress);
fcp.FillInVolume(1);

Voxel_FastConverter fcp1(shape1, theVoxels1, delfection, nbx, nby, nbz, nbThreads);
progress = 0;
fcp1.Convert(progress);
fcp1.FillInVolume(1);

Voxel_BooleanOperation op;
Standard_Boolean result = op.Cut(theVoxels1, theVoxels);
==========================

You can also try using a bigger box:

TopoDS_Shape shape1 = BRepPrimAPI_MakeBox(gp_Pnt(5, 10, 10), 10, 20, 30);

to see the problem occurs frequently.
Revision 2013-04-11 19:07 by Pawel
Steps To Reproduce TopoDS_Shape shape = BRepPrimAPI_MakeSphere(gp_Pnt(11,8,11), 7);
TopoDS_Shape shape1 = BRepPrimAPI_MakeBox(gp_Pnt(7, 10, 10), 5, 3, 3);

Standard_Real delfection = 0.1;
Standard_Integer nbx = 200, nby = 200, nbz = 200;
Voxel_BoolDS theVoxels(0,0,0, 50, 50, 50, nbx, nby, nbz);
Voxel_BoolDS theVoxels1(0,0,0, 50, 50, 50, nbx, nby, nbz);
Standard_Integer nbThreads = 1;

Voxel_FastConverter fcp(shape, theVoxels, delfection, nbx, nby, nbz, nbThreads);
Standard_Integer progress;
fcp.Convert(progress);
fcp.FillInVolume(1);

Voxel_FastConverter fcp1(shape1, theVoxels1, delfection, nbx, nby, nbz, nbThreads);
progress = 0;
fcp1.Convert(progress);
fcp1.FillInVolume(1);

Voxel_BooleanOperation op;
Standard_Boolean result = op.Cut(theVoxels1, theVoxels);
==========================

You can also try use a bigger box:

TopoDS_Shape shape1 = BRepPrimAPI_MakeBox(gp_Pnt(5, 10, 10), 10, 20, 30);

to see the problem occurs frequently.
Revision 2013-04-11 18:58 by Pawel
Steps To Reproduce


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker