From cfa7f6d0ac3cbc7b0cac549ea7cdf572706b1a2c Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Tue, 15 Apr 2025 10:02:47 +0200 Subject: [PATCH] Add inkscape directory --- figs/inkscape/convert_svg.sh | 18 ++++++++++++++++++ .../detail_fem_apa300ml_frames.svg | 0 .../detail_fem_apa95ml_bench_schematic.svg | 0 .../detail_fem_apa95ml_frames.svg | 0 .../{ => inkscape}/detail_fem_apa95ml_mesh.svg | 0 .../detail_fem_apa95ml_picture.svg | 0 .../detail_fem_apa_2dof_model.svg | 0 .../detail_fem_apa_modal_schematic.svg | 0 .../detail_fem_joint_dimensions.svg | 0 .../detail_fem_joints_3d_view.svg | 0 .../detail_fem_joints_frames.svg | 0 figs/{ => inkscape}/detail_fem_joints_wire.svg | 0 figs/{ => inkscape}/detail_fem_joints_yang.svg | 0 13 files changed, 18 insertions(+) create mode 100755 figs/inkscape/convert_svg.sh rename figs/{ => inkscape}/detail_fem_apa300ml_frames.svg (100%) rename figs/{ => inkscape}/detail_fem_apa95ml_bench_schematic.svg (100%) rename figs/{ => inkscape}/detail_fem_apa95ml_frames.svg (100%) rename figs/{ => inkscape}/detail_fem_apa95ml_mesh.svg (100%) rename figs/{ => inkscape}/detail_fem_apa95ml_picture.svg (100%) rename figs/{ => inkscape}/detail_fem_apa_2dof_model.svg (100%) rename figs/{ => inkscape}/detail_fem_apa_modal_schematic.svg (100%) rename figs/{ => inkscape}/detail_fem_joint_dimensions.svg (100%) rename figs/{ => inkscape}/detail_fem_joints_3d_view.svg (100%) rename figs/{ => inkscape}/detail_fem_joints_frames.svg (100%) rename figs/{ => inkscape}/detail_fem_joints_wire.svg (100%) rename figs/{ => inkscape}/detail_fem_joints_yang.svg (100%) diff --git a/figs/inkscape/convert_svg.sh b/figs/inkscape/convert_svg.sh new file mode 100755 index 0000000..c9c1755 --- /dev/null +++ b/figs/inkscape/convert_svg.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Directory containing SVG files +INPUT_DIR="." + +# Loop through all SVG files in the directory +for svg_file in "$INPUT_DIR"/*.svg; do + # Check if there are SVG files in the directory + if [ -f "$svg_file" ]; then + # Output PDF file name + pdf_file="../${svg_file%.svg}.pdf" + png_file="../${svg_file%.svg}" + + # Convert SVG to PDF using Inkscape + inkscape "$svg_file" --export-filename="$pdf_file" && \ + pdftocairo -png -singlefile -cropbox "$pdf_file" "$png_file" + fi +done diff --git a/figs/detail_fem_apa300ml_frames.svg b/figs/inkscape/detail_fem_apa300ml_frames.svg similarity index 100% rename from figs/detail_fem_apa300ml_frames.svg rename to figs/inkscape/detail_fem_apa300ml_frames.svg diff --git a/figs/detail_fem_apa95ml_bench_schematic.svg b/figs/inkscape/detail_fem_apa95ml_bench_schematic.svg similarity index 100% rename from figs/detail_fem_apa95ml_bench_schematic.svg rename to figs/inkscape/detail_fem_apa95ml_bench_schematic.svg diff --git a/figs/detail_fem_apa95ml_frames.svg b/figs/inkscape/detail_fem_apa95ml_frames.svg similarity index 100% rename from figs/detail_fem_apa95ml_frames.svg rename to figs/inkscape/detail_fem_apa95ml_frames.svg diff --git a/figs/detail_fem_apa95ml_mesh.svg b/figs/inkscape/detail_fem_apa95ml_mesh.svg similarity index 100% rename from figs/detail_fem_apa95ml_mesh.svg rename to figs/inkscape/detail_fem_apa95ml_mesh.svg diff --git a/figs/detail_fem_apa95ml_picture.svg b/figs/inkscape/detail_fem_apa95ml_picture.svg similarity index 100% rename from figs/detail_fem_apa95ml_picture.svg rename to figs/inkscape/detail_fem_apa95ml_picture.svg diff --git a/figs/detail_fem_apa_2dof_model.svg b/figs/inkscape/detail_fem_apa_2dof_model.svg similarity index 100% rename from figs/detail_fem_apa_2dof_model.svg rename to figs/inkscape/detail_fem_apa_2dof_model.svg diff --git a/figs/detail_fem_apa_modal_schematic.svg b/figs/inkscape/detail_fem_apa_modal_schematic.svg similarity index 100% rename from figs/detail_fem_apa_modal_schematic.svg rename to figs/inkscape/detail_fem_apa_modal_schematic.svg diff --git a/figs/detail_fem_joint_dimensions.svg b/figs/inkscape/detail_fem_joint_dimensions.svg similarity index 100% rename from figs/detail_fem_joint_dimensions.svg rename to figs/inkscape/detail_fem_joint_dimensions.svg diff --git a/figs/detail_fem_joints_3d_view.svg b/figs/inkscape/detail_fem_joints_3d_view.svg similarity index 100% rename from figs/detail_fem_joints_3d_view.svg rename to figs/inkscape/detail_fem_joints_3d_view.svg diff --git a/figs/detail_fem_joints_frames.svg b/figs/inkscape/detail_fem_joints_frames.svg similarity index 100% rename from figs/detail_fem_joints_frames.svg rename to figs/inkscape/detail_fem_joints_frames.svg diff --git a/figs/detail_fem_joints_wire.svg b/figs/inkscape/detail_fem_joints_wire.svg similarity index 100% rename from figs/detail_fem_joints_wire.svg rename to figs/inkscape/detail_fem_joints_wire.svg diff --git a/figs/detail_fem_joints_yang.svg b/figs/inkscape/detail_fem_joints_yang.svg similarity index 100% rename from figs/detail_fem_joints_yang.svg rename to figs/inkscape/detail_fem_joints_yang.svg