Errors with making regular-faced polyhedron

The place to talk about Stella4D, Great Stella, and Small Stella. Feel free to ask questions about them here.
Post Reply
Wagyx
Posts: 8
Joined: Wed Dec 19, 2018 9:28 am
Contact:

Errors with making regular-faced polyhedron

Post by Wagyx » Sat Mar 06, 2021 8:47 pm

Hi there,

I would like to report two issues:
- an internal error "ConnectEdges(): Could not find mNeigh for edge 19-1." when loading an OFF file
- an error "Could not make faces regular" when trying to make faces regular

Let me explain how I got that.
I usually start by playing with my Supermag set (a variant from Geomag).
Once I have found a good (supposedly) regular-faced model, I make the corresponding polyhedron using a mesh editor like Blender and I export it to the OFF format.
This version is a rough 3D model of the real model but the topology of the faces is the same. Only the positions of the vertices are not accurate.
Then, I want to use Stella to make the faces regular since I use Supermag rods with the same length.
So I open the off file with Stella. It works most of the time but on rare occasions, I get the ConnectEdges() error message and Stella stops responding.
I guess this is a problem with modeling with Blender. I have tried making the same model from scratch differently 2 times without success.
It is probably a matter on my side but I cannot figure out what it is. It opens fine with Meshlab and Blender.

When the model opens nicely, I use the menu "Poly" -> "Try to make faces regular" on it.
Most of the time, this works and I get a working model where all edges are 1.
Sometimes, it works but I get a near miss since all edges are not of length 1.
In this case, either the model did not have regular faces to begin with or
the algorithm could have iterated to converge more but did not do it for some reason.
In rare cases, I get a message "Could not make faces regular".
I cannot understand what I do differently in these failing cases from the working ones.
Is it related to the polyhedron shape like having co-planar faces ?
What is the algorithm behind this feature ?

On the failing cases, I have tried the Spring model feature but I get the "The polyhedron you want to create does not appear to be valid." error sometimes.
It is quite self explanatory but I don't get why.
The spring model is not reliable, half of the time it outputs garbage.

I hope you may have an educated guess to solutions about my issues.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Re: Errors with making regular-faced polyhedron

Post by robertw » Mon Mar 08, 2021 4:24 am

You would have to send me some of your OFF files for me to see what's happening with them.

For OFF files to load properly they need two things:
  • Two faces meeting perfectly at each edge
  • Double-precision accuracy, ie go for 14 decimal places or so in the OFF file
The Try-to-make-regular feature isn't perfect, and presumes the vertices are already in roughly the right places, as it will adjust them from there. It is trying to make faces perfectly regular, so may fail for near misses, as it can't make all the faces regular. In the future I may try to make it more useful for near misses. It uses the spring relaxation system under the hood, which is harder to use on its own (it can get tied in knots if not set up well, and hard to get the topology connections right unless you start from an existing model). By its nature, it's not really a system that can be perfected, because convergence is unpredictable, and there is often more than one solution to the given constraints, but given good input that's not too far from the required solution it generally works.

I'd need to see your OFF files to know more.

Wagyx
Posts: 8
Joined: Wed Dec 19, 2018 9:28 am
Contact:

Re: Errors with making regular-faced polyhedron

Post by Wagyx » Sat Mar 13, 2021 12:06 pm

Thank you for your answer.

I think (hope) the first condition is met.
I don't quite get the accuracy one, though. I mean, if some vertex coordinate is 0.5, do I have to explicitly write 0.5000000000000000000 with trailing zeros in the off file ? I understand that there may be issues if two vertices get too close to each other but it is definitely not the case here.

I understand the principles with the non linear optimization process and the sensitivity to initial conditions, that's why I wanted to try models with more accurate vertex position but they give me the connect edge error.

I'll send you the files by PM.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Re: Errors with making regular-faced polyhedron

Post by robertw » Sat Mar 13, 2021 12:29 pm

No, 0.5 is the same as 0.5000000000000000. But if it's not all trailing zeroes, then you want to include as many as possible.

Wagyx
Posts: 8
Joined: Wed Dec 19, 2018 9:28 am
Contact:

Re: Errors with making regular-faced polyhedron

Post by Wagyx » Thu Apr 15, 2021 8:44 am

Hello,

Here is the follow-up about my isssues after some discussion with robertw through PM.

The internal error "ConnectEdges(): Could not find mNeigh for edge 19-1." when loading an OFF file is triggered when attempting stellation/nets.
It seems that the polyhedron I work with are not adapted to stellation (which is not an issue to me at all). In order to prevent the error and the application crash, make sure there's no stellation or net views open, then the models load fine.

Regarding the "Could not make faces regular" error, the feature may be improved or fixed in a future release. So I guess I'll have to find another way or wait.

So this issue is closed.

Thank you for your help robertw.

Post Reply