Union in 2D
Hi,
I am trying to do a Boolean operation in 2D shape, and somehow, I can not get what I expected for Union. Below, I am taking a union of two Rectangle. What I expect to get a merged one object, but, I am getting three separate objects, which I would expect to get by Fragments. Am I missing something? Thank you for your help.
SetFactory("OpenCASCADE"); s3 = news; Rectangle(s3) = {0, 0, 0, 1, 1, 0.0}; s4 = news; Rectangle(s4) = {0.5, 0.5, 0, 1, 1, 0.0}; bo1[] = BooleanUnion{Surface {s3}; Delete;} {Surface {s4}; Delete;};
p.s. Besides, other operations (Fragments, Difference, and Intersection) produce what I expect. So, I could generate a shape I expect from Union by making a bigger rectangle first, followed by two BooleanDifference as below.
SetFactory("OpenCASCADE"); s3 = news; Rectangle(s3) = {0, 0, 0, 1, 1, 0.0}; s4 = news; Rectangle(s4) = {0.5, 0.5, 0, 1, 1, 0.0}; s5 = news; Rectangle(s5) = {0, 0, 0, 1.5, 1.5, 0.0}; bo1[] = BooleanDifference{Surface {s5}; Delete;} {Surface {s3, s4}; Delete;}; s6 = news; Rectangle(s6) = {0, 0, 0, 1.5, 1.5, 0.0}; bo1[] = BooleanDifference{Surface {s6}; Delete;} {Surface {bo1[0], bo1[1]}; Delete;};
Again, thank you for your help in advance.