Small file taking forever to upload - solution: move geometry to the origin

Hi,

I have tried multiple times to upload this file but the upload freezes midway through/takes a long time (>10min) to complete. It only contains 195 elements so I assume this is not a normal speed for its size.

Find the 3dm file here: https://drive.google.com/file/d/1fyu_lVA_EuOm2jFHT3C_UhQEiWsaiGyo/view?usp=sharing

1 Like

Hi @mapendo, checking your file as we speak. I’ve isolated the case to a few elements that take forever to mesh.

I’m going to do some extra looking and follow up here.

2 Likes

For example, the two polysurfaces above are - for some weird reason - problematic. When meshed by simply just plugging them in the mesh component in grasshopper everything freezes. Using the the mesh brep component is fine though.

I suspect something is up in the meshing of these objects. We’ll have a deeper look!

2 Likes

Okay, found the culprit. This little guy:

Makes our Brep conversion fail. Nevertheless, it’s not really 100% our fault - Rhino gets stuck on the brep.Repair(tol) call from within the BrepToSpeckle method.

Commenting it out makes things work flawlessly.

2 Likes

Lastly, the breps from this stack:

  • First conversion, with repair on: ~2.3s
  • Second conversion, after repair ran once: ~42ms (funny second time over it’s much faster, I guess there’s no more repairing to do…)
  • No repair: 27ms

@AlanRynne, I’m itching to get rid of the repair call. WDYT? I’d much more rather fail on sending bad breps rather than having “decent” breps fail too. Also, making things 10x faster is tempting. It does seem superflous, and it seems it does magic on normal breps as well!

The idea of the function is to fix ‘bad’ Breps. But it’s possible for the function to make changes to perfectly good Breps too.

from Brep.Repair() - Developer - McNeel Forum

Then again, not sure what this was solving previously :sweat_smile:

(I think i’ve spotted a viewer bug in the meantime, hence the delay in writing this up)

2 Likes

Okay digging in a bit more, as there was a last thing I wanted to check - the file is quite far off from origin (as spotted by @Jedd when discussing another unrelated aspect).

I moved the bad breps to the origin, and the repair call is basically wiped out (good news). I then downloaded the whole file again, moved everything to the origin, and then :boom: everything was sent in no time.

So @mapendo: the actual solution is to move things as close as possible to the origin. This will make the conversion work flawlessly and fast, as the brep.repair() call will no longer exhibit abnormal behaviour (which i’m inclined to report to mcneel).

CC @AlanRynne - our chat about the repair call is a bit moot now, imho - i’m dropping my request to make it optional :slight_smile:

2 Likes

I moved it to origin and it uploaded in an instant!

Thank you for your responsiveness and persistence!
Always impressed by the support team at Speckle.

4 Likes