Skip to content

Erroneous (?) geometry error #87

@depmco

Description

@depmco

I seem to have found a bug; whether it's in nec2++ or my head is still a question. I'm running the following version:

nec2++ 1.7.4 [2025-07-09] compiler: 13.3.0

on Linux Mint 22.1 Xia

Running the following short model file:

CM NEC2++ Test structure
CE
GW 1 11 0.0     0.0      1.0204     0.0     0.0        1.5306        0.002
GW 2 11 0.0     0.0      1.5306     0.36077 0.36077    1.5306        0.002
GW 3 11 0.36077 0.36077  1.5306     0.36077 0.36077    1.5506        0.002
GW 10 11 0.0     0.0      1.0204     0.5102  0.0        1.0204        0.002
GE 0
EX 0 1 1 00 1.0 0.0
GN 1
FR 0 40 0 0 146.0 0.05
RP  0 181   360 0010       0.0       0.0       1.0       1.0
XQ 3
EN

produces the error on the console:

NEC++ Runtime Error: 
GEOMETRY DATA ERROR -- FIRST SEGMENT MIDPOINT OF WIRE #3 (TAG ID #3) INTERSECTS WIRE #2 (TAG ID #2)

and the file output for the run contains:


                                __________________________________________
                               |                                          |
                               | NUMERICAL ELECTROMAGNETICS CODE (nec2++) |
                               | Implemented in 'C++' in Double Precision |
                               |        Version 1.7.4 [2025-07-09]        |
                               |__________________________________________|



                               ---------------- COMMENTS ----------------
                                NEC2++ Test structure
                               



                                -------- STRUCTURE SPECIFICATION --------
                                COORDINATES MUST BE INPUT IN
                                METERS OR BE SCALED TO METERS
                                BEFORE STRUCTURE INPUT IS ENDED
  WIRE                                                                                 SEG FIRST  LAST  TAG
   No:        X1         Y1         Z1         X2         Y2         Z2       RADIUS   No:   SEG   SEG  No:

     1      0.0000     0.0000     1.0204     0.0000     0.0000     1.5306     0.0020    11     1    11    1
     2      0.0000     0.0000     1.5306     0.3608     0.3608     1.5306     0.0020    11    12    22    2
     3      0.3608     0.3608     1.5306     0.3608     0.3608     1.5506     0.0020    11    23    33    3                               NEC++ Runtime Error: 
                               GEOMETRY DATA ERROR -- FIRST SEGMENT MIDPOINT OF WIRE #3 (TAG ID #3) INTERSECTS WIRE #2 (TAG ID #2)

The error seems erroneous; xnecview shows no intersection and nec2c completes without error on the same file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions