thomaslepoix / Qucs-RFlayout

Export Qucs RF schematics to KiCad layouts & OpenEMS scripts
GNU General Public License v3.0
125 stars 11 forks source link

Command line interface of qucsrflayout not working on Windows #33

Closed istra711 closed 6 months ago

istra711 commented 6 months ago

I just installed the tool on windows but the command line doesn't respond to any kind of command. The GUI is functional and generates the m-file for the simulation. In the tutorial I don't find any hits how to use the GUI. Is it possible to start the simulation from the GUI?

BTW, I also tried to compile the qucsrflayout application for windows (Dockerfile.win32) but without success. The the docker image (burningdaylight/docker-mingw-qt5) seems to be broken.

thomaslepoix commented 6 months ago

I just installed the tool on windows but the command line doesn't respond to any kind of command.

This seems really strange, could you report exactly what happens on the terminal?

The GUI is functional and generates the m-file for the simulation. In the tutorial I don't find any hits how to use the GUI. Is it possible to start the simulation from the GUI?

The tutorial refers to two different CLI :

qucsrflayout --help
Usage: qucsrflayout -i FILENAME.sch
       qucsrflayout -i FILENAME.sch -f [.kicad_pcb|.kicad_mod|.lht]
       qucsrflayout -i FILENAME.sch -f [.kicad_pcb|.kicad_mod|.lht] -o DIRNAME
       qucsrflayout -G

  -h, --help    Display this help and exit.
      --version Display version information and exit.
  -v, --verbose Verbose mode.
  -G            GUI mode (no arguments equals to -G).
  -i FILENAME   Use file as input schematic.
  -o DIRNAME    Use directory as output.
  -f FORMAT     Use format as output layout format.
                FORMAT can be:
                - .kicad_pcb    : KiCad layout (default format)
                - .kicad_mod    : KiCad module
                - .lht          : pcb-rnd layout
                - .m            : OpenEMS Octave script
  -n NETLIST    Specify a netlist to use instead of calling Qucs to create it from the schematic.
                Useful when Qucs is not installed, if you use QucsStudio for example.
  -q, --qucs PATH       Specify Qucs executable to call for netlist creation, otherwise qucs, then qucs-s will
                be tried regarding system PATH variable. PATH can be either a relative or absolute path.
  -s            Export each substrate in a different file.
  -b            Export each block in a different file.
  -k, --keep    Keep temporary files.

  -e, --exclude STRING               Exclude a component. Must be a component label.
  -u, --use STRING                   Exclude all components except the used ones. Must be a component label.
      --margin-factor INTEGER        The distance between circuits and substrate edges.
                                     is defined as a substrate height multiple. Default is 10.
      --port-shift N X Y             Translate a port. X grows to the right, Y grows to the bottom.
      --port-size N L W              Set a port size. L is in x axis, W in y axis.
                                     Can be used with '--port-shift' to create designs such as
                                     center fed patch antenna.
      --oems-highres-div INTEGER     OpenEMS high resolution mesh lambda divisor. Default is 200.
      --oems-metalres-div INTEGER    OpenEMS metal resolution mesh lambda divisor. Default is 60.
      --oems-substres-div INTEGER    OpenEMS substrate resolution mesh lambda divisor. Default is 30.
      --oems-timeres INTEGER         Number of timesteps before OpenEMS stops simulation. Default is 300000.
      --oems-end-criteria STRING     OpenEMS stops simulation when energy decayed to this value.
                                     Should stay between 1e-3 (speed) and 1e-5 (precision). Default is 1e-4.
      --oems-nf2ff-center STRING     Set the OpenEMS far field center. Must be a component label.
      --oems-sort-metalresmesh       Order metal resolution mesh lines by edge coordinate.
                                     Default is grouped by component label.
      --oems-pkg                     Look for 'openems' and 'csxcad' Octave packages (from Debian 10 repository).
Usage:  ./script.m <options>
        octave script.m <option>

General options:
    -h, --help             Display this help and exit.
    -c, --clean            Remove all result and simulation files.
    -cr, --clean-result    Remove all result files.
    -cs, --clean-sim       Remove all simulation files.
    --port <N>             Enable a port. 'N' is a port number. By default the port 1 is enabled.
    --no-port <N>          Disable a port. 'N' is a port number. By default all other ports are disabled.
                           Possible port numbers are : 1  2

Control options:
    --only-preprocess      Only structure and mesh construction.
    --only-postprocess     Only process simulation datas to produce graphics and far field calculation.
    --no-preprocess        Do not execute anything before siulation.
    --no-postprocess       Do not execute anything after simulation.
    --no-gui               Do not open AppCSXCAD.

Preprocessing options:
    --dump-et              Dump E field in time domain.
    --dump-ht              Dump H field in time domain.
    --dump-jt              Dump current in time domain.
    --dump-cdt             Dump current density in time domain.
    --no-conductingsheet   Use 3D perfect metal boxes instead of 2D conducting sheets.
    --no-highresmesh       No high resolution mesh for non orthogonal shapes.
    --no-metalresmesh      No particular mesh lines (thirds rule) at metal resolution for orthogonal shapes.
    --keep-portlines       Effect only with '--no-metalresmesh', keep ports mesh lines.
    --no-smoothmesh        Only particular mesh lines.
    --no-mesh              Do not mesh any shape.
    --mur                  Use MUR boundary condition instead of PML_8. Results and simulation time may significantly vary.

Postprocessing options:
    --legend-out           Put legend boxes outside graphics
    --f <F>                Set frequency to place markers and compute far field radiations.
                           Can be called multiple times. Example : '--f 3.1e09'
    --f-max s<A><B>        Place markers and compute far field radiations at the frequency for which the specified
                           S parameter is maximal. A and B are port numbers, B must be active. Can be called multiple times.
    --f-min s<A><B>        Place markers and compute far field radiations at the frequency for which the specified
                           S parameter is minimal. A and B are port numbers, B must be active. Can be called multiple times.
    --f-equal s<A><B> <F>  Place markers and compute far field radiations at the frequency for which the specified
                           S parameter is equal to the specified value (in dB). Can be called multiple times.
                           Example : '--f-equal s21 -3.5'.
    --dump-ff3d            Dump 3D far field radiation pattern.
    --nf2ff                Calcul far field radiation.
    --nf2ff-force          Force NF2FF calculation.
    --nf2ff-3d             Enable 3D far field representation (may be long).
    --nf2ff-frames <I>     Number of 3D frames to merge in a .gif. ImageMagick is required. Default (0, 1 or nothing) : use
                           default or --f* args specified frequencies and no .gif generated.
    --nf2ff-delay          Delay between each frames (in ms). Cf. convert's '-delay' argument. Default : 30
    --nf2ff-phistep <I>    Set phi angle (elevation) step for 3D far field. I is in degree, default is 5.
    --nf2ff-thetastep <I>  Set theta angle (azimuth) step for 3D far field. I is in degree, default is 5.
    --nf2ff-anglestep <I>  Set phi & theta angle steps for 3D far field. I is in degree.

BTW, I also tried to compile the qucsrflayout application for windows (Dockerfile.win32) but without success. The the docker image (burningdaylight/docker-mingw-qt5) seems to be broken.

Yes it is outdated, I am currently reworking that.

istra711 commented 6 months ago

In case I start qucsrflayout with a command line parameter on Windows 10, for example like this: "qucsrflayout --help", then there is no output at all in the terminal window and no GUI. If I start the application without any command line parameter in the terminal window (CMD) then the GUI will show up. If I start the application with "qucsrflayout -G" the GUI will be started. My first guess was, that the command line interface is broken but since the "G" option works this can't be root cause. I am familiar with openems and did a lot of simulations already by using the bare metal Octave/Matlab interface. I was wondering if the GUI starts the Octave script by itself and if it is possible to set the "--oems-XXXX" parameter somewhrer in the GUI because I haven't found this option yet.

thomaslepoix commented 6 months ago

Here are those :

preview_qucsrflayout