0

Am trying to include a HDMI connector in Latex and OpenSCAD. Obviously there are many possibilities, but would prefer to have simple, native commands.

enter image description here

After some use of Inkscape and "SVGO", I have the following file (whitespace added):

<svg xmlns="http://www.w3.org/2000/svg" width="224" height="92">
<path fill="#fff" stroke="#000" stroke-width="5.988" d="
  M 19.733 10.388
  c -5.722 0 -9.962 4.85 -9.962 10.31
  v 30.087
  c 0 5.537 3.459 8.543 6.354 9.575
  l 6.021 2.147
  c 2.761.868 3.696 1.841 5.382 3.757
  l 10.166 11.55
  c 1.892 2.15 4.823 3.802 8.413 3.802
  h 131.796
  c 3.59 0 6.521 -1.653 8.413 -3.802
  l 10.166 -11.55
  c 1.687 -1.916 2.62 -2.889 5.382 -3.757
  l 6.02 -2.147
  c 2.896 -1.032 6.355 -4.038 6.355 -9.575
  V 20.698
  c 0 -5.46 -4.24 -10.31 -9.962 -10.31
  z"/></svg>

And am wondering if there are any tools for taking this a couple steps further, eg maybe half the number of segments and only integers (or integer fractions).

I would be happy with an "upper limit" type path, ie one that is significantly simpler and then also circumscribes the given one as closely as possible without sacrificing any simplicity.

Any ideas anyone?

2

Try svgomg if you want to reduce precision. There is a slider for how many decimals you want.

Integer version:

<svg xmlns="http://www.w3.org/2000/svg" width="224" height="92">
  <path fill="#fff" stroke="#000" stroke-width="6" d="
M20 10
c-6 0-10 5-10 11
v30
c0 5 3 8 6 9
l6 3
c3 0 4 1 6 3
l10 12
c2 2 5 4 8 4
h132
c3 0 6-2 8-4
l10-12
c2-2 3-3 6-3
l6-3
c3-1 6-4 6-9
V21
c0-6-4-11-10-11z"/>
</svg>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.