NonManifoldTopology / Topologic

Topologic is a software modelling library enabling hierarchical and topological representations of architectural spaces, buildings and artefacts through non-manifold topology.
GNU Affero General Public License v3.0
74 stars 19 forks source link

Repeating the same Boolean operation with the same operands may produce different results. #1

Open non-manifold opened 6 years ago

non-manifold commented 6 years ago

Expected Behavior

Performing the same Boolean operation with the same operands should return the same result when repeated.

Current Behavior

Some operations return different and wrong results when repeated.

Possible Solution

Steps to Reproduce (for bugs)

  1. Create two overlapping faces p1 = Point.ByCoordinates(-5,-5,0); p2 = Point.ByCoordinates(5,-5,0); p3 = Point.ByCoordinates(5,5,0); p4 = Point.ByCoordinates(-5,5,0); s1 = Surface.ByPerimeterPoints({p1,p2,p3,p4}); A = TopoLogic.Face.BySurface(s1);

p1 = Point.ByCoordinates(1,1,0); p2 = Point.ByCoordinates(10,1,0); p3 = Point.ByCoordinates(10,10,0); p4 = Point.ByCoordinates(1,10,0); s2 = Surface.ByPerimeterPoints({p1,p2,p3,p4}); B = TopoLogic.Face.BySurface(s2);

  1. Create a node A.Union(B) C = A.Union(B)

  2. Connect A and B to the Union node, see the result. (There is a separate bug with drawing the face). image

  3. Disconnect one of the inputs, reconnect it again. See the result. image

Context

Your Environment