Global Edge Continuity - Release Candidate now on packagemanager

in code this is what I do:

/*
// calculate deviations of curvature by comparing curvatures at each point
// a = angle between direction of wanted curvature and principle curvature direction 0
// 1 / r = (math.cos(a)^2) / r1 + (math.sin(a)^) / r2
// relative curvature = (r1 - r2) / (r1 + r2)
// absolute = (1 / r1) - (1 / r2)
*/   
double a, b;

a = Math.Cos(ang_1);
a = Math.Pow(a,2);
b = Math.Sin(ang_1);
b = Math.Pow(b,2);

// calculations for absolute and relative curvature differences
double result_1 = a / r_1 + b / r_2;
double rad_1 = 1 / result_1;
  
int sign = 1;

if ((!circles[0].IsValid && !circles[1].IsValid) || (!circles[2].IsValid && !circles[3].IsValid))
{
    // apparently first and/or second object is planar
    // no direction can be determined
}
else
{
    if (circles[0].IsValid)
    {
        if (circles[2].IsValid)
        {
            {
                double r;
                if (Math.Abs(r_1) > Math.Abs(r_3))
                    r = Math.Abs(r_1);
                else
                    r = Math.Abs(r_3);
                if (new Line(c_1.Center, c_3.Center).Length > r)
                    sign = -1;
            }
        }
    }
}
  
a = Math.Cos(ang_2);
a = Math.Pow(a, 2);
b = Math.Sin(ang_2);
b = Math.Pow(b, 2);                
double result_2 = (a / r_3) + (b / r_4);
double rad_2 = 1 / result_2;

double relative = ((sign * rad_1) - rad_2) / (rad_1 + rad_2);
relative = sign * Math.Abs(relative);                
double absolute = (sign / rad_1) - (1 / rad_2);

Relatives.Add(relative);
Absolutes.Add(Math.Abs(absolute));

1 Like

Personally, I’d be happy to replace the curvature numbers with the zebra toggle and a button to adjust the render mesh.

Hi Rob, not exactly sure what you mean by that. The plugin is all about getting a quantifiable result.

Right now the zebra will pop up the zebra dialog, which has the ability to change mesh settings.
There is a way to do this without the dialog too but somehow this is very slow in display speed when the dialog is not active (plus some other issues)

Basically I’m calling the Rhino commands with the toggle (zebra and zebraoff) and this has one disadvantage that I cannot keep track over it’s state. So if you manually close the zebra settings then if you want to bring back the zebra with the tool button, you might have to press it twice.
The zebra toggle has the advantage though that it will automatically include all surfaces that were selected for the evaluation.

I’m just used to using zebras to analyse curvature rather than numbers. So if the plugin only displayed numerical info for position and tangency then I’d still find it very useful.

No problems ref the zebra button :+1:

Please update to latest and greatest 0.9.9.4 … which I call release candidate. If all goes well I will publish the first release soon and source files shortly after.

New in this release:

  • much faster update when single surfaces are adjusted (this was a feature I took out of the previous release to completely rewrite, as the old method was buggy)
  • bug fixes

Please torture test … and enjoy.

2 Likes

@Gijs

I can’t find the new release in the package manager, it seems to have disappeared completely! Has the name changed?

@mcvltd

btw @mcvltd I think you need to uninstall the stgGlobalEdgeContinuity plugin first (Through PackageManager). I thought I had done it right with the plugin id, but this went wrong when translating to C#

@Gijs

Yep, I uninstalled the old one but only see this when searching in package manager…

I’m starting to panic now… :scream: :rofl:

I compiled it for 7.17 and above, so I think then you are on an older SR?

1 Like

Ah ha! You’re right, apologies! SR16 here.

Will update now.

1 Like

@Gijs

Great tool!
It would be good if the window would remember the last position on the screen.
Or GlobalEdgeContinuity could live in a panel - even better.

@Charles thanks!

That’s an easy fix, will add that for the release. Not sure about making it dockable, I’m afraid that will take a lot of code change, but honestly I have no clue how to do it and it will also not be compatible with Mac I suppose.

1 Like

Hey @Gijs, for your information:
Eto Panel can be added with C# which will work on Windows and macOS.

Sample by Dale is here:

@mlukasz87 thanks, I will look into it :slight_smile:

@Gijs
GlobalEdgeContinuity is expired now.
Any chance for a perpetual version?

@Charles yes I’m going to release the tool one of the following days. I had hoped to do it before the expiration of this beta but I could not make time for it.

I’m having some issues with the latest version. It says it is expired even though it is the latest update.

Here is what happened, though I’m not sure if it’s relevant. My beta expired so I updated. That left both the beta and the 9.9.4 version in package manager, so I still got the expired version warning. I removed the beta. After that it said “command not found” even though it was installed and there was no command listed in properties/plugins/commands window. Then I completely uninstalled, restarted, reinstalled, restarted. The command is there now, but now I’m back to the update warning.

I’ve tried uninstalling and reinstalling multiple times, reboots, etc but no matter what I get the expired error. The fact that I’ve not given up yet shows how much this plugin has become a must-have part of my daily workflow! Any suggestions on how to fix this?

@Jason_Kuehn sorry about that. I will post a non expiring version within a couple of days

@Jason_Kuehn @Charles and others, I’ve uploaded a new version. No expiry date on this one, but not yet the final version. I encountered a strange bug that I want to solve first, but don’t have time on short notice to look into it.

that should work in the newer version

1 Like