Tried WIP since months

Mater artium necessitas

… 90 rows of code (of which 40 are for the curvature radius > gradient color conversion)
Only minimum curvature (but also I never understood when/how max/gaussian is used/needed).

I made this in my today’s lunch break, I guess McNeel staff can even make a better job…
(if not, i’ll barter this with a Rhino 8 licence update :stuck_out_tongue_winking_eye: …)

2 Likes

To me it looks static is that correct? I suppose you are making a ToNurbs in the background. I think the idea is to have a tool that works interactively while modifying the controlpoints, like it works now on surfaces. On heavy models constantly converting to Nurbs would mean a lot of computing.

The left one is interactive, no nurbs involved, only mesh. The SubD is referenced in a c# script that outputs a colored mesh…
Subdivision level is 4, each face make 16x16 mesh faces… on heavy SubD smaller level is, indeed, needed.

I’m making the ToNurbs conversion manually on rhino only to compare the results (same red-yellow-gree-azure-blue gradient and min-max values)

It doesn’t handle SubD creases.


No worries XD

1 Like

in that case: sweet :slight_smile: I take my words back

1 Like

RH-58162 is fixed in the latest WIP

2 Likes

Just seen… great!
It’s all or nothing, every edge or none … ok.

Seen also you finally added SubD curvature analysis!
2023-05-24 08_58_51-Window

Woohoo!! :star_struck:
Thank you guys!!

1 Like

This is great! We’d love to see also a new mode added to the curvature analysis tool (for all object types):

  1. Three colors for concavity, convexity and planarity.

What colors should they be?

  1. Extra credit:
    A projected dot pattern (with toggle visibility of course) for areas with double curvature (non-developable)

We can do this!

G

2 Likes

Depending on what you mean by concave / convex / planar, that might not cover the whole surface.

Do you mean 3 colors for areas with:

  • positive Gaussian curvature (“sphere-like”),
  • negative Gaussian curvature (“pringles-like”),
  • and 0 Gaussian curvature?

Or 5 colors for

  • positive Gaussian curvature with both curvatures pointing to the back of the surface (locally convex)
  • positive Gaussian curvature with both curvatures pointing to the front of the surface (locally non-convex in all directions),
  • negative Gaussian curvature (locally non-convex in some directions),
  • 0 Gaussian curvature but non-zero mean curvature (locally developable)
  • 0 Gaussian and 0 mean curvatures (locally planar)?

Or something else entirely?

Like Zebra but with dots? We talked about this recently but were not convinced it would be so useful. I would be happy to make a request for a _Leopard command, if this is what you mean.
If you just want to know which areas are not developable, why not use the same settings I have above in _CurvatureAnalysis?

2 Likes

I think 3 colors are good enough.
Current problem is only gaussian mode is able to display negative values (green to blue).
See the animated picture here:

Btw, I haven’t yet found an useful case for gaussian, it’s there, but I don’t know how to use it.
What I really need is min curvature, like 99.9% of the time. Always.
But this is another matter…

The reasoning behind these signed/unsigned differences is that we are only displaying values that do not change when the surface is flipped: the (signed) Gaussian curvature value does not change when the surface normals are flipped, and neither does the unsigned mean curvature, nor the unsigned min and max radii of curvatures.

The main reason to look at Gaussian curvature is to discriminate three types of local behavior of surfaces:

  • positive Gaussian curvature (“sphere-like”, synclastic, both principal curvatures point in the same direction),
  • negative Gaussian curvature (“saddlelike”, anticlastic, principal curvatures point in opposite directions),
  • and 0 Gaussian curvature (developpable, at least one principal curvature is 0)

My question was not about the number of colors, but how they are defined. “Concave” is not very-well defined for surfaces, especially open surfaces. If your definition of concave is “both principal curvatures point in the direction of the normal”, then what color do you give to all the saddle-like points that are neither convex nor concave?

OK, displaying a signed mean curvature I know how to fix.
How about the min (resp. max) radius, should it display:

  • the signed value of the smallest (resp. largest) absolute values of the two radii of principal curvatures (i.e. if the curvatures are k1=-2. and k2=3., radii are r1=-1/2 and r2=+1/3, it would show min_r=+1/3, max_r=-1/2),
  • or the signed value of the smallest (resp. largest) signed radii (i.e. if the curvatures are k1=-2. and k2=3., radii are r1=-1/2 and r2=+1/3, it would show min_r=-1/2, max_r=+1/3)

Since min/max radii are typically used to know where the curvature is too tight or too flat in any direction, I imagine the first option is what is expected. But it would be very counter-intuitive to have signed min_r > signed max_r!

Here’s what the signed mean curvature would look like:

Signed min radius, option 1:

Signed min radius, option 2:

3 Likes

I’m not convinced the signed min radius would be useful for anything, it does not show up-facing-mountains vs. down-facing-mountains and the discontinuous sign flips (goes from red to blue without showing green) are difficult to interpret.

The signed mean curvature however, I think I’m convinced it can be useful at seeing where a surface bumps above / below its tangent plane.

It’s not perfect still, there are lots of blue points in that picture where the surface is a saddle point, i.e. goes above its tangent plane only in some directions. That’s why I think we need more colors here, these definitions do not match with a 1d-gradient.

It should.
Surface curvature sign means something like:
“If i move tangent to local surface plane, the surface will go “up” in the direction of the local normal or “down” in the opposite direction of local normal?”
Concave surface curvature means positive curvature. See the attached picture in the other thread.


Anyway, we just should be able to quickly locate concave spots. It’s really needed.
For example:


concave example.3dm (297.1 KB)
There are at least 2 small “defects” where both, min and max, curvature are positive.
How to find them?

I’m using a custom c# script to see subd curvature (no longer needed … maybe), that colors differently double-convex and double-concave curvature. (one dark-ish the other white-ish) … (uh, actually more than just 3 colors…I was wrong…)
(I have that script in another office, i’ll post results tomorrow…)

I mean, the mathematical definition of “concave” is “not convex” and that’s precise enough (for open surfaces, we can just use the direction of the normal as what is up and down). But that does not mean what you describe later, because that definition of concave includes saddle points (i.e. all points where the Gaussian curvature is < 0, where one curvature is >0 and the other is <0).

That is a clear definition for curves, but surfaces have a tangent plane, where you can move in 2 orthogonal directions. That means all points on a surface have 2 curvatures and can be both convex in some directions of tangent movement and concave in others.

OK, this double-convex vs. double-concave makes it clearer. What do you do with the points that are neither double-convex nor double-concave? What do you do with the points that have one or two 0 curvature?

This is your file with the signed mean curvature:

You can see the dips, but that does not look as useful as I thought it would be. Those tubes are a tough example.

I’m writing up a request for a double-concave/double-convex/0-gaussian curvature analysis display with all your good ideas, thanks.

2 Likes

This may be the definition in some branches of mathematics, but it not the definition used generally including by designers. Rhino is a tool for design, not rigorous mathematics.

Convex and concave are local properties of a surface and is only applicable where the Guassian curvature is positive.
Concave versus convex depends on the direction of the normal of the surface. Swap the direction of the normal and the concave areas become convex and convex areas become concave.
A surface is convex where both (signed) principal curvatures are negative or zero based on the direction of the surface normal.
A surface is concave where both (signed) principal curvatures are positive or zero based on the direction of the surface normal.
A surface is neither convex nor concave where the (signed) principal curvatures have opposite signs.

1 Like

@pierrec May I suggest there is time allowed for a bit more discussion with input from more than one user before submitting your request.

Are “double-concave/double-convex” terms which were made up in this thread, or are they generally used.

I would prefer:

1 Like

Hi Pierre, Riccardo,

Thanks for looking into this. Yes we want something that shows local concavity vs. convexity, or where there is an inflexión of curvature direction. Also where the model reached planarity (within tolerance).

Dots, zebras, leopards, anything will be a good start to see where we have areas with single curvature.

I do understand that this si a very complex request. So let’s see what’s possible. Thx!

G

This is the result of the script I’m using (I found an old version…)


darker areas = double concave
whiter areas = double convex

sort of, this version wasn’t really good…

In my workflow I care to avoid too-curved shapes and double concave shapes so here I’m just evaluating just min curvature + a dark/white filter over the normal gradient… I have no real need for max, mean and gaussian.

1 Like

Hi Pierre, I think a _Leopard command would be useful since it seems to help identify non-G2 edges much more clearly than Zebra does. Maybe some will disagree but I think it would be a good addition to Rhino’s surface analysis toolset.

Here’s what I mean:

If it doesn’t take you to the specified time, the timestamp is 28:27 to around 28:46 (though the whole video is pretty interesting to watch!)

3 Likes