View Issue Details

IDProjectCategoryView StatusLast Update
0024019CommunityOCCT:Visualizationpublic2013-12-19 13:56
ReporterPawel Assigned ToPawel  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.6.0 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024019: Voxel_FastConverter: filling problem
DescriptionThere seems to be a problem with voxelizing shapes in locations where many vertical faces overlap in Z-direction.

I guess the problem might be in Voxel_FastConverter::FillInVolume.

For the moment some pictures to document the problem.
Steps To Reproduce//Code after integration of 23894
TopoDS_Shape shape;
BRep_Builder aBuilder;
BRepTools::Read(shape,"boxes5.brep",aBuilder/*, anIndicator*/);

TopoDS_Shape shape1 = BRepPrimAPI_MakeSphere(gp_Pnt(20,25,35), 7);

Standard_Real deflection = 0.005;
Standard_Integer nbThreads = 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);

Voxel_FastConverter fcp(shape, theVoxels, deflection, nbx, nby, nbz, nbThreads);
fcp.ConvertUsingSAT(progress, 1);
fcp.FillInVolume(1);

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

Voxel_BooleanOperation op;
Standard_Boolean result = op.Cut(theVoxels1, theVoxels);
TagsNo tags attached.
Test case numberbugs vis bug24019

Attached Files

  • Pic01.png (391,095 bytes)
  • Pic02.png (308,166 bytes)
  • boxes4.png (30,368 bytes)
  • boxes5.png (13,768 bytes)
  • boxes4.brep (8,750 bytes)
  • boxes5.brep (143,213 bytes)
  • vertical_line_problem.png (9,427 bytes)

Activities

Pawel

2013-06-07 02:08

developer  

Pic01.png (391,095 bytes)

Pawel

2013-06-07 02:08

developer  

Pic02.png (308,166 bytes)

Pawel

2013-06-07 12:13

developer  

boxes4.png (30,368 bytes)

Pawel

2013-06-07 12:13

developer  

boxes5.png (13,768 bytes)

Pawel

2013-06-07 12:14

developer  

boxes4.brep (8,750 bytes)

Pawel

2013-06-07 12:14

developer  

boxes5.brep (143,213 bytes)

Pawel

2013-06-07 12:14

developer   ~0024690

Added sample data and pictures visualizing the problem during filling.

Pawel

2013-06-27 12:16

developer  

vertical_line_problem.png (9,427 bytes)

Pawel

2013-06-27 12:39

developer   ~0024901

'vertical_line_problem.png' describes the problem of filling shapes when encountering vertical faces. Basically, when checking Z-coordinates it is not possible to tell whether getting into or out of the material. For this purpose, it is necessary to verify the points against the shape topology.

Pawel

2013-06-27 15:42

developer   ~0024903

Branch CR24019 pushed and ready for review.

I have implemented a new filling method that takes shape's topology into consideration when filling voxels with positive values.

The implemented method can handle vertical faces and though it uses BRepClass3d_SolidClassifier the performance is acceptable, I guess (BRepClass3d_SolidClassifier is only used where the transition from a vertical edge occurs).

There is one case where this method will fail though: a shape having internal face or in other words two shapes connected by face. At the moment the user must provide valid data to avoid problems in this case.

vro

2013-07-01 10:32

developer   ~0024921

Well done!

apn

2013-07-03 10:53

administrator   ~0024950

Dear BugMaster,

Branch CR24019 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 7e2e911f197505066b150c01b47952d1b46248e2

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 7 (7 on master)

products component :
Linux: 0 (0 on master)
Windows: 63 (63 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs vis bug24019 - OK

Testing on Linux:
Total MEMORY difference: 366345200 / 366301468
Total CPU difference: 44071.23000000135 / 43407.12000000102

Testing on Windows:
Total MEMORY difference: 422230228 / 423892192
Total CPU difference: 42908.0 / 44235.125

There are not differences in images found by testdiff.

Related Changesets

occt: master 4bee43a9

2013-07-04 10:29:08

Pawel

Details Diff
0024019: Voxel_FastConverter: filling problem

Added a new method filling the inner part of a shape with voxels. The advantages of using this method are:
- processing vertical faces
- correct processing of 'concave' shapes
Added QA command OCC24019 for issue 24019 and test case bugs/vis/bug24019
Affected Issues
0024019
mod - src/QABugs/QABugs_19.cxx Diff File
mod - src/TKQADraw/EXTERNLIB Diff File
mod - src/Voxel/Voxel_FastConverter.cdl Diff File
mod - src/Voxel/Voxel_FastConverter.cxx Diff File
add - tests/bugs/vis/bug24019 Diff File

Issue History

Date Modified Username Field Change
2013-06-07 02:08 Pawel New Issue
2013-06-07 02:08 Pawel Assigned To => Pawel
2013-06-07 02:08 Pawel File Added: Pic01.png
2013-06-07 02:08 Pawel File Added: Pic02.png
2013-06-07 12:13 Pawel File Added: boxes4.png
2013-06-07 12:13 Pawel File Added: boxes5.png
2013-06-07 12:14 Pawel File Added: boxes4.brep
2013-06-07 12:14 Pawel File Added: boxes5.brep
2013-06-07 12:14 Pawel Note Added: 0024690
2013-06-07 12:20 Pawel Steps to Reproduce Updated
2013-06-27 12:16 Pawel File Added: vertical_line_problem.png
2013-06-27 12:39 Pawel Note Added: 0024901
2013-06-27 15:42 Pawel Note Added: 0024903
2013-06-27 15:42 Pawel Status new => resolved
2013-06-27 15:42 Pawel Assigned To Pawel => vro
2013-07-01 10:32 vro Note Added: 0024921
2013-07-01 10:32 vro Status resolved => reviewed
2013-07-01 11:59 mkv Assigned To vro => apn
2013-07-03 10:53 apn Note Added: 0024950
2013-07-03 10:53 apn Test case number => bugs vis bug24019
2013-07-03 10:53 apn Assigned To apn => bugmaster
2013-07-03 10:53 apn Status reviewed => tested
2013-07-05 11:57 Pawel Changeset attached => occt master 4bee43a9
2013-07-05 11:57 Pawel Assigned To bugmaster => Pawel
2013-07-05 11:57 Pawel Status tested => verified
2013-07-05 11:57 Pawel Resolution open => fixed
2013-12-19 13:53 bugmaster Status verified => closed
2013-12-19 13:56 bugmaster Fixed in Version => 6.7.0