mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-06 21:46:12 +08:00
385d47dde7
When removing internal boundaries between faces of the same material do it once for the whole shape, and at this keep boundaries between areas with different material.
51 lines
916 B
Plaintext
51 lines
916 B
Plaintext
puts "========"
|
|
puts "OCC26798"
|
|
puts "========"
|
|
puts ""
|
|
#######################################################################
|
|
# Boolean operations: keep desired cells and boundaries in the result
|
|
#######################################################################
|
|
|
|
smallview
|
|
|
|
circle c1 0 10 0 15
|
|
circle c2 20 10 0 15
|
|
circle c3 10 0 0 15
|
|
mkedge e1 c1
|
|
mkedge e2 c2
|
|
mkedge e3 c3
|
|
wire w1 e1
|
|
wire w2 e2
|
|
wire w3 e3
|
|
mkplane f1 w1
|
|
mkplane f2 w2
|
|
mkplane f3 w3
|
|
|
|
donly f1 f2 f3
|
|
fit
|
|
|
|
bclearobjects
|
|
bcleartools
|
|
baddobjects f1 f2
|
|
baddtools f3
|
|
bfillds
|
|
bcbuild r
|
|
|
|
bcremoveall
|
|
bcadd result f1 1 f2 0 f3 0 -m 1
|
|
bcadd result f1 1 f2 0 f3 1 -m 1
|
|
bcadd result f1 1 f2 1 f3 0 -m 2
|
|
bcadd result f1 1 f2 1 f3 1 -m 2
|
|
bcadd result f1 0 f2 1 f3 1 -m 2
|
|
bcremoveint result
|
|
|
|
if {![regexp {This shape seems to be OK.} [bopcheck result]]} {
|
|
puts "Error: result shape is self intersected"
|
|
}
|
|
|
|
donly result
|
|
fit
|
|
|
|
checkprops result -s 882.85
|
|
|