Area Calculation Error

Hi, I have a bunch of trimmed surface from untrimmed surface but there are some area centroid calculation issues. Also “Area” component turns red error colour. How could I solve this problem?

please create a minimal version of your .gh with internalized data that shows the problem.
otherwise it s hard to help.

see…

Do you seriously expect anyone to help you without posting your file? :man_facepalming:

3. Attach minimal versions of all the relevant files

1 Like

I’m really sorry. It’s totally my fault. My .gh file looks a bit like a spagetti file. So I didn’t want to share the definition file. But I cleaned it up and internalised some data in it. Here is my .gh file.

area_issue.gh (3.2 MB)

I have one more question while I have shared the file, the ruled surface component I use in the file creates some surfaces properly, while some of them create some surfaces in a rather absurd way, what is the reason for this?

Hi
use the Lunchbox

this shows you the invalid surfaces, I think the problem is coming from earlier in your definition

area_issue_Re.gh (3.2 MB)

2 Likes

I could share, but it’s too messy because I’m not familiar with creating clean definitions. I’m going to clean my real definition then I’d like to share my full .gh file.

Here is my full definition.

Full_Definition.gh (16.0 KB)

Only 16 KB instead of 3.2 MB :exclamation:
Still a lot of extra stuff that could be removed or improved.

I replaced two PolyLine components with Interpolate and the number of surface fragments that fail dropped from 39 to 1.

missing

Much more can be done but I’ll start with that.

  • You can do this without Tween Curve, for example, which can cause problems.
  • Instead of connecting three wires to Loft it’s better to use Merge to make sure they merge as expected, in the correct sequence.
  • etc.
1 Like

I got rid of Tween Curve but the problem didn’t go away until I moved the Seam on the rectangle at the very beginning.


area_calcs_2023Dec24a.gh (19.6 KB)

I added a Data Dam (red group) to allow moving the seam without running the slow parts.

Thank you very much for your advice, which I can use later. I usually ignore these things. But when I open the .gh file you added, the problem still seems to exist, at least for me. I have changed the seam and reran the data dam component but it still shows 27 problematic surfaces. (I am not sending another .gh file because I have already used the one you sent.)


What is your Rhino Units “Absolute tolerance”? Mine is 0.001

In Rhino, ‘View | Display Options… | Units’. Otherwise, don’t change my file.

NOTE: When I reduce my “Absolute tolerance” from 0.001 to 0.01 and reconnect an input to SrfSplit, I see 20 fails. When reduced further to 0.1 I see 14 errors.

I closed all tabs related to Rhino and reopened them and it worked. Thanks again for another useful tip.

Instead of reconnecting an input to SrfSplit :question: Whatever. Rhino can be sensitive about the tolerance setting. What was yours when you saw the errors in my code?

It was “0.01”. I changed it when you said it should be “0.001”. But it looked like nothing had changed. Then I closed it and opened it again. So it worked.

Changes to Rhino tolerance have no effect until components are re-triggered. Reconnecting an input does that, so does closing and re-opening Rhino - but that takes longer.

I think it’s significant that the invalid surface fragment (when there is only one) is near the seam (start / end point). There may be some things you are doing that don’t guarantee the correct sequence of points (for IntCrv) or curves (for Loft). Keep the code clean!

And always post a GH file when you start a thread. :roll_eyes:

3 Likes

I got it. I didn’t try to reconnect.
You can be sure I will never do that again (not adding a .gh file). It was the first topic I created. I have learnt a lot even in such a short topic. I’m looking forward to making lots of mistakes to learn new things.

2 Likes

Hi Joseph.
I realised something last night. Your definition is working really well. But I wanted to change the offset of the curve. It was 250 and when I changed the curve offset to 150 and again it shows problematic areas again. (My absolute tolerance is still “0.001”). I also tried changing the seam, but only the problematic surfaces changed and there were still problems. Is there any solution for this?