RoHS logo height


#1

Hi. I want to add a RoHS logo on the board. The shortest height of the logo is 6 mm and I need the shorter one (3 or 4 mm). Can I decrease the height by editing a footprint? I want to avoid creating my own one


#2

the footprint editor has no way of scaling footprints.

If you find the original logo in any vector format you can use svg2mod to create the logo in the height your require.


#3

I made a proposal to solve this in a nice way without having to import svg (https://bugs.launchpad.net/kicad/+bug/1786787)


#4

I know this is cross-posting (sorry, forum Gods), but this is what I just posted on the launchpad bug-track:

I think there is place for the built-in scaling function. Take, for example, the KiCad logo (Symbol:Symbol_KiCAD-Logo_CopperAndSilkScreenTop) in the standard Symbol library. That logo is composed of 3 fabrication layers. Silkscreen, copper for the “Ki”, and solder mask to expose the copper for visual impact. That’s more than a simple SVG import because of the different layers.

But to properly implement logo scaling the footprint file format should include an optional parameter telling KiCad that it is allowed to be scaled. Otherwise support will be flooded with requests for help because they scaled a regular footprint (either accidentally, or intentionally) and their part doesn’t fit anymore.

In the mean time, I suppose @Maui’s StepUp might be a way to scale existing logos into new footprints. I haven’t tried yet, though.

Has anyone tried using StepUp for this?

P.S. I just noticed an error in my descriptions. That logo doesn’t actually have anything on the copper layer. Just the mask to expose any copper that happens to be under the logo (like a copper pour).


#5

Here is a quick and dirty Perl script that will scale a footprint:

#!/usr/bin/perl -w

my $scale = 0.5;

sub scale {
    my ($keyword, $x, $y) = @_;
    my $newx = $x * $scale;
    my $newy = $y * $scale;
    return "($keyword $newx $newy)";
}

while (<>) {
    s/\((start|end|xy|at)\s+([\d\.\-]+)\s+([\d\.\-]+)\)/scale($1, $2, $3)/ge;
    print;
}

Just edit the script to set the scaling factor, and then run it like this:

kicad-scale.pl original.kicad_mod > scaled.kicad_mod

Then you’ll need to manually edit the scaled.kicad_mod file in a text editor to change the name.

Here are 3mm and 4mm RoHS logos created in this way from the existing 6mm logo:

kicad-scale.zip (9.8 KB)


#6

Thanks mate. I was looking something like that :slight_smile: