Overlapping structures

Give some feedback on openEMS.

Moderators: thorsten, sebastian

Post Reply
Olf
Posts: 69
Joined: Thu 13 Sep 2012, 07:53

Overlapping structures

Post by Olf » Wed 19 Sep 2012, 07:56

Hi guys,
I have one comment about creating overlapping or nested structures. Not quite sure if I understand it correctly, but I found that structures that are defined firstly will over write the structures that are defined later. For example if I want to have a sphere with a certain refractive index inside a larger sphere with a different refractive index, I first need to define the inner sphere and then the outer sphere.
I find this a bit counter intuitive as I would expect a structure A to overwrite an earlier defined structure B if there is some overlap.
But maybe you have some good reasons to do it this way?
Best regards,
Olf

thorsten
Posts: 1393
Joined: Mon 27 Jun 2011, 12:26

Re: Overlapping structures

Post by thorsten » Wed 19 Sep 2012, 09:21

Hi Olf,
I found that structures that are defined firstly will over write the structures that are defined later.
I wouldn't have known which one would win in this case, thanks for testing ;)

What you want to do is using the priority!
The third argument to any primitive is called priority and an object with an higher priority takes precedence over an object with a lower one.
It is assumed to be undefined which objects with the same priority would take precedence in this case.

There is still the problem that this system doesn't always apply. A dump box for example will ignore this completely. Furthermore excitations only apply the priority amongst them-selfs, which means, you cannot cut a hole in an excitation with e.g. a metal with a higher priority or vice versa.

I think we really need a wiki page explaining the priority system and all its special cases etc.

I'm also thinking about a new primitive which would be maybe called BooleanPrimitive which would be something like a (Box1-Sphere2)*Cylinder3 and so on...

Does this answer your question?

regards
Thorsten

Olf
Posts: 69
Joined: Thu 13 Sep 2012, 07:53

Re: Overlapping structures

Post by Olf » Wed 19 Sep 2012, 09:43

Thanks, that was exactly my question. I was also already wondering what the priority parameter is used for....

Post Reply