1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
occt/tests/bugs/modalg_5/bug25232_9
emv 92ae0f2fe3 0025232: Functionality to create solids from set of shapes
Purpose:
The algorithm is to build solids from set of shapes.
It uses the BOPAlgo_Builder algorithm to intersect the given shapes and build the images
of faces (if needed) and BOPAlgo_BuilderSolid algorithm to build the solids.
Steps of the algorithm:
1. Collect all faces: intersect the shapes if necessary and collect  the images of faces,
   otherwise just collect the faces to the <myFaces> list.
   All faces on this step added twice, with orientation FORWARD and REVERSED;
2. Create bounding box covering all the faces from <myFaces> and create solid box from corner points
   of that bounding box (myBBox, mySBox). Add faces from that box to <myFaces>;
3. Build solids using faces from <myFaces> using BOPAlgo_BuilderSolid algorithm;
4. Treat the result: Eliminate solid containig faces from <mySBox>;
5. Fill internal shapes: add internal vertices and edges into created solids;
6. Prepare the history.

Fix for regression.
class BOPAlgo_BuilderSolid:
The tolerance value used in BRepClass3d_SolidClassifier has been increased.

Test cases for issue CR25232

Small correction to eliminate the warning.
2014-09-26 17:12:29 +04:00

37 lines
974 B
Plaintext

puts "============"
puts "OCC25232"
puts "============"
puts ""
#########################################################################
# Functionality to create solids from set of shapes
#########################################################################
compound b1
compound b2
compound b3
set nbi 21
set nbj 21
set nbk 21
for {set i 0} {$i < $nbi} {incr i} {plane p 0 0 [expr $i-10] 0 0 1; mkface f_$i p -10 10 -10 10; add f_$i b1;}
for {set j 0} {$j < $nbj} {incr j} {plane p [expr $j-10] 0 0 1 0 0; mkface f_$j p -10 10 -10 10; add f_$j b2;}
for {set k 0} {$k < $nbk} {incr k} {plane p 0 [expr $k-10] 0 0 1 0; mkface f_$k p -10 10 -10 10; add f_$k b3;}
sphere s 0 0 0 10
mkface f s
mkvolume result b1 b2 b3 f
# 9832 solids created
set square 50513.3
set nb_v_good 11037
set nb_e_good 31880
set nb_w_good 30668
set nb_f_good 30668
set nb_sh_good 9832
set nb_sol_good 9832
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 123918
set 2dviewer 1