Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Support huge breps #128

Open
didimitrie opened this issue Feb 17, 2018 · 2 comments
Open

Support huge breps #128

didimitrie opened this issue Feb 17, 2018 · 2 comments

Comments

@didimitrie
Copy link
Member

Some breps deserialise to huge speckle objects. Features include:

  • holes
  • lots of fillets
  • maybe chamfers
@didimitrie
Copy link
Member Author

Not really sure what's going on, but just the byte[] of this guy is huge:
RH5_ExampleBigHugeBrep.3dm.zip
image

Also generates a mesh of several zillion vertices, etc. whereas if you just mesh it normally with the default mid-way quality, you get 1/6th of that.

@didimitrie
Copy link
Member Author

didimitrie commented Mar 30, 2018

I've made a tiny bit of headway here:
image

Code for meshing:

MeshingParameters mySettings = new MeshingParameters(0);
mySettings.SimplePlanes = true;

Mesh[] meshes = Mesh.CreateFromBrep(x as Brep, mySettings);
var brep_mesh = new Mesh();
foreach (var mesh in meshes)
    brep_mesh.Append(mesh);

As you can see we get similar results to rhino's meshing with "fewest polygons" settings, which is what we're after.

This results in:
image

a total object size of approx 1000kb pre compression (700kb raw rhino size + 200kb mesh) vs old speckle converter obj size of more or less 1500kb.

If this holds, we're in for a size reduction of 30% (500kb) pre payload gzipping for this specific case.

didimitrie added a commit that referenced this issue Mar 30, 2018
@didimitrie didimitrie modified the milestones: 1.0.0-beta, 1.0.0 May 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant