The SVG contains quite a few things that I don’t think nanosvg supports (e.g. mask, pattern, markers). nanosvg is the SVG parsing and rendering engine in Rack, and some of the limitations are mentioned in the Rack panel guide.
The reason your controls aren’t showing up is that they are being positioned far off the panel. A VCV Rack panel is 128.5 mm high, and you have the y coordinate of the first control at 3062mm. These coordinates are relative to the top left corner of the panel. This code does not operate in the coordinate space of the SVG: it operates in terms of pixels (more or less , but getting precise would mean a long discussion that isn’t very relevant).
addParam(createParamCentered<RoundBlackKnob>(mm2px(Vec(4024.672, 3061.944)), module, Multiplesubtractor::VOLUME_KNOB_PARAM));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(4024.488, 3147.055)), module, Multiplesubtractor::_IN_INPUT));
addInput(createInputCentered<PJ301MPort>(mm2px(Vec(4024.58, 3201.889)), module, Multiplesubtractor::NONINV_IN_INPUT));
You’re not to blame for this – it’s what helper.py is generating for you.
I see that you have a very large view box set in the SVG. In Rack’s limited SVG support, I don’t think the view box is used.
i see how you got in this situation-- you’re running into the limitations of using helper.py, which simply transcribing coordinates from the SVG without understanding the implicit scaling that is going on with the SVG on a web page or in Inkscape, which do use the ViewBox.
I recommend setting the ViewBox in the SVG to be identical to the height and width (20.32mm x 128.5mm). Then you should be able to group everything on the panel and scale it down to that size. This will introduce a scaling transform on that top-level grouping element, which nanosvg DOES understand (but maybe not helper.py).
Since helper.py only really works for one-time initial bootstrapping (it will overwrite the generated CPP file each time), You can probably repair the SVG and fix the code and continue on and leave helper.py behind.
Personally, I use pixels in both SVG and code (not mm) (that’s a panel height of 380 pixels, and 1 HP is 15 pixels). I never have to use mm2pix conversions, and I can copy/paste coordinates between SVGs and code. That’s me, where I’m designing panels from thin air for the computer. It appears you are working from a physical module design where sticking to mm make sense, and all you need to solve is the scaling.