Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8532

Intersecting two spheres C++

$
0
0

@dimcic wrote:

Hi,

I was wondering what the fastest method to create and intersect two spheres is? I have to do this hundreds of times in a loop and it is going pretty slowly...so what I am doing is

  1. Creating two ON_Sphere
  2. Transforming them into breps using their GetNurbForm method:
  3. Intersecting those two breps with RhinoIntersectBreps().

As I said...pretty slow process... can I speed it up?

Thanks!

P.S. My ON_Sphere->ON_Brep* transformation looks like this:

ON_Sphere sphere(centerpt, radius);

ON_NurbsSurface spheresrf;
sphere.GetNurbForm( spheresrf );

ON_Surface* srf = spheresrf.Duplicate();

ON_Brep* brep = ON_Brep::New();
brep->Create( srf );

delete srf;
srf = 0;

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 8532

Trending Articles