pcb

patch to enchance features of NELMA

Bug #1695534 reported by Mike Crowe on 2017-06-02
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Medium
Unassigned

Bug Description

I am updating the NELMA export function to work with gsvit http://gsvit.net/ an open source FDTD solver with GPU computing support. Most of the translation is being done with a separate software package, pcb2gsvit https://github.com/mpcrowe/pcb2gsvit .

The existing code that uses the NELMA output, NELMA-3.2, appears to be dead code and was never fully functional. I haven't tested the code changes against the original NELMA code, but I expect that it breaks it.

The processing chain of (patched)pcb -> pcb2gsvit -> (patched)gsvit is producing an reasonable output. Development is far from complete, but I would like to begin the process of integrating a patch to implement the changes I've implemented so far.

Changes
.png layers now represent unique traces as different colors which map to a netname
an xml file is now generated that provides board specific information.

Remaining work
includes better trace color indexing for netlist mapping to .png
output of component XY(z) data (z being the side of the board component is located)

Rational for implementing patch at this time
Maintains coherent code base (commit early, commit often)
Develop methodology of submitting patches you your group
Begin dialog for developing NELMA export tool

Rational for rejecting patch at this time
Developers are too busy
Patch needs to go in wildly different direction
Patch breaks existing NEMLA tool
Code changes are not complete
Feature patch request needs to be requested with different venue

I feel that the rational for considering this request outweighs the rational for rejecting it. Thank you for considering this request!

Mike Crowe (mcrowe) wrote :
Bert Timmerman (bert-timmerman) wrote :

Thanks for your patch.

Pushed branch LP1695534 with the initial patch to origin for review and test.

Kind regards,

Bert Timmerman.

Changed in pcb:
status: New → Triaged
milestone: none → pcb-4.0.2
importance: Undecided → Medium
Chad Parker (parker-charles) wrote :

I don't know really anything about NELMA. I'll have to do some research. Could you prepare some test cases to demonstrate that the exporter is working properly?

Is there any documentation on this format anywhere?

Thanks,
--Chad

On 6/19/2017 6:11 PM, Chad Parker wrote:
> I don't know really anything about NELMA. I'll have to do some research.
> Could you prepare some test cases to demonstrate that the exporter is
> working properly?
>
> Is there any documentation on this format anywhere?
>
> Thanks,
> --Chad
>

If the changes are going to break Nelma then perhaps it makes more sense
to create a new HID for the new tool? Or at least have a flag that puts
the HID in nelma mode or gsvit mode.

I'd be interested in seeing an example for how the flow is to work on a
real example.

Mike Crowe (mcrowe) wrote :

On 06/19/2017 10:29 PM, Dan McMahill wrote:
> On 6/19/2017 6:11 PM, Chad Parker wrote:
>> I don't know really anything about NELMA. I'll have to do some research.
>> Could you prepare some test cases to demonstrate that the exporter is
>> working properly?
>>
>> Is there any documentation on this format anywhere?
>>
>> Thanks,
>> --Chad
>>
>
> If the changes are going to break Nelma then perhaps it makes more sense
> to create a new HID for the new tool? Or at least have a flag that puts
> the HID in nelma mode or gsvit mode.
>
> I'd be interested in seeing an example for how the flow is to work on a
> real example.
>
Thanks for taking the time to look at my patch! I am still working on
code to integrate data from PCB into gsvit.

Rational for changes
The developer of gsvit suggested that I import the geometry information
of a design to a gsvit specific binary format. I started with the NELMA
export tool, but soon saw that I needed to add additional outputs, and
modify the existing .png outputs. The intermediate software package
https://github.com/mpcrowe/pcb2gsvit takes the modified nelma output and
converts it into this binary format.

Current state of NELMA
The code for NELMA is located here https://www.tablix.org/~avian/nelma/
According to this website a new version of NELMA hasn't been released in
7 years. It is not clear to me how many people are using it. The major
change that might affect nelma is that traces are now assigned a color
based on the net name.

My Opinion
I am an avid user of PCB. It's a great package to use. As an active
user, I feel that adding another HID for the tool adds yet another
feature that users have to think about( cluttering up the export
options). Rather than adding another tool, I would rather add another
flag to implement my patch.

What I am willing to do
I will be happy to resubmit my patch in whatever manner you decide, as a
separate tool, or as a flag option of the existing tool. Please let me
know how you would like to proceed.

Thanks again for considering these changes. I've always wanted to be
able to put my RF pcb designs in to a full blown FDTD simulation. I
think adding this capability will enhance the reputation of what I
already consider to be a great product, PCB.

Cheers
Mike

Bert Timmerman (bert-timmerman) wrote :

Hi Mike,

I agree with Dan that it would be better to start a new HID for this.

Basically you can do a copy-paste of the nelma-HID and rename (including namespace) to "gsvit".

The snippet in the diff regarding src/find.c should go in a separate commit.

Same for the snippet in src/hid/common/draw_helpers.c.

Please keep commits as small as possible (whitespace!) and specific to one goal.

Kind regards,

Bert Timmerman.

OK I'll move my work into a new hid/gsvit space.

On 07/16/2017 03:48 AM, Bert Timmerman wrote:
> Hi Mike,
>
> I agree with Dan that it would be better to start a new HID for this.
>
> Basically you can do a copy-paste of the nelma-HID and rename (including
> namespace) to "gsvit".
>
> The snippet in the diff regarding src/find.c should go in a separate
> commit.
>
> Same for the snippet in src/hid/common/draw_helpers.c.
>
> Please keep commits as small as possible (whitespace!) and specific to
> one goal.
>
> Kind regards,
>
> Bert Timmerman.
>

Changed in pcb:
milestone: pcb-4.0.2 → pcb-4.1.0
Bert Timmerman (bert-timmerman) wrote :

The snippets for src/find.c and src/hid/common/draw_helpers.c are cherry-picked into the master branch upstream.

There are now two topic branches:
- LP1695534 with the patch from Mike,
- home/bert/LP1695534 where I started coding a new gsvit HID, in which
  I will try to include pcb2gsvit code (see the link to github as
  mentioned in #5).

Kind regards,

Bert Timmerman.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers