3D polygon mesh volume calculation

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

3D polygon mesh volume calculation

Post by bairog » Tue Feb 21, 2023 6:22 am

Hello.
I use latest TeeChart 4.2023.2.17 in a WinForms application targeting .NET 5.0.
I have a Points3D series with some sample values (it can be converted to TriSurface if needed).
Is it possible to calculate volume of a 3D mesh that is limited by series lines? Is there a special function or something?
Thank you.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Tue Feb 21, 2023 3:54 pm

Hello,
bairog wrote:
Tue Feb 21, 2023 6:22 am
I use latest TeeChart 4.2023.2.17 in a WinForms application targeting .NET 5.0.
I have a Points3D series with some sample values (it can be converted to TriSurface if needed).
Is it possible to calculate volume of a 3D mesh that is limited by series lines? Is there a special function or something?
Thank you.
That's an interesting question, but unfortunately, as things stand, the answer is no—no we don't have a function to calculate the volume (nor surface area) of 3D series types. Just to be clear—are you talking about generating 3D meshes as in this post and then calculating their volume?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: 3D polygon mesh volume calculation

Post by bairog » Tue Feb 21, 2023 4:23 pm

Christopher wrote:
Tue Feb 21, 2023 3:54 pm
Just to be clear—are you talking about generating 3D meshes as in this post and then calculating their volume?
Yes, I'm talking about something like that. My mesh is something like:
Image

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Tue Feb 21, 2023 4:50 pm

Hello,
bairog wrote:
Tue Feb 21, 2023 4:23 pm
Yes, I'm talking about something like that. My mesh is something like:
Looks an interesting problem. What you're looking for sounds like a Volume Mesh—I've found a couple of opensource libraries which might be able to perform this operation, but nothing written in C#. Have you been able to find a promising looking library?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: 3D polygon mesh volume calculation

Post by bairog » Tue Feb 21, 2023 5:13 pm

For now I've found this StackOveflow question answer and library geometry3Sharp that is mentioned here. Haven't tested them yet :)

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Tue Feb 21, 2023 5:37 pm

Hello,
bairog wrote:
Tue Feb 21, 2023 5:13 pm
For now I've found this StackOveflow question answer and library geometry3Sharp that is mentioned here. Haven't tested them yet :)
It looks as though the Stackoverflow user @bairog appears in the comments section of that question with posts from this time last year ... is that you? :)
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: 3D polygon mesh volume calculation

Post by bairog » Wed Feb 22, 2023 4:15 am

Yes it was me :) . I was assigned a task which included 3D mesh volume calculation a year ago. But short time later I was switched to another project. And now initial task is relevant for me again.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Wed Feb 22, 2023 11:25 am

Hello,

I see that geometry3Sharp now recommends geometry4Sharp, and that this library contains things such as 'MeshMeasurements' which include volume. It looks as though it could be useful.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: 3D polygon mesh volume calculation

Post by bairog » Wed Feb 22, 2023 1:27 pm

Maybe you can use the math from this library to calculate the volume of a 3D mesh (looks like most suitable for TriSurface series).

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Wed Feb 22, 2023 6:08 pm

Hello,
bairog wrote:
Wed Feb 22, 2023 1:27 pm
Maybe you can use the math from this library to calculate the volume of a 3D mesh (looks like most suitable for TriSurface series).
Well, I've got as far as this:
https://github.com/Steema/MeshVolume

Which is to say I've drawn a sphere in the Chart using a Points3D series. What's missing is taking the points returned from SphereCoordinates() and feeding them into geometry4Sharp and getting a volume back ...
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Thu Feb 23, 2023 12:10 pm

Hello,
Christopher wrote:
Wed Feb 22, 2023 6:08 pm
Which is to say I've drawn a sphere in the Chart using a Points3D series. What's missing is taking the points returned from SphereCoordinates() and feeding them into geometry4Sharp and getting a volume back ...
I've found some an old example repo which uses geometry3Sharp and I've updated it to geometry4Sharp. The demos aren't very good, but they do give more of an idea of how to use the library. I've added them to our repo, which you can clone with:

Code: Select all

git clone --recurse-submodules https://github.com/Steema/MeshVolume.git
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: 3D polygon mesh volume calculation

Post by bairog » Wed Mar 01, 2023 5:16 am

Christopher wrote:
Thu Feb 23, 2023 12:10 pm
I've found some an old example repo which uses geometry3Sharp and I've updated it to geometry4Sharp. The demos aren't very good, but they do give more of an idea of how to use the library.
Are you talking about geometry3SharpDemos repo?
As I see unfortunatelly it has no example of using MeshMeasurements at all :( Hope you will manage to get further somehow..

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Wed Mar 01, 2023 7:35 am

Hello,
bairog wrote:
Wed Mar 01, 2023 5:16 am
As I see unfortunatelly it has no example of using MeshMeasurements at all :( Hope you will manage to get further somehow..
I thought I was trying to help you here :) I doubt I'm going to be able to get any further on this, but if I do I'll let you know.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

bairog
Advanced
Posts: 128
Joined: Fri Dec 07, 2018 12:00 am

Re: 3D polygon mesh volume calculation

Post by bairog » Wed Mar 01, 2023 7:51 am

Christopher wrote:
Wed Mar 01, 2023 7:35 am
I thought I was trying to help you here :) I doubt I'm going to be able to get any further on this, but if I do I'll let you know.
Looks like I misunderstood you - I thought that you would try to add a volume calculation function to your charting library. Sorry.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: 3D polygon mesh volume calculation

Post by Christopher » Wed Mar 01, 2023 8:33 am

Hello,
bairog wrote:
Wed Mar 01, 2023 7:51 am
Looks like I misunderstood you - I thought that you would try to add a volume calculation function to your charting library. Sorry.
Sorry, to be clear, we have no plans to add this kind of functionality to TeeChart at this time; although TeeChart does perform a rudimentary kind of polygon meshing in its Surface and TriSurface series, we don't have any plans to add volume meshing to it.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply