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

CellComplex Error #10

Open michalinadengusiak opened 4 years ago

michalinadengusiak commented 4 years ago

Context

I am trying to make a CellComplex

Expected Behavior

It should make a CellComplex containing 3 cells.

Current Behavior

It crashes instead of building CellComplex.

Steps to Reproduce

  1. Please see attached the script, I can't see the cause of the problem.
  2. I am only using two boxes. image

These are my boxes: image

Test File: Building_Boxes_Then_Bug.zip

wassimj commented 4 years ago

Dear Michalina, Thank you for your bug report. I have been able to replicate the behaviour on both Grasshopper and Dynamo. I narrowed the issue down to the two bottom faces of the tower block and the podium block. These two faces are co-planar. When it created the Cluster, check the faces, you will find out that all the faces have been cut correctly except for these two faces that continue to stay as is and overlap. It may be an issue of floating point tolerance because when I created the same set up in Dynamo using Dynamo cuboids (and extracting the 12 faces and building a CellComplex) it all worked flawlessly. So something about these two faces and how they were dervied in GH is causing Topologic (or more accurately OpenCASCADE) not to be able to build a cell Complex.

As a test, I found the two faces (f[0] and f[1]) and then I subtracted A from B and then B from A. I then found the intersection of A and B. I then created a new list with the three faces and the remaining 15 faces (index 2 to 17) and then used those to build a CellComplex and it worked.

We will investigate and debug, but it will take a while to get back to you.

michalinadengusiak commented 4 years ago

@wassimj Thank you, I will definitely try this method as well as find a new one in Grasshopper. Fingers crossed that it will work! Thank you for replying so quickly! :relaxed:

wassimj commented 4 years ago

Great. Please simply try: CellComplex.ByCells and send it the two Cells/Cubes rather than their Faces. Might be simpler.

michalinadengusiak commented 4 years ago

Hi, I am having the same issue. I think that this may be connected with a problem about the Grasshopper geometry?

This is my Grasshopper script, I couldn't find any errors there... image

This is my figure: It is pretty simple... image

Thanks, Kind regards, Michalina

Building_Boxes_Then_Bug#2.zip

wassimj commented 4 years ago

Hi Michalina, Can you please try this on Topologic/Dynamo and see if it gives you the same error? Just trying to figure out if it is inaccurate Grasshopper geometry or a fault with Topologic. Also, try:

  1. Merge: TopologyA with TopologyB
  2. Cluster.ByTopologies and then SelfMerge
  3. Export the Cluster to BREP (Topology.ExportToBREP) and then re-load it (Topology.ByImportedBREP)

Send me the BREP please as well to take a look.

michalinadengusiak commented 4 years ago

@wassimj

Hi,

This is my problem...
I am using the same geometry however I am getting different outputs.

  1. In this one, I am using the faces of each geometrical figure meaning that I have the two cubes but selected by each face.

image

  1. In this one, I am using the cluster as you told me it doesn't work, unfortunately... Even though my input is a closed BREP.

image

  1. Here I am taking the geometry, and with a List Item taking each cube as a closed BREP, it works well.

image

When I use the list item, I can create a CellComplex without any difficulty. Yet when I try to use the BREPS and put them into the Topologic it crashes without any factor causing it to crash.

This is the zip file:

Building_Boxes_Then_Bug#2.zip

Here is the BREP file to the first one (the one selected by each face) :

Topologic_BREP_Bug_2.zip