This commit is contained in:
2021-07-23 02:36:56 +02:00
commit 4d622c5291
4878 changed files with 1849508 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Estucheria - Airplane Type Linear Case</name>
<id>fablabchemnitz.de.airplanetypelinearcase</id>
<image>airplanetypelinearcase.svg</image>
<param name="unit" gui-text="Unit:" type="optiongroup" appearance="combo">
<option translatable="no" value="mm">mm</option>
</param>
<param name="width" type="float" min="0.1" max="300.0" gui-text="A - width:">25.0</param>
<param name="depth" type="float" min="0.1" max="300.0" gui-text="L - length:">25.0</param>
<param name="height" type="float" min="0.1" max="300.0" gui-text="H - height:">25.0</param>
<param name="glue_tab" type="float" min="0.1" max="300.0" gui-text="P - Width glue tab">5.0</param>
<param name="close_tab" type="float" min="0.1" max="300.0" gui-text="C - Top side sealing flange:">5.0</param>
<param name="side_tabs" type="float" min="0.1" max="300.0" gui-text="T - Top side closure tabs:">5.0</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Paper/Cardboard Boxes"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">airplanetypelinearcase.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,239 @@
#! /usr/bin/env python3
#
#
# Este script dibuja el perfil exterior de corte la caja en un solo
# path cerrado y añade despues los otros flejes necesarios con colores
# diferentes para identificarlos.
# rojo > para cortes y perfil exterior
# azul > para hendidos
# verde > para taladros
# amarillo > medios cortes
#
# TODO:
# agregar opción de dibujo en cm/in
# mover dibujo al centro del documento
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
__version__ = "0.2"
import inkex
class GenerarEstuche(inkex.EffectExtension):
def add_arguments(self, pars):
pars.add_argument("--width", type=float, default=25.0, help="Ancho de la caja")
pars.add_argument("--height", type=float, default=25.0, help="Alto de la caja")
pars.add_argument("--depth", type=float, default=25.0, help="Largo de la caja")
pars.add_argument("--glue_tab", type=float, default=5.0, help="Ancho pestaña de engomado")
pars.add_argument("--close_tab", type=float, default=5.0, help="Alto pestaña de cierre")
pars.add_argument("--side_tabs", type=float, default=5.0, help="Alto pestañas laterales de cierre")
pars.add_argument("--unit", default="mm", help="Tipo de unidades")
def effect(self):
centro_ancho_documento = self.svg.unittouu(self.document.getroot().get('width'))/2
centro_alto_documento = self.svg.unittouu(self.document.getroot().get('height'))/2
medida_pestana1=5
medida_pestana2=1
medida_pestana3=4
medida_pestana4=3
ancho_caja = self.svg.unittouu(str(self.options.width) + self.options.unit)
alto_caja = self.svg.unittouu(str(self.options.height) + self.options.unit)
largo_caja = self.svg.unittouu(str(self.options.depth) + self.options.unit)
ancho_pestana_cola = self.svg.unittouu(str(self.options.glue_tab) + self.options.unit)
alto_pestana_cierre = self.svg.unittouu(str(self.options.close_tab) + self.options.unit)
alto_pestana = self.svg.unittouu(str(self.options.side_tabs) + self.options.unit)
if self.options.unit=="cm":
medida_pestana1=0.5
medida_pestana2=0.1
medida_pestana3=0.4
medida_pestana3=0.3
if self.options.unit=='in':
medida_pestana1=0.196
medida_pestana2=0.039
medida_pestana3=0.157
medida_pestana3=0.118
medida1_pestanas_laterales=self.svg.unittouu(str(medida_pestana1) + self.options.unit)
medida2_pestanas_laterales=self.svg.unittouu(str(medida_pestana2) + self.options.unit)
medida3_pestanas_laterales=self.svg.unittouu(str(medida_pestana3) + self.options.unit)
medida4_pestanas_laterales=self.svg.unittouu(str(medida_pestana4) + self.options.unit)
id_caja = self.svg.get_unique_id('estuche-lineal')
group = self.svg.get_current_layer().add(inkex.Group(id=id_caja))
estilo_linea_cortes = {'stroke': '#FF0000', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_hendidos = {'stroke': '#0000FF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_medioscortes = {'stroke': '#00FFFF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
# line.path --> M = coordenadas absolutas
# line.path --> l = dibuja una linea desde el punto actual a las coordenadas especificadas
# line.path --> c = dibuja una curva beizer desde el punto actual a las coordenadas especificadas
# line.path --> q = dibuja un arco desde el punto actual a las coordenadas especificadas usando un punto como referencia
# line.path --> Z = cierra path
#Perfil Exterior de la caja
line = group.add(inkex.PathElement(id=id_caja + '-perfil-exterior'))
line.path = [
['M', [0, 0]],
['l', [0, 0-largo_caja]],
['l', [0, 0]],
['q', [0,0-alto_pestana_cierre,alto_pestana_cierre, 0-alto_pestana_cierre]],
['l', [ancho_caja-(alto_pestana_cierre*2), 0]],
['q', [alto_pestana_cierre,0,alto_pestana_cierre,alto_pestana_cierre]],
['l', [0, 0]],
['l', [0, (largo_caja)]],
['l', [medida4_pestanas_laterales, 0-medida4_pestanas_laterales]],
['l', [0,0-(alto_pestana-medida4_pestanas_laterales)]],
['l', [(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [medida3_pestanas_laterales, (alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [medida2_pestanas_laterales, medida2_pestanas_laterales]],
['l', [0, medida1_pestanas_laterales]],
['l', [0,0]],
['l', [ancho_caja, 0]],
['l', [0,0]],
['l', [0, 0]],
['l', [0, 0-medida1_pestanas_laterales]],
['l', [medida2_pestanas_laterales, 0-medida2_pestanas_laterales]],
['l', [medida3_pestanas_laterales, 0-(alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [0,alto_pestana-medida4_pestanas_laterales]],
['l', [medida4_pestanas_laterales, medida4_pestanas_laterales]],
['l', [0, alto_caja]],
['l', [0-medida4_pestanas_laterales, medida4_pestanas_laterales]],
['l', [0,(alto_pestana-medida4_pestanas_laterales)]],
['l', [0-(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [0-(medida3_pestanas_laterales), 0-(alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [0-(medida2_pestanas_laterales), 0-(medida2_pestanas_laterales)]],
['l', [0, 0-medida1_pestanas_laterales]],
['l', [0, 0]],
['l', [0,0]],
['l', [0-ancho_caja, 0]],
['l', [0,0]],
['l', [0, 0]],
['l', [0, medida1_pestanas_laterales]],
['l', [0-medida2_pestanas_laterales, medida2_pestanas_laterales]],
['l', [0-medida3_pestanas_laterales, (alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [0-(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [0,0-(alto_pestana-medida4_pestanas_laterales)]],
['l', [0-medida4_pestanas_laterales, 0-medida4_pestanas_laterales]],
['l', [0,0]],
['l', [0, largo_caja]],
['l', [0, 0]],
['q', [0,alto_pestana_cierre,0-alto_pestana_cierre, alto_pestana_cierre]],#
['l', [0-(ancho_caja-(alto_pestana_cierre*2)), 0]],
['q', [0-alto_pestana_cierre,0,0-alto_pestana_cierre,0-alto_pestana_cierre]],
['l', [0, 0]],
['l', [0, 0-largo_caja]],
['l', [0, 0-medida2_pestanas_laterales]],
['l', [0-ancho_pestana_cola, 0-(ancho_pestana_cola/2)]],
['l', [0, 0-(alto_caja-ancho_pestana_cola-(medida2_pestanas_laterales*2))]],
['l', [ancho_pestana_cola, 0-(ancho_pestana_cola/2)]],
['Z', []]
]
line.style = estilo_linea_cortes
#Hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-1'))
line.path = [
['M', [0,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-2'))
line.path = [
['M', [ancho_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-3'))
line.path = [
['M', [ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-4'))
line.path = [
['M', [ancho_caja+ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-5'))
line.path = [
['M', [ancho_caja,0]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-6'))
line.path = [
['M', [0,0]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-7'))
line.path = [
['M', [(ancho_caja*2)+largo_caja,0]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-8'))
line.path = [
['M', [0,alto_caja]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-9'))
line.path = [
['M', [ancho_caja,alto_caja]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-10'))
line.path = [
['M', [(ancho_caja*2)+largo_caja,alto_caja]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-11'))
line.path = [
['M', [0,0-(largo_caja)]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-12'))
line.path = [
['M', [0,alto_caja+largo_caja]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
if __name__ == '__main__':
GenerarEstuche().run()

View File

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="94mm"
height="64mm"
viewBox="0 0 94.000001 64.000001"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="LinealAvionLayout.svg">
<defs
id="defs2">
<rect
id="rect889"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-5" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-2" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-7" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-53" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-3" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-6" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-4" />
<rect
id="rect889-2-4"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect979"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
</defs>
<sodipodi:namedview
height="211mm"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1018"
inkscape:window-width="1920"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="331.71525"
inkscape:cx="241.92977"
inkscape:zoom="0.98994949"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-232.99994)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Capa 1">
<text
transform="matrix(0.41705182,0,0,0.41705182,49.95402,191.64277)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889);fill:#000000;fill-opacity:1;stroke:none;"
id="text887"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">A</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-5"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-5);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,71.467503,191.34641)"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">L</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-2"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,79.886969,176.2421)"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">H</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-56"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-53);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.27672844,0,0,0.27672844,103.87092,227.43766)"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">T</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-9"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-6);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,50.619024,205.89437)"><tspan
x="-67.10791"
y="214.78815"><tspan
style="font-size:6.35px">C</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,31.923261,189.95252)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2-4);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2-3"
xml:space="preserve"><tspan
x="-68.583793"
y="219.23689"><tspan
style="font-size:11.2889px">P</tspan></tspan></text>
<g
transform="matrix(0.41893423,0,0,0.24778878,8.2024521,246.91584)"
id="estuche-lineal3266">
<path
id="estuche-lineal3266-perfil-exterior"
d="m 0,0 v -30 0 q 0,-20 20,-20 h 30 q 20,0 20,20 v 0 30 l 3,-3 v -17 h 22 l 4,14 1,1 v 5 0 h 70 v 0 0 -5 l 1,-1 4,-14 h 22 v 17 l 3,3 v 150 l -3,3 v 17 h -22 l -4,-14 -1,-1 v -5 0 0 h -70 v 0 0 5 l -1,1 -4,14 H 73 v -17 l -3,-3 v 0 30 0 q 0,20 -20,20 H 20 Q 0,200 0,180 v 0 -30 -1 l -15,-7.5 V 8.5 L 0,1 Z"
style="fill:none;stroke:#ff0000;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-1"
d="M 0,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-2"
d="M 70,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-3"
d="M 100,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-4"
d="M 170,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-5"
d="m 70,0 h 30 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-6"
d="M 0,0 H 70 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-7"
d="m 170,0 h 30 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-8"
d="M 0,150 H 70 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-9"
d="m 70,150 h 30 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-10"
d="m 170,150 h 30 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-11"
d="M 0,-30 H 70 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-lineal3266-perfil-hendidos-12"
d="M 0,180 H 70 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Estucheria - Automatic Bottom Case</name>
<id>fablabchemnitz.de.automaticbottomcase</id>
<image>automaticbottomcase.svg</image>
<param name="unit" gui-text="Unit:" type="optiongroup" appearance="combo">
<option translatable="no" value="mm">mm</option>
</param>
<param name="width" type="float" min="0.1" max="300.0" gui-text="A - width:">25.0</param>
<param name="depth" type="float" min="0.1" max="300.0" gui-text="L - length:">25.0</param>
<param name="height" type="float" min="0.1" max="300.0" gui-text="H - height:">25.0</param>
<param name="glue_tab" type="float" min="0.1" max="300.0" gui-text="P - Width glue tab">5.0</param>
<param name="close_tab" type="float" min="0.1" max="300.0" gui-text="C - Top side sealing flange:">5.0</param>
<param name="side_tabs" type="float" min="0.1" max="300.0" gui-text="T - Top side closure tabs:">5.0</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Paper/Cardboard Boxes"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">automaticbottomcase.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,233 @@
#! /usr/bin/env python3
#
#
# This script draws the outer profile of the box cut in a single
# closed path and then add the other necessary strips with colours
# different to identify them.
# red > for cuts and outer profile
# blue > for crevices
# green > for drills
# yellow > half-cut
#
# EVERYTHING:
# add cm/in drawing option
# move drawing to the center of the document
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
__version__ = "0.2"
import inkex
class AutomaticBottomCase(inkex.EffectExtension):
def add_arguments(self, pars):
pars.add_argument("--width", type=float, default=25.0, help="Width of the box")
pars.add_argument("--height", type=float, default=25.0, help="Height of the box")
pars.add_argument("--depth", type=float, default=25.0, help="Length of the box")
pars.add_argument("--glue_tab", type=float, default=5.0, help="Tab width")
pars.add_argument("--close_tab", type=float, default=5.0, help="Height sealing flange")
pars.add_argument("--side_tabs", type=float, default=5.0, help="Height side sealing flanges")
pars.add_argument("--unit", default="mm", help="Type of units")
def effect(self):
width_center_document = self.svg.unittouu(self.document.getroot().get('width'))/2
height_center_document = self.svg.unittouu(self.document.getroot().get('height'))/2
eyelash_measure1=5
eyelash_measure2=1
eyelash_measure3=4
eyelash_measure4=3
box_width = self.svg.unittouu(str(self.options.width) + self.options.unit)
box_height = self.svg.unittouu(str(self.options.height) + self.options.unit)
box_length = self.svg.unittouu(str(self.options.depth) + self.options.unit)
glue_width = self.svg.unittouu(str(self.options.glue_tab) + self.options.unit)
top_flap_closure = self.svg.unittouu(str(self.options.close_tab) + self.options.unit)
top_flap = self.svg.unittouu(str(self.options.side_tabs) + self.options.unit)
if self.options.unit=="cm":
eyelash_measure1=0.5
eyelash_measure2=0.1
eyelash_measure3=0.4
eyelash_measure3=0.3
if self.options.unit=='in':
eyelash_measure1=0.196
eyelash_measure2=0.039
eyelash_measure3=0.157
eyelash_measure3=0.118
measure1_side_blind=self.svg.unittouu(str(eyelash_measure1) + self.options.unit)
measure2_side_blind=self.svg.unittouu(str(eyelash_measure2) + self.options.unit)
measure3_side_blind=self.svg.unittouu(str(eyelash_measure3) + self.options.unit)
measure4_side_blind=self.svg.unittouu(str(eyelash_measure4) + self.options.unit)
box_id = self.svg.get_unique_id('automaticbottomcase')
group = self.svg.get_current_layer().add(inkex.Group(id=box_id))
line_style_cuts = {'stroke': '#FF0000', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
cleft_line_style = {'stroke': '#0000FF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
line_style_drills = {'stroke': '#00FF00', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
media_line_style = {'stroke': '#00FFFF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
# line.path --> M = absolute coordinates
# line.path --> l = draws a line from the current point to the specified coordinates
# line.path --> c = draws a beizer curve from the current point to the specified coordinates
# line.path --> q = draws an arc from the current point to the specified coordinates using a point as reference
# line.path --> Z = close path
#Outside profile of the box
line = group.add(inkex.PathElement(id=box_id + '-profile-outside'))
line.path = [
['M', [0, 0]],
['l', [0, 0-box_length]],
['l', [0, 0]],
['q', [0,0-top_flap_closure,top_flap_closure, 0-top_flap_closure]],
['l', [box_width-(top_flap_closure*2), 0]],
['q', [top_flap_closure,0,top_flap_closure,top_flap_closure]],
['l', [0, 0]],
['l', [0, (box_length)]],
['l', [measure4_side_blind, 0-measure4_side_blind]],
['l', [0,0-(top_flap-measure4_side_blind)]],
['l', [(box_length-measure2_side_blind-measure3_side_blind-measure4_side_blind), 0]],
['l', [measure3_side_blind, (top_flap-measure2_side_blind-measure1_side_blind)]],
['l', [measure2_side_blind, measure2_side_blind]],
['l', [0, measure1_side_blind]],
['l', [0,0]],
['l', [box_width, 0]],
['l', [0,0]],
['l', [0, 0]],
['l', [0, 0-measure1_side_blind]],
['l', [measure2_side_blind, 0-measure2_side_blind]],
['l', [measure3_side_blind, 0-(top_flap-measure2_side_blind-measure1_side_blind)]],
['l', [(box_length-measure2_side_blind-measure3_side_blind-measure4_side_blind), 0]],
['l', [0,top_flap-measure4_side_blind]],
['l', [measure4_side_blind, measure4_side_blind]],
['l', [0, box_height]],
['l', [0-((box_length/2)),box_length/2]],
['l', [0-((box_length/2)-(measure2_side_blind)*2),0]],
['l', [0-(measure2_side_blind),0-((box_length/2)-measure2_side_blind)]],
['l', [0-measure2_side_blind,0-measure2_side_blind]],
['l', [0-measure2_side_blind,measure2_side_blind]],
['l', [0,box_length*0.7]],
['l', [0-(((box_length*0.5)-measure2_side_blind)/2),0]],
['l', [0-(((box_length*0.5)-measure2_side_blind)/2),0-((box_length*0.7)-(box_length*0.5))]],
['l', [0-((box_width/2)-((box_length*0.5)-measure2_side_blind)),0]],
['l', [measure3_side_blind,measure3_side_blind]],
['l', [0-((box_length*0.7)-(box_length*0.5))-measure3_side_blind,((box_length*0.7)-(box_length*0.5))-measure3_side_blind]],
['l', [0-(((box_width/2)-((box_length*0.5)))+((box_length*0.7)-(box_length*0.5))),0]],
['l', [0-measure4_side_blind/2,0-((box_length*0.7))-measure2_side_blind]],
['l', [0-(box_length/2),box_length/2]],
['l', [0-((box_length/2)-(measure2_side_blind)*2),0]],
['l', [0-measure2_side_blind,0-((box_length/2)-measure2_side_blind)]],
['l', [0-measure2_side_blind,0-measure2_side_blind]],
['l', [0-measure2_side_blind,measure2_side_blind]],
['l', [0,box_length*0.7]],
['l', [0-(((box_length*0.5)-measure2_side_blind)/2),0]],
['l', [0-(((box_length*0.5)-measure2_side_blind)/2),0-((box_length*0.7)-(box_length*0.5))]],
['l', [0-((box_width/2)-((box_length*0.5)-measure2_side_blind)),0]],
['l', [measure3_side_blind,measure3_side_blind]],
['l', [0-((box_length*0.7)-(box_length*0.5))-measure3_side_blind,((box_length*0.7)-(box_length*0.5))-measure3_side_blind]],
['l', [0-(((box_width/2)-((box_length*0.5)))+((box_length*0.7)-(box_length*0.5))),0]],
['l', [0-measure4_side_blind/2,0-((box_length*0.7))-measure2_side_blind]],
['l', [0, 0-measure2_side_blind]],
['l', [0-glue_width, 0-(glue_width/2)]],
['l', [0, 0-(box_height-glue_width-(measure2_side_blind*2))]],
['l', [glue_width, 0-(glue_width/2)]],
['Z', []]
]
line.style = line_style_cuts
#Hendidos
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-1'))
line.path = [
['M', [0,0]],
['l', [0,box_height]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-2'))
line.path = [
['M', [box_width,0]],
['l', [0,box_height]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-3'))
line.path = [
['M', [box_width+box_length,0]],
['l', [0,box_height]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-4'))
line.path = [
['M', [box_width+box_width+box_length,0]],
['l', [0,box_height]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-5'))
line.path = [
['M', [0,0]],
['l', [box_width,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-6'))
line.path = [
['M', [0,box_height]],
['l', [((box_length+box_width)*2),0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-7'))
line.path = [
['M', [box_width,0]],
['l', [box_length,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-8'))
line.path = [
['M', [box_length+box_width*2,0]],
['l', [box_length,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-splits-9'))
line.path = [
['M', [0,0-(box_length)]],
['l', [box_width,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=box_id + '-profile-drill-1'))
line.path = [
['M', [box_width-measure2_side_blind,box_height+measure2_side_blind]],
['l', [0-((box_length*0.5)),(box_length*0.5)]]
]
line.style = line_style_drills
line = group.add(inkex.PathElement(id=box_id + '-profile-drill-2'))
line.path = [
['M', [((box_width*2)+box_length)-measure2_side_blind,box_height+measure2_side_blind]],
['l', [0-((box_length*0.5)),(box_length*0.5)]]
]
line.style = line_style_drills
if __name__ == '__main__':
AutomaticBottomCase().run()

View File

@ -0,0 +1,236 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="94mm"
height="64mm"
viewBox="0 0 94.000001 64.000001"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="FondoAutomaticoLayout.svg">
<defs
id="defs2">
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889" />
<rect
id="rect889-5"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-2"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-7"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-53"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-3"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-6"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-4"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-2-4" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect979" />
<rect
id="rect889-2-4-1"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect2863"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="135.62322"
inkscape:cy="128.43274"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
height="211mm" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-232.99994)">
<text
xml:space="preserve"
id="text887"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,46.319357,195.18017)"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">A</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,68.201319,194.96547)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-5);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-5"
xml:space="preserve"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">L</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,77.672498,179.97242)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">H</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,112.60673,158.33517)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-53);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-56"
xml:space="preserve"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">T</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-2-3"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2-4);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.28752215,0,0,0.28752215,21.573379,221.63586)"><tspan
x="-68.583793"
y="219.23689"><tspan
style="font-size:11.2889px">P</tspan></tspan></text>
<g
transform="matrix(0.25345327,0,0,0.23462671,5.0055809,251.88848)"
id="estuche-fondoautomatico8066">
<path
id="estuche-fondoautomatico8066-perfil-exterior"
d="m 0,0 v -50.25 h 0.25 q 0,-20 20,-20 h 79.5 q 20,0 20,20 H 120 V -0.5 l 3,-3 v -27 h 41.5 l 4,24 1,1 v 5 0.25 h 120 V 0 h 0.25 v -5 l 1,-1 4,-24 h 41.75 v 27 l 3,3 v 150 l -24.75,25 H 292 l -1,-24 -1,-1 -1,1 v 35 h -12 l -12,-10 h -36 l 4,4 -14,6 h -45 l -4,-35.5 -25,25 h -23 l -1,-24 -1,-1 -1,1 v 35 h -12 l -12,-10 H 59 l 4,4 -14,6 H 4 L 0,151.25 v -1 L -15,142.5 V 10 L 0,2.25 Z"
style="fill:none;stroke:#ff0000;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-1"
d="M 0,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-2"
d="M 120,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-3"
d="M 170,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-4"
d="M 290,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-5"
d="M 0,0 H 120 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-6"
d="M 0,150.25 H 339.5 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-7"
d="m 120.25,0.25 h 49.5 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-8"
d="M 290.5,0.25 H 340 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-hendidos-9"
d="m 0.25,-50.25 h 119.5 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-taladro-1"
d="M 119.25,151.25 94.5,176 Z"
style="fill:none;stroke:#00ff00;stroke-width:0.264583" />
<path
id="estuche-fondoautomatico8066-perfil-taladro-2"
d="M 289.5,151.25 264.75,176 Z"
style="fill:none;stroke:#00ff00;stroke-width:0.264583" />
</g>
<text
transform="matrix(0.28752215,0,0,0.28752215,38.815037,175.78393)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2-4-1);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2-3-2"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">C</tspan></tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Estucheria - 4 Point Base Box</name>
<id>fablabchemnitz.de.box4p</id>
<image>box4p.svg</image>
<param name="unit" gui-text="Unit:" type="optiongroup" appearance="combo">
<option translatable="no" value="mm">mm</option>
</param>
<param name="width" type="float" min="0.1" max="300.0" gui-text="A - width:">25.0</param>
<param name="depth" type="float" min="0.1" max="300.0" gui-text="L - length:">25.0</param>
<param name="height" type="float" min="0.1" max="300.0" gui-text="H - height:">25.0</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Paper/Cardboard Boxes"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">box4p.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,162 @@
#! /usr/bin/env python3
#
# Este script dibuja el perfil exterior de corte la caja en un solo
# path cerrado y añade despues los otros flejes necesarios con colores
# diferentes para identificarlos.
# rojo > para cortes y perfil exterior
# azul > para hendidos
# verde > para taladros
# amarillo > medios cortes
#
# TODO:
# agregar opción de dibujo en cm/in
# mover dibujo al centro del documento
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
__version__ = "0.2"
import inkex
class GenerarEstuche(inkex.EffectExtension):
def add_arguments(self, pars):
pars.add_argument("--width", type=float, default=25.0, help="Ancho de la caja")
pars.add_argument("--height", type=float, default=25.0, help="Alto de la caja")
pars.add_argument("--depth", type=float, default=25.0, help="Largo de la caja")
pars.add_argument("--unit", default="mm", help="Tipo de unidades")
def effect(self):
centro_ancho_documento = self.svg.unittouu(self.document.getroot().get('width'))/2
centro_alto_documento = self.svg.unittouu(self.document.getroot().get('height'))/2
medida_pestana1=2
ancho_caja = self.svg.unittouu(str(self.options.width) + self.options.unit)
alto_caja = self.svg.unittouu(str(self.options.height) + self.options.unit)
largo_caja = self.svg.unittouu(str(self.options.depth) + self.options.unit)
if self.options.unit=="cm":
medida_pestana1=0.2
if self.options.unit=='in':
medida_pestana1=0.0787
medida1_pestanas_laterales=self.svg.unittouu(str(medida_pestana1) + self.options.unit)
id_caja = self.svg.get_unique_id('bandeja-4P')
group = self.svg.get_current_layer().add(inkex.Group(id=id_caja))
estilo_linea_cortes = {'stroke': '#FF0000', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_hendidos = {'stroke': '#0000FF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_taladros = {'stroke': '#00FF00', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_medioscortes = {'stroke': '#00FFFF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
# line.path --> M = coordenadas absolutas
# line.path --> l = dibuja una linea desde el punto actual a las coordenadas especificadas
# line.path --> c = dibuja una curva beizer desde el punto actual a las coordenadas especificadas
# line.path --> q = dibuja un arco desde el punto actual a las coordenadas especificadas usando un punto como referencia
# line.path --> Z = cierra path
#Perfil Exterior de la caja
line = group.add(inkex.PathElement(id=id_caja + '-perfil-exterior'))
line.path = [
['M', [0, 0]],
['l', [alto_caja,0]],
['l', [ancho_caja,0]],
['l', [alto_caja,0]],
['l', [0,alto_caja-medida1_pestanas_laterales]],
['l', [0-(alto_caja-medida1_pestanas_laterales),0]],
['l', [0-medida1_pestanas_laterales,medida1_pestanas_laterales]],
['l', [alto_caja,0]],
['l', [0,largo_caja]],
['l', [0-alto_caja,0]],
['l', [medida1_pestanas_laterales,medida1_pestanas_laterales]],
['l', [alto_caja-medida1_pestanas_laterales,0]],
['l', [0,alto_caja-medida1_pestanas_laterales]],
['l', [0-(alto_caja),0]],
['l', [0-(ancho_caja),0]],
['l', [0-(alto_caja),0]],
['l', [0,0-(alto_caja-medida1_pestanas_laterales)]],
['l', [alto_caja-medida1_pestanas_laterales,0]],
['l', [medida1_pestanas_laterales,0-medida1_pestanas_laterales]],
['l', [0-(alto_caja),0]],
['l', [0,0-largo_caja]],
['l', [alto_caja,0]],
['l', [0-medida1_pestanas_laterales,0-medida1_pestanas_laterales]],
['l', [0-(alto_caja-medida1_pestanas_laterales),0]],
['Z', []]
]
line.style = estilo_linea_cortes
#Hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-1'))
line.path = [
['M', [alto_caja,0]],
['l', [0,largo_caja+(alto_caja*2)]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-2'))
line.path = [
['M', [ancho_caja+alto_caja,0]],
['l', [0,largo_caja+(alto_caja*2)]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-3'))
line.path = [
['M', [alto_caja,alto_caja]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-4'))
line.path = [
['M', [alto_caja,alto_caja+largo_caja]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-5'))
line.path = [
['M', [alto_caja,alto_caja]],
['l', [0-alto_caja,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-6'))
line.path = [
['M', [alto_caja+ancho_caja,alto_caja]],
['l', [alto_caja,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-7'))
line.path = [
['M', [alto_caja+ancho_caja,alto_caja+largo_caja]],
['l', [alto_caja,0-alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-8'))
line.path = [
['M', [alto_caja,alto_caja+largo_caja]],
['l', [0-alto_caja,0-alto_caja]]
]
line.style = estilo_linea_hendidos
if __name__ == '__main__':
GenerarEstuche().run()

View File

@ -0,0 +1,212 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="94mm"
height="64mm"
viewBox="0 0 94.000001 64.000001"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="Fondo4PLayout.svg">
<defs
id="defs2">
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889" />
<rect
id="rect889-5"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-2"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-7"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-53"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-3"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-6"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-4"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-2-4" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect979" />
<rect
id="rect889-53-2"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect2158"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-6-3"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect2161"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="30.346562"
inkscape:cy="510.32236"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
height="211mm" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-232.99994)">
<text
xml:space="preserve"
id="text887"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,37.180884,174.77023)"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">A</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,73.057456,197.94617)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-5);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-5"
xml:space="preserve"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">L</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,116.8177,198.07432)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">H</tspan></tspan></text>
<g
transform="matrix(0,0.16755463,-0.19590377,0,92.695792,234.23686)"
id="bandeja-4P4625">
<path
id="bandeja-4P4625-perfil-exterior"
d="m 0,0 h 30 305 30 v 28 h -28 l -2,2 h 30 v 404 h -30 l 2,2 h 28 v 28 H 335 30 0 v -28 h 28 l 2,-2 H 0 V 30 H 30 L 28,28 H 0 Z"
style="fill:none;stroke:#ff0000;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-1"
d="M 30,0 V 464 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-2"
d="M 335,0 V 464 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-3"
d="M 30,30 H 335 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-4"
d="M 30,434 H 335 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-5"
d="M 30,30 0,60 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-6"
d="m 335,30 30,30 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-7"
d="m 335,434 30,-30 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="bandeja-4P4625-perfil-hendidos-8"
d="M 30,434 0,404 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Estucheria - Double Railing Case</name>
<id>fablabchemnitz.de.doublerailingcase</id>
<image>doublerailingcase.svg</image>
<param name="unit" gui-text="Unit:" type="optiongroup" appearance="combo">
<option translatable="no" value="mm">mm</option>
</param>
<param name="width" type="float" min="0.1" max="300.0" gui-text="A - width:">25.0</param>
<param name="depth" type="float" min="0.1" max="300.0" gui-text="L - length:">25.0</param>
<param name="height" type="float" min="0.1" max="300.0" gui-text="H - height:">25.0</param>
<param name="glue_tab" type="float" min="0.1" max="300.0" gui-text="P - Width glue tab">5.0</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Paper/Cardboard Boxes"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">doublerailingcase.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,225 @@
#! /usr/bin/env python3
#
#
# This script draws the outer profile of the box cut in a single
# closed path and then add the other necessary strips with colours
# different to identify them.
# red > for cuts and outer profile
# blue > for crevices
# green > for drills
# yellow > half-cut
#
# TODO:
# add cm/in drawing option
# move drawing to the center of the document
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
__version__ = "0.2"
import inkex
class GenerateBox(inkex.EffectExtension):
def add_arguments(self, pars):
pars.add_argument("--width", type=float, default=25.0, help="Width of the box")
pars.add_argument("--height", type=float, default=25.0, help="Height of the box")
pars.add_argument("--depth", type=float, default=25.0, help="Length of the box")
pars.add_argument("--glue_tab", type=float, default=5.0, help="Tab width")
pars.add_argument("--unit", default="mm", help="Type of units")
def effect(self):
center_width_document = self.svg.unittouu(self.document.getroot().get('width'))/2
center_height_document = self.svg.unittouu(self.document.getroot().get('height'))/2
box_width = self.svg.unittouu(str(self.options.width) + self.options.unit)
box_height = self.svg.unittouu(str(self.options.height) + self.options.unit)
box_length = self.svg.unittouu(str(self.options.depth) + self.options.unit)
eyelash_width = self.svg.unittouu(str(self.options.glue_tab) + self.options.unit)
eyelash_measure1=2
eyelash_measure2=1
eyelash_measure3=5
eyelash_measure4=3
id_box = self.svg.get_unique_id('double-railing-case')
group = self.svg.get_current_layer().add(inkex.Group(id=id_box))
line_style_cuts = {'stroke': '#FF0000', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
cleft_line_style = {'stroke': '#0000FF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
line_style_drills = {'stroke': '#00FF00', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
media_line_style = {'stroke': '#00FFFF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
# line.path --> M = absolute coordinates
# line.path --> l = draws a line from the current point to the specified coordinates
# line.path --> c = draws a beizer curve from the current point to the specified coordinates
# line.path --> q = draws an arc from the current point to the specified coordinates using a point as reference
# line.path --> Z = close path
#Outside profile of the box
line = group.add(inkex.PathElement(id=id_box + '-profile-outside'))
line.path = [
['M', [0, 0]],
['l', [box_width,0]],
['l', [0,0]],
['l', [0,eyelash_width]],
['l', [eyelash_width,0]],
['l', [0-(eyelash_width-eyelash_measure1),box_height-eyelash_measure4]],
['l', [0-eyelash_measure1,eyelash_measure2]],
['l', [0,eyelash_measure1]],
['l', [box_height-eyelash_measure3,eyelash_measure3]],
['l', [eyelash_measure3,box_height-eyelash_measure3]],
['l', [eyelash_measure1,0]],
['l', [eyelash_measure2,eyelash_measure1]],
['l', [box_height-eyelash_measure4,eyelash_width-eyelash_measure1]],
['l', [0,box_length-(eyelash_width*2)]],
['l', [0-(box_height-eyelash_measure4),eyelash_width-eyelash_measure1]],
['l', [0-eyelash_measure2,eyelash_measure1]],
['l', [0-eyelash_measure1,0]],
['l', [0-eyelash_measure3,box_height-eyelash_measure3]],
['l', [0-(box_height-eyelash_measure3),eyelash_measure3]],
['l', [0,eyelash_measure1]],
['l', [eyelash_measure1,eyelash_measure2]],
['l', [eyelash_width-eyelash_measure1,box_height-eyelash_measure4]],
['l', [0-eyelash_width,0]],
['l', [0,0]],
['l', [0,eyelash_width]],
['l', [0-box_width,0]],
['l', [0,0-eyelash_width]],
['l', [0,0]],
['l', [0-eyelash_width,0]],
['l', [eyelash_width-eyelash_measure1,0-(box_height-eyelash_measure4)]],
['l', [eyelash_measure1,0-eyelash_measure2]],
['l', [0,0-eyelash_measure1]],
['l', [0-(box_height-eyelash_measure3),0-eyelash_measure3]],
['l', [0-eyelash_measure3,0-(box_height-eyelash_measure3)]],
['l', [0-eyelash_measure1,0]],
['l', [0-eyelash_measure2,0-eyelash_measure1]],
['l', [0-(box_height-eyelash_measure4),0-(eyelash_width-eyelash_measure1)]],
['l', [0,0-(box_length-(eyelash_width*2))]],
['l', [box_height-eyelash_measure4,0-(eyelash_width-eyelash_measure1),]],
['l', [eyelash_measure2,0-eyelash_measure1]],
['l', [eyelash_measure1,0]],
['l', [eyelash_measure3,0-(box_height-eyelash_measure3)]],
['l', [(box_height-eyelash_measure3),0-eyelash_measure3]],
['l', [0,0-eyelash_measure1]],
['l', [0-eyelash_measure1,0-eyelash_measure2]],
['l', [0-(eyelash_width-eyelash_measure1),0-(box_height-eyelash_measure4)]],
['l', [eyelash_width,0]],
['Z', []]
]
line.style = line_style_cuts
#profile splits
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-1'))
line.path = [
['M', [0,eyelash_width]],
['l', [box_width,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-2'))
line.path = [
['M', [0,(box_height+eyelash_width)]],
['l', [box_width,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-3'))
line.path = [
['M', [0-box_height,((box_height*2)+eyelash_width)]],
['l', [box_width+(box_height*2),0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-4'))
line.path = [
['M', [0-box_height,(((box_height*2)+eyelash_width)+box_length)]],
['l', [box_width+(box_height*2),0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-5'))
line.path = [
['M', [0,(box_height*3)+box_length+eyelash_width]],
['l', [box_width,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-6'))
line.path = [
['M', [0,(box_height*4)+box_length+eyelash_width]],
['l', [box_width,0]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-7'))
line.path = [
['M', [0,eyelash_width]],
['l', [0,box_length+(box_height*4)]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-8'))
line.path = [
['M', [box_width,eyelash_width]],
['l', [0,box_length+(box_height*4)]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-9'))
line.path = [
['M', [0-box_height,eyelash_width+(box_height*2)]],
['l', [0,box_length]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-10'))
line.path = [
['M', [box_width+box_height,eyelash_width+(box_height*2)]],
['l', [0,box_length]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-11'))
line.path = [
['M', [0,eyelash_width+(box_height*2)]],
['l', [0-(box_height-eyelash_measure3),0-(box_height-eyelash_measure3)]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-12'))
line.path = [
['M', [box_width,eyelash_width+(box_height*2)]],
['l', [box_height-eyelash_measure3,0-(box_height-eyelash_measure3)]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-13'))
line.path = [
['M', [box_width,eyelash_width+(box_height*2)+box_length]],
['l', [box_height-eyelash_measure3,box_height-eyelash_measure3]]
]
line.style = cleft_line_style
line = group.add(inkex.PathElement(id=id_box + '-profile-splits-14'))
line.path = [
['M', [0,eyelash_width+(box_height*2)+box_length]],
['l', [0-(box_height-eyelash_measure3),box_height-eyelash_measure3]]
]
line.style = cleft_line_style
if __name__ == '__main__':
GenerateBox().run()

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="94mm"
height="64mm"
viewBox="0 0 94.000001 64.000001"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="DobleBarandaLayout.svg">
<defs
id="defs2">
<rect
id="rect889"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-5" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-2" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-7" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-53" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-3" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-6" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-4" />
<rect
id="rect889-2-4"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect979"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
</defs>
<sodipodi:namedview
height="211mm"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1018"
inkscape:window-width="1920"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="108.71689"
inkscape:cx="162.05938"
inkscape:zoom="1.4"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-232.99994)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Capa 1">
<text
transform="matrix(0.41705182,0,0,0.41705182,47.465771,176.04713)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889);fill:#000000;fill-opacity:1;stroke:none;"
id="text887"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">A</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-5"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-5);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,74.101888,192.29305)"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">L</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-2"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,101.82825,197.6344)"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">H</tspan></tspan></text>
<text
transform="matrix(0.27672844,0,0,0.27672844,108.8139,222.99361)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2-4);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2-3"
xml:space="preserve"><tspan
x="-68.583793"
y="219.23689"><tspan
style="font-size:11.2889px">P</tspan></tspan></text>
<g
transform="matrix(0,-0.18377696,0.20645318,0,1.7584784,284.73758)"
id="estuche-doble-baranda9828">
<path
id="estuche-doble-baranda9828-perfil-exterior"
d="m 0,0 h 210 v 15 h 15 l -13,27 -2,1 v 2 l 25,5 5,25 h 2 l 1,2 27,13 v 260 l -27,13 -1,2 h -2 l -5,25 -25,5 v 2 l 2,1 13,27 h -15 v 15 H 0 v -15 h -15 l 13,-27 2,-1 v -2 l -25,-5 -5,-25 h -2 l -1,-2 -27,-13 V 90 l 27,-13 1,-2 h 2 L -25,50 0,45 V 43 L -2,42 -15,15 H 0 Z"
style="fill:none;stroke:#ff0000;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-1"
d="M 0,15 H 210 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-2"
d="M 0,45 H 210 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-3"
d="M -30,75 H 240 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-4"
d="M -30,365 H 240 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-5"
d="M 0,395 H 210 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-6"
d="M 0,425 H 210 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-7"
d="M 0,15 V 425 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-8"
d="M 210,15 V 425 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-9"
d="M -30,75 V 365 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-10"
d="M 240,75 V 365 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-11"
d="M 0,75 -25,50 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-12"
d="M 210,75 235,50 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-13"
d="m 210,365 25,25 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-doble-baranda9828-perfil-hendidos-14"
d="m 0,365 -25,25 z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Estucheria - Girdle</name>
<id>fablabchemnitz.de.girdle</id>
<image>girdle.svg</image>
<param name="unit" gui-text="Unit:" type="optiongroup" appearance="combo">
<option translatable="no" value="mm">mm</option>
</param>
<param name="width" type="float" min="0.1" max="300.0" gui-text="A - width:">25.0</param>
<param name="depth" type="float" min="0.1" max="300.0" gui-text="L - length:">25.0</param>
<param name="height" type="float" min="0.1" max="300.0" gui-text="H - height:">25.0</param>
<param name="glue_tab" type="float" min="0.1" max="300.0" gui-text="P - Width glue tab">5.0</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Paper/Cardboard Boxes"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">girdle.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,137 @@
#! /usr/bin/env python3
#
# Este script dibuja el perfil exterior de corte la caja en un solo
# path cerrado y añade despues los otros flejes necesarios con colores
# diferentes para identificarlos.
# rojo > para cortes y perfil exterior
# azul > para hendidos
# verde > para taladros
# amarillo > medios cortes
#
# TODO:
# agregar opción de dibujo en cm/in
# mover dibujo al centro del documento
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
__version__ = "0.2"
import inkex
class GenerarEstuche(inkex.EffectExtension):
def add_arguments(self, pars):
pars.add_argument("--width", type=float, default=25.0, help="Ancho de la caja")
pars.add_argument("--height", type=float, default=25.0, help="Alto de la caja")
pars.add_argument("--depth", type=float, default=25.0, help="Largo de la caja")
pars.add_argument("--glue_tab", type=float, default=5.0, help="Ancho pestaña de engomado")
pars.add_argument("--unit", default="mm", help="Tipo de unidades")
def effect(self):
centro_ancho_documento = self.svg.unittouu(self.document.getroot().get('width'))/2
centro_alto_documento = self.svg.unittouu(self.document.getroot().get('height'))/2
medida_pestana1=5
medida_pestana2=1
medida_pestana3=4
medida_pestana4=3
ancho_caja = self.svg.unittouu(str(self.options.width) + self.options.unit)
alto_caja = self.svg.unittouu(str(self.options.height) + self.options.unit)
largo_caja = self.svg.unittouu(str(self.options.depth) + self.options.unit)
ancho_pestana_cola = self.svg.unittouu(str(self.options.glue_tab) + self.options.unit)
if self.options.unit=="cm":
medida_pestana1=0.5
medida_pestana2=0.1
medida_pestana3=0.4
medida_pestana3=0.3
if self.options.unit=='in':
medida_pestana1=0.196
medida_pestana2=0.039
medida_pestana3=0.157
medida_pestana3=0.118
medida1_pestanas_laterales=self.svg.unittouu(str(medida_pestana1) + self.options.unit)
medida2_pestanas_laterales=self.svg.unittouu(str(medida_pestana2) + self.options.unit)
medida3_pestanas_laterales=self.svg.unittouu(str(medida_pestana3) + self.options.unit)
medida4_pestanas_laterales=self.svg.unittouu(str(medida_pestana4) + self.options.unit)
id_caja = self.svg.get_unique_id('estuche-faja')
group = self.svg.get_current_layer().add(inkex.Group(id=id_caja))
estilo_linea_cortes = {'stroke': '#FF0000', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_hendidos = {'stroke': '#0000FF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_taladros = {'stroke': '#00FF00', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_medioscortes = {'stroke': '#00FFFF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
# line.path --> M = coordenadas absolutas
# line.path --> l = dibuja una linea desde el punto actual a las coordenadas especificadas
# line.path --> c = dibuja una curva beizer desde el punto actual a las coordenadas especificadas
# line.path --> q = dibuja un arco desde el punto actual a las coordenadas especificadas usando un punto como referencia
# line.path --> Z = cierra path
#Perfil Exterior de la caja
line = group.add(inkex.PathElement(id=id_caja + '-perfil-exterior'))
line.path = [
['M', [0, 0]],
['l', [ancho_caja,0]],
['l', [largo_caja,0]],
['l', [ancho_caja,0]],
['l', [largo_caja,0]],
['l', [0,alto_caja]],
['l', [0-(largo_caja),0]],
['l', [0-(ancho_caja),0]],
['l', [0-largo_caja,0]],
['l', [0-ancho_caja,0]],
['l', [0-ancho_pestana_cola,0-ancho_pestana_cola]],
['l', [0,0-(alto_caja-(ancho_pestana_cola*2))]],
['Z', []]
]
line.style = estilo_linea_cortes
#Hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-1'))
line.path = [
['M', [0,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-2'))
line.path = [
['M', [ancho_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-3'))
line.path = [
['M', [ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-4'))
line.path = [
['M', [ancho_caja+ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
if __name__ == '__main__':
GenerarEstuche().run()

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="94mm"
height="64mm"
viewBox="0 0 94.000001 64.000001"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="FajaLayout.svg">
<defs
id="defs2">
<rect
id="rect889"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-5" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-2" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-7" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-53" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-3" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-6" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect902-4" />
<rect
id="rect889-2-4"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect979"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
</defs>
<sodipodi:namedview
height="211mm"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1018"
inkscape:window-width="1920"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="59.842544"
inkscape:cx="-219.62908"
inkscape:zoom="0.98994949"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-232.99994)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Capa 1">
<text
transform="matrix(0.41705182,0,0,0.41705182,50.709976,203.54903)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889);fill:#000000;fill-opacity:1;stroke:none;"
id="text887"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">A</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-5"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-5);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,70.900538,203.47943)"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">L</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-2"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,78.753039,174.35222)"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">H</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,31.50749,197.62541)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2-4);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2-3"
xml:space="preserve"><tspan
x="-68.583793"
y="219.23689"><tspan
style="font-size:11.2889px">P</tspan></tspan></text>
<g
transform="matrix(0.32727879,0,0,0.40392018,6.8339186,235.01699)"
id="estuche-faja5487">
<path
id="estuche-faja5487-perfil-exterior"
d="m 0,0 h 100 30 99.75 29.75 V 150 H 229.75 130 100 0 L -15,135 V 15 Z"
style="fill:none;stroke:#ff0000;stroke-width:0.264583" />
<path
id="estuche-faja5487-perfil-hendidos-1"
d="M 0,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-faja5487-perfil-hendidos-2"
d="M 100,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-faja5487-perfil-hendidos-3"
d="M 129.75,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
<path
id="estuche-faja5487-perfil-hendidos-4"
d="M 229.5,0 V 150 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.264583" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Estucheria - Linear Case</name>
<id>fablabchemnitz.de.linearcase</id>
<image>linearcase.svg</image>
<param name="unit" gui-text="Unit:" type="optiongroup" appearance="combo">
<option translatable="no" value="mm">mm</option>
</param>
<param name="width" type="float" min="0.1" max="300.0" gui-text="A - width:">25.0</param>
<param name="depth" type="float" min="0.1" max="300.0" gui-text="L - length:">25.0</param>
<param name="height" type="float" min="0.1" max="300.0" gui-text="H - height:">25.0</param>
<param name="glue_tab" type="float" min="0.1" max="300.0" gui-text="P - Width glue tab">5.0</param>
<param name="close_tab" type="float" min="0.1" max="300.0" gui-text="C - Top side sealing flange:">5.0</param>
<param name="side_tabs" type="float" min="0.1" max="300.0" gui-text="T - Top side closure tabs:">5.0</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Paper/Cardboard Boxes"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">linearcase.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,239 @@
#! /usr/bin/env python3
#
#
# Este script dibuja el perfil exterior de corte la caja en un solo
# path cerrado y añade despues los otros flejes necesarios con colores
# diferentes para identificarlos.
# rojo > para cortes y perfil exterior
# azul > para hendidos
# verde > para taladros
# amarillo > medios cortes
#
# TODO:
# agregar opción de dibujo en cm/in
# mover dibujo al centro del documento
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
__version__ = "0.2"
import inkex
class GenerarEstuche(inkex.EffectExtension):
def add_arguments(self, pars):
pars.add_argument("--width", type=float, default=25.0, help="Ancho de la caja")
pars.add_argument("--height", type=float, default=25.0, help="Alto de la caja")
pars.add_argument("--depth", type=float, default=25.0, help="Largo de la caja")
pars.add_argument("--glue_tab", type=float, default=5.0, help="Ancho pestaña de engomado")
pars.add_argument("--close_tab", type=float, default=5.0, help="Alto pestaña de cierre")
pars.add_argument("--side_tabs", type=float, default=5.0, help="Alto pestañas laterales de cierre")
pars.add_argument("--unit", default="mm", help="Tipo de unidades")
def effect(self):
centro_ancho_documento = self.svg.unittouu(self.document.getroot().get('width'))/2
centro_alto_documento = self.svg.unittouu(self.document.getroot().get('height'))/2
ancho_caja = self.svg.unittouu(str(self.options.width) + self.options.unit)
alto_caja = self.svg.unittouu(str(self.options.height) + self.options.unit)
largo_caja = self.svg.unittouu(str(self.options.depth) + self.options.unit)
ancho_pestana_cola = self.svg.unittouu(str(self.options.glue_tab) + self.options.unit)
alto_pestana_cierre = self.svg.unittouu(str(self.options.close_tab) + self.options.unit)
alto_pestana = self.svg.unittouu(str(self.options.side_tabs) + self.options.unit)
if self.options.unit=="mm":
medida_pestana1=5
medida_pestana2=1
medida_pestana3=4
medida_pestana4=3
if self.options.unit=="cm":
medida_pestana1=0.5
medida_pestana2=0.1
medida_pestana3=0.4
medida_pestana4=0.3
if self.options.unit=='in':
medida_pestana1=0.196
medida_pestana2=0.039
medida_pestana3=0.157
medida_pestana4=0.118
medida1_pestanas_laterales=self.svg.unittouu(str(medida_pestana1) + self.options.unit)
medida2_pestanas_laterales=self.svg.unittouu(str(medida_pestana2) + self.options.unit)
medida3_pestanas_laterales=self.svg.unittouu(str(medida_pestana3) + self.options.unit)
medida4_pestanas_laterales=self.svg.unittouu(str(medida_pestana4) + self.options.unit)
id_caja = self.svg.get_unique_id('estuche-lineal')
group = self.svg.get_current_layer().add(inkex.Group(id=id_caja))
estilo_linea_cortes = {'stroke': '#FF0000', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_hendidos = {'stroke': '#0000FF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_medioscortes = {'stroke': '#00FFFF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
# line.path --> M = coordenadas absolutas
# line.path --> l = dibuja una linea desde el punto actual a las coordenadas especificadas
# line.path --> c = dibuja una curva beizer desde el punto actual a las coordenadas especificadas
# line.path --> q = dibuja un arco desde el punto actual a las coordenadas especificadas usando un punto como referencia
# line.path --> Z = cierra path
#Perfil Exterior de la caja
line = group.add(inkex.PathElement(id=id_caja + '-perfil-exterior'))
line.path = [
['M', [0, 0]],
['l', [ancho_caja, 0]],
['l', [0,0]],
['l', [0, 0]],
['l', [0, 0-medida1_pestanas_laterales]],
['l', [medida2_pestanas_laterales, 0-medida2_pestanas_laterales]],
['l', [medida3_pestanas_laterales, 0-(alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [0,alto_pestana-medida4_pestanas_laterales]],
['l', [medida4_pestanas_laterales, medida4_pestanas_laterales]],
['l', [0, 0-largo_caja]],
['l', [0, 0]],
['q', [0,0-alto_pestana_cierre,alto_pestana_cierre, 0-alto_pestana_cierre]],
['l', [ancho_caja-(alto_pestana_cierre*2), 0]],
['q', [alto_pestana_cierre,0,alto_pestana_cierre,alto_pestana_cierre]],
['l', [0, 0]],
['l', [0, (largo_caja)]],
['l', [medida4_pestanas_laterales, 0-medida4_pestanas_laterales]],
['l', [0,0-(alto_pestana-medida4_pestanas_laterales)]],
['l', [(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [medida3_pestanas_laterales, (alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [medida2_pestanas_laterales, medida2_pestanas_laterales]],
['l', [0, medida1_pestanas_laterales]],
['l', [0,0]],
['l', [0, alto_caja]],
['l', [0-medida4_pestanas_laterales, medida4_pestanas_laterales]],
['l', [0,(alto_pestana-medida4_pestanas_laterales)]],
['l', [0-(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [0-(medida3_pestanas_laterales), 0-(alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [0-(medida2_pestanas_laterales), 0-(medida2_pestanas_laterales)]],
['l', [0, 0-medida1_pestanas_laterales]],
['l', [0, 0]],
['l', [0,0]],
['l', [0-ancho_caja, 0]],
['l', [0,0]],
['l', [0, 0]],
['l', [0, medida1_pestanas_laterales]],
['l', [0-medida2_pestanas_laterales, medida2_pestanas_laterales]],
['l', [0-medida3_pestanas_laterales, (alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [0-(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [0,0-(alto_pestana-medida4_pestanas_laterales)]],
['l', [0-medida4_pestanas_laterales, 0-medida4_pestanas_laterales]],
['l', [0,0]],
['l', [0, largo_caja]],
['l', [0, 0]],
['q', [0,alto_pestana_cierre,0-alto_pestana_cierre, alto_pestana_cierre]],#
['l', [0-(ancho_caja-(alto_pestana_cierre*2)), 0]],
['q', [0-alto_pestana_cierre,0,0-alto_pestana_cierre,0-alto_pestana_cierre]],
['l', [0, 0]],
['l', [0, 0-largo_caja]],
['l', [0, 0-medida2_pestanas_laterales]],
['l', [0-ancho_pestana_cola, 0-(ancho_pestana_cola/2)]],
['l', [0, 0-(alto_caja-ancho_pestana_cola-(medida2_pestanas_laterales*2))]],
['l', [ancho_pestana_cola, 0-(ancho_pestana_cola/2)]],
['Z', []]
]
line.style = estilo_linea_cortes
#Hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-1'))
line.path = [
['M', [0,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-2'))
line.path = [
['M', [ancho_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-3'))
line.path = [
['M', [ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-4'))
line.path = [
['M', [ancho_caja+ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-5'))
line.path = [
['M', [ancho_caja,0]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-6'))
line.path = [
['M', [ancho_caja+largo_caja,0]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-7'))
line.path = [
['M', [(ancho_caja*2)+largo_caja,0]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-8'))
line.path = [
['M', [0,alto_caja]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-9'))
line.path = [
['M', [ancho_caja,alto_caja]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-10'))
line.path = [
['M', [(ancho_caja*2)+largo_caja,alto_caja]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-11'))
line.path = [
['M', [ancho_caja+largo_caja,0-(largo_caja)]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-12'))
line.path = [
['M', [0,alto_caja+largo_caja]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
if __name__ == '__main__':
GenerarEstuche().run()

View File

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="94mm"
height="64mm"
viewBox="0 0 94.000001 64.000001"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="LinealLayout.svg">
<defs
id="defs2">
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889" />
<rect
id="rect889-5"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-2"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-7"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-53"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-3"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-6"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-4"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-2-4" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect979" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="242.19298"
inkscape:cy="182.95136"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
height="211mm" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-232.99994)">
<g
transform="translate(0.11175705,0.20100678)"
id="g2216">
<path
style="fill:none;stroke:#ff0000;stroke-width:0.110345"
d="M 8.3109493,250.29248 H 37.504577 v -2.08526 l 0.417052,-0.41705 1.251155,-6.25578 h 9.592192 v 7.50693 l 1.251155,1.25116 v -12.51156 c 0,-2.08525 1.04263,-3.12788 3.127889,-3.12788 h 22.93785 c 2.08526,0 3.127889,1.04263 3.127889,3.12788 v 12.51156 l 1.251156,-1.25116 v -7.50693 h 9.592192 l 1.251155,6.25578 0.417052,0.41705 v 2.08526 29.01291 l -1.251156,1.25115 v 7.50693 h -9.592192 l -1.251155,-6.25577 -0.417052,-0.41706 v -2.08525 H 50.016131 v 2.08525 l -0.417051,0.41706 -1.251156,6.25577 h -9.592191 v -7.50693 l -1.251156,-1.25115 v 12.51155 c 0,2.08526 -1.04263,3.12789 -3.127889,3.12789 h -22.93785 c -2.0852592,0 -3.1278887,-1.04263 -3.1278887,-3.12789 v -12.51155 l -6.2557774,-2.91937 v -23.17418 z"
id="estuche-lineal2174-perfil-exterior"
sodipodi:nodetypes="ccccccccsssscccccccccccccccccccccsssscccc" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.075174"
d="m 8.3109493,250.27078 v 29.03461 z"
id="estuche-lineal2174-perfil-hendidos-1" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.075174"
d="m 37.504577,250.27078 v 29.03461 z"
id="estuche-lineal2174-perfil-hendidos-2" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.075174"
d="m 50.016131,250.27078 v 29.03461 z"
id="estuche-lineal2174-perfil-hendidos-3" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.075174"
d="m 79.209759,250.27078 v 29.03461 z"
id="estuche-lineal2174-perfil-hendidos-4" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.110345"
d="M 37.504577,250.29269 H 91.721314 Z"
id="estuche-lineal2174-perfil-hendidos-5" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.110345"
d="M 8.3109493,279.30539 H 50.016131 Z"
id="estuche-lineal2174-perfil-hendidos-6" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.110345"
d="M 79.209759,279.30539 H 91.721314 Z"
id="estuche-lineal2174-perfil-hendidos-7" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.110345"
d="M 8.3109493,291.81694 H 37.504577 Z"
id="estuche-lineal2174-perfil-hendidos-8" />
<path
style="fill:none;stroke:#0000ff;stroke-width:0.110345"
d="M 50.016131,237.56039 H 79.209759 Z"
id="estuche-lineal2174-perfil-hendidos-9" />
<text
transform="matrix(0.41705182,0,0,0.41705182,49.653275,186.90606)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889);fill:#000000;fill-opacity:1;stroke:none;"
id="text887"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">A</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-5"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-5);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,70.788782,187.02545)"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">L</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-2"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,79.397236,174.15122)"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">H</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-56"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-53);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,112.58601,193.71337)"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">T</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-9"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-6);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,49.940303,204.74843)"><tspan
x="-67.10791"
y="214.78815"><tspan
style="font-size:6.35px">C</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,31.773707,184.57322)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2-4);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2-3"
xml:space="preserve"><tspan
x="-68.583793"
y="219.23689"><tspan
style="font-size:11.2889px">P</tspan></tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Estucheria - Swiss Bottom Case</name>
<id>fablabchemnitz.de.swissbottomcase</id>
<image>swissbottomcase.svg</image>
<param name="unit" gui-text="Unit:" type="optiongroup" appearance="combo">
<option translatable="no" value="mm">mm</option>
</param>
<param name="width" type="float" min="0.1" max="300.0" gui-text="A - width:">25.0</param>
<param name="depth" type="float" min="0.1" max="300.0" gui-text="L - length:">25.0</param>
<param name="height" type="float" min="0.1" max="300.0" gui-text="H - height:">25.0</param>
<param name="glue_tab" type="float" min="0.1" max="300.0" gui-text="P - Width glue tab">5.0</param>
<param name="close_tab" type="float" min="0.1" max="300.0" gui-text="C - Top side sealing flange:">5.0</param>
<param name="side_tabs" type="float" min="0.1" max="300.0" gui-text="T - Top side closure tabs:">5.0</param>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="FabLab Chemnitz">
<submenu name="Paper/Cardboard Boxes"/>
</submenu>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">swissbottomcase.py</command>
</script>
</inkscape-extension>

View File

@ -0,0 +1,218 @@
#! /usr/bin/env python3
#
# Este script dibuja el perfil exterior de corte la caja en un solo
# path cerrado y añade despues los otros flejes necesarios con colores
# diferentes para identificarlos.
# rojo > para cortes y perfil exterior
# azul > para hendidos
# verde > para taladros
# amarillo > medios cortes
#
# TODO:
# agregar opción de dibujo en cm/in
# mover dibujo al centro del documento.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
__version__ = "0.2"
import inkex
class GenerarEstuche(inkex.EffectExtension):
def add_arguments(self, pars):
pars.add_argument("--width", type=float, default=25.0, help="Ancho de la caja")
pars.add_argument("--height", type=float, default=25.0, help="Alto de la caja")
pars.add_argument("--depth", type=float, default=25.0, help="Largo de la caja")
pars.add_argument("--glue_tab", type=float, default=5.0, help="Ancho pestaña de engomado")
pars.add_argument("--close_tab", type=float, default=5.0, help="Alto pestaña de cierre")
pars.add_argument("--side_tabs", type=float, default=5.0, help="Alto pestañas laterales de cierre")
pars.add_argument("--unit", default="mm", help="Tipo de unidades")
def effect(self):
centro_ancho_documento = self.svg.unittouu(self.document.getroot().get('width'))/2
centro_alto_documento = self.svg.unittouu(self.document.getroot().get('height'))/2
medida_pestana1=5
medida_pestana2=1
medida_pestana3=4
medida_pestana4=3
medida_pestana5=10
ancho_caja = self.svg.unittouu(str(self.options.width) + self.options.unit)
alto_caja = self.svg.unittouu(str(self.options.height) + self.options.unit)
largo_caja = self.svg.unittouu(str(self.options.depth) + self.options.unit)
ancho_pestana_cola = self.svg.unittouu(str(self.options.glue_tab) + self.options.unit)
alto_pestana_cierre = self.svg.unittouu(str(self.options.close_tab) + self.options.unit)
alto_pestana = self.svg.unittouu(str(self.options.side_tabs) + self.options.unit)
if self.options.unit=="cm":
medida_pestana1=0.5
medida_pestana2=0.1
medida_pestana3=0.4
medida_pestana3=0.3
medida_pestana5=1.0
if self.options.unit=="in":
medida_pestana1=0.196
medida_pestana2=0.039
medida_pestana3=0.157
medida_pestana3=0.118
medida_pestana5=0.393
medida1_pestanas_laterales=self.svg.unittouu(str(medida_pestana1) + self.options.unit)
medida2_pestanas_laterales=self.svg.unittouu(str(medida_pestana2) + self.options.unit)
medida3_pestanas_laterales=self.svg.unittouu(str(medida_pestana3) + self.options.unit)
medida4_pestanas_laterales=self.svg.unittouu(str(medida_pestana4) + self.options.unit)
medida1_pestanas_cierre=self.svg.unittouu(str(medida_pestana5) + self.options.unit)
id_caja = self.svg.get_unique_id('estuche-fondosuizo')
group = self.svg.get_current_layer().add(inkex.Group(id=id_caja))
estilo_linea_cortes = {'stroke': '#FF0000', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_hendidos = {'stroke': '#0000FF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_taladros = {'stroke': '#00FF00', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
estilo_linea_medioscortes = {'stroke': '#00FFFF', 'fill': 'none', 'stroke-width': str(self.svg.unittouu('1px'))}
# line.path --> M = coordenadas absolutas
# line.path --> l = dibuja una linea desde el punto actual a las coordenadas especificadas
# line.path --> c = dibuja una curva beizer desde el punto actual a las coordenadas especificadas
# line.path --> q = dibuja un arco desde el punto actual a las coordenadas especificadas usando un punto como referencia
# line.path --> Z = cierra path
#Perfil Exterior de la caja
line = group.add(inkex.PathElement(id=id_caja + '-perfil-exterior'))
line.path = [
['M', [0, 0]],
['l', [ancho_caja, 0]],
['l', [0,0]],
['l', [0, 0]],
['l', [0, 0-medida1_pestanas_laterales]],
['l', [medida2_pestanas_laterales, 0-medida2_pestanas_laterales]],
['l', [medida3_pestanas_laterales, 0-(alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [0,alto_pestana-medida4_pestanas_laterales]],
['l', [medida4_pestanas_laterales, medida4_pestanas_laterales]],
['l', [0, 0-largo_caja]],
['l', [0, 0]],
['q', [0,0-alto_pestana_cierre,alto_pestana_cierre, 0-alto_pestana_cierre]],
['l', [ancho_caja-(alto_pestana_cierre*2), 0]],
['q', [alto_pestana_cierre,0,alto_pestana_cierre,alto_pestana_cierre]],
['l', [0, 0]],
['l', [0, (largo_caja)]],
['l', [medida4_pestanas_laterales, 0-medida4_pestanas_laterales]],
['l', [0,0-(alto_pestana-medida4_pestanas_laterales)]],
['l', [(largo_caja-medida2_pestanas_laterales-medida3_pestanas_laterales-medida4_pestanas_laterales), 0]],
['l', [medida3_pestanas_laterales, (alto_pestana-medida2_pestanas_laterales-medida1_pestanas_laterales)]],
['l', [medida2_pestanas_laterales, medida2_pestanas_laterales]],
['l', [0, medida1_pestanas_laterales]],
['l', [0,0]],
['l', [0, alto_caja]],
['l', [0,(largo_caja*0.5)+medida1_pestanas_cierre]],
['l', [0-(largo_caja)*0.5,0]],
['l', [0,0-medida1_pestanas_cierre]],
['l', [0-(largo_caja)*0.5,0-((largo_caja)*0.5)]],
['l', [0,(largo_caja*0.5)+medida1_pestanas_cierre]],
['l', [0-(ancho_caja)*0.25,0]],
['l', [0, 0-medida1_pestanas_cierre]],
['l', [0-(ancho_caja)*0.5,0]],
['l', [0, medida1_pestanas_cierre]],
['l', [0-(ancho_caja)*0.25,0]],
['l', [0,0-((largo_caja*0.5)+medida1_pestanas_cierre)]],
['l', [0-(largo_caja)*0.5,((largo_caja*0.5))]],
['l', [0,medida1_pestanas_cierre]],
['l', [0-(largo_caja)*0.5,0]],
['l', [0,0-((largo_caja*0.5)+medida1_pestanas_cierre)]],
['l', [0-ancho_caja*0.25,(largo_caja*0.5)]],
['l', [0,medida1_pestanas_cierre]],
['l', [0-ancho_caja*0.5,0]],
['l', [0,0-medida1_pestanas_cierre]],
['l', [0-ancho_caja*0.25,0-(largo_caja*0.5)]],
['l', [0, 0]],
['l', [0, 0]],
['l', [0, 0-medida2_pestanas_laterales]],
['l', [0-ancho_pestana_cola, 0-(ancho_pestana_cola/2)]],
['l', [0, 0-(alto_caja-ancho_pestana_cola-(medida2_pestanas_laterales*2))]],
['l', [ancho_pestana_cola, 0-(ancho_pestana_cola/2)]],
['Z', []]
]
line.style = estilo_linea_cortes
#Hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-1'))
line.path = [
['M', [0,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-2'))
line.path = [
['M', [ancho_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-3'))
line.path = [
['M', [ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-4'))
line.path = [
['M', [ancho_caja+ancho_caja+largo_caja,0]],
['l', [0,alto_caja]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-5'))
line.path = [
['M', [ancho_caja,0]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-6'))
line.path = [
['M', [largo_caja+ancho_caja,0]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-7'))
line.path = [
['M', [(ancho_caja*2)+largo_caja,0]],
['l', [largo_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-8'))
line.path = [
['M', [ancho_caja+largo_caja,0-largo_caja]],
['l', [ancho_caja,0]]
]
line.style = estilo_linea_hendidos
line = group.add(inkex.PathElement(id=id_caja + '-perfil-hendidos-9'))
line.path = [
['M', [0,alto_caja]],
['l', [(ancho_caja+largo_caja)*2,0]]
]
line.style = estilo_linea_hendidos
if __name__ == '__main__':
GenerarEstuche().run()

View File

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="FondoSuizoLayout.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg8"
version="1.1"
viewBox="0 0 94.000001 64.000001"
height="64mm"
width="94mm">
<defs
id="defs2">
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889" />
<rect
id="rect889-5"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-2"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-7"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-53"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-3"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-6"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect902-4"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect889-2-4" />
<rect
x="-76.706352"
y="209.06828"
width="23.786987"
height="31.003265"
id="rect979" />
<rect
id="rect889-53-2"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect2158"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect889-6-3"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
<rect
id="rect2161"
height="31.003265"
width="23.786987"
y="209.06828"
x="-76.706352" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="49.930469"
inkscape:cy="118.23988"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
height="211mm" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-232.99994)">
<text
xml:space="preserve"
id="text887"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.41705182,0,0,0.41705182,43.528428,194.28861)"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">A</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,66.364823,194.408)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-5);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-5"
xml:space="preserve"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">L</tspan></tspan></text>
<text
transform="matrix(0.41705182,0,0,0.41705182,78.375063,181.34478)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-2"
xml:space="preserve"><tspan
x="-68.892474"
y="219.23689"><tspan
style="font-size:11.2889px">H</tspan></tspan></text>
<text
xml:space="preserve"
id="text887-2-3"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-2-4);fill:#000000;fill-opacity:1;stroke:none;"
transform="matrix(0.30011567,0,0,0.30011567,23.016641,217.4035)"><tspan
x="-68.583793"
y="219.23689"><tspan
style="font-size:11.2889px">P</tspan></tspan></text>
<text
transform="matrix(0.41705181,0,0,0.41705181,104.8736,154.35938)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-53-2);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-56"
xml:space="preserve"><tspan
x="-68.264088"
y="219.23689"><tspan
style="font-size:11.2889px">T</tspan></tspan></text>
<path
id="estuche-fondosuizo2763-perfil-exterior"
d="M 5.5892335,251.95808 H 31.266128 v -1.14916 l 0.256769,-0.22983 0.770307,-12.41096 h 16.176444 v 13.10045 l 0.770307,0.6895 v -16.08827 q 0,-1.72375 1.925767,-1.72375 h 21.825361 q 1.925767,0 1.925767,1.72375 v 16.08827 l 0.770307,-0.6895 v -13.10045 h 16.176444 l 0.770307,12.41096 0.256768,0.22983 v 1.14916 34.47487 8.04414 h -8.986913 v -2.29833 l -8.986913,-5.74581 v 10.13561 h -6.419224 v -2.29832 H 55.659179 v 2.29832 h -6.419224 v -10.13561 l -8.986913,5.74581 v 2.29833 h -8.986914 v -8.04414 l -6.419223,8.04414 v 2.29832 H 12.008457 v -2.29832 l -6.4192235,-8.04414 -3.8515343,-3.44749 v -29.41855 z"
style="fill:none;stroke:#ff0000;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-1"
d="m 5.5892335,251.95808 v 34.47487 z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-2"
d="m 31.266128,251.95808 v 34.47487 z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-3"
d="m 49.239955,251.95808 v 34.47487 z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-4"
d="m 74.91685,251.95808 v 34.47487 z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-5"
d="M 31.266128,251.95808 H 92.890676 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-6"
d="M 5.5892335,286.43295 H 92.890676 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-7"
d="M 74.91685,286.43295 H 92.890676 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<path
id="estuche-fondosuizo2763-perfil-hendidos-8"
d="M 49.239955,236.92815 H 74.91685 Z"
style="fill:none;stroke:#0000ff;stroke-width:0.0642745" />
<text
transform="matrix(0.41705181,0,0,0.41705181,89.096941,146.87361)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:center;letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect889-6-3);fill:#000000;fill-opacity:1;stroke:none;"
id="text887-9"
xml:space="preserve"><tspan
x="-67.10791"
y="214.78815"><tspan
style="font-size:6.35px">C</tspan></tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.0 KiB