Skip to content
Snippets Groups Projects
Commit 6f9fc7d3 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

Skizze per "drawj2d"

parent 5b1ad2f9
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,8 @@ M4 = M4PATH=$(M4PATH) m4
IMAGES_PATH =./images
all : Ventilsteuerung2-Schema.pdf \
$(IMAGES_PATH)/Ventilsteuerung2-Schema.png
$(IMAGES_PATH)/Ventilsteuerung2-Schema.png \
$(IMAGES_PATH)/Skizze_Montageplatte.png
xxx :
@echo $(M4PATH)
......@@ -27,8 +28,14 @@ xxx :
Ventilsteuerung2-Schema.pdf : Ventilsteuerung2-Schema.tex VS2.tex fontdef.tex
lualatex $<
#drawj2d --verbose --width 210 --height 148 --type pdf --outfile Skizze_Montageplatte0.pdf Skizze_Montageplatte.hcl
Skizze_Montageplatte0.pdf : Skizze_Montageplatte.hcl
drawj2d --verbose --width 210 --height 148 --type pdf --outfile $@ $<
$(IMAGES_PATH)/Skizze_Montageplatte.png : Skizze_Montageplatte.pdf
pdftoppm -png -r 300 -aa yes -aaVector yes -singlefile $< $(basename $@)
Skizze_Montageplatte.pdf : Skizze_Montageplatte0.pdf
pdfcrop $< $@
$(IMAGES_PATH)/Ventilsteuerung2-Schema.png : Ventilsteuerung2-Schema.pdf
pdftoppm -r 2048 -aa yes -aaVector yes -scale-to 1024 -singlefile -png \
......
......@@ -7,14 +7,22 @@
# --type pdf --outfile Skizze_Montageplatte0.pdf Skizze_Montageplatte.hcl
unitlength 1; # 1mm
font Sans_Serif 4;
font Sans_Serif 3.5;
set thinline 0.15;
set thickline 0.4;
# Wichtige Konstanten
set Bore_radius 1.6
#
set Plate_wd 160;
set Plate_ht 100;
# Abstand zwischen zwei Maßlinien mit Beschriftung
set Distance_m 5;
# Länge eines Kreuzarms
set Cross_ln 3
#
set Display {14.8 11}
set Display_x 14.8;
set Display_y 11;
set Display_wd 130.5;
......@@ -44,33 +52,160 @@ moveto 0 0
pen black $thickline solid
# Europakarte
rectangle 160 100
rectangle $Plate_wd $Plate_ht
# Bohrungen für Display
circle $Display_x $Display_y $Bore_radius
circle [expr $Display_x + $Display_wd] $Display_y $Bore_radius
circle $Display_x [expr $Display_y + $Display_ht] $Bore_radius
circle [expr $Display_x + $Display_wd] [expr $Display_y + $Display_ht] $Bore_radius
proc draw_hole_with_cross {pos} {
global thickline; global thinline; global Bore_radius; global Cross_ln
pen black $thickline solid
circle $pos $Bore_radius
pen black $thinline solid
moveto [expr [X $pos] - $Cross_ln] [Y $pos]
linerel [expr 2 * $Cross_ln] 0
moveto [X $pos] [expr [Y $pos] - $Cross_ln]
linerel 0 [expr 2 * $Cross_ln]
}
# Bohrungen für Relais-Modul
circle $Relais_x $Relais_y $Bore_radius
circle [expr $Relais_x + $Relais_wd] $Relais_y $Bore_radius
circle $Relais_x [expr $Relais_y + $Relais_ht] $Bore_radius
circle [expr $Relais_x + $Relais_wd] [expr $Relais_y + $Relais_ht] $Bore_radius
# Bohrungen und Maßkreuze
# Bohrungen für RS232-TTL-Konverter
circle $RS232_x $RS232_y $Bore_radius
circle [expr $RS232_x + $RS232_wd] $RS232_y $Bore_radius
circle $RS232_x [expr $RS232_y + $RS232_ht] $Bore_radius
circle [expr $RS232_x + $RS232_wd] [expr $RS232_y + $RS232_ht] $Bore_radius
set points " \
{$Display_x $Display_y}
{[expr $Display_x + $Display_wd] $Display_y} \
{$Display_x [expr $Display_y + $Display_ht]} \
{[expr $Display_x + $Display_wd] [expr $Display_y + $Display_ht]} \
{$Relais_x $Relais_y} \
{[expr $Relais_x + $Relais_wd] $Relais_y} \
{$Relais_x [expr $Relais_y + $Relais_ht]} \
{[expr $Relais_x + $Relais_wd] [expr $Relais_y + $Relais_ht]} \
{$RS232_x $RS232_y} \
{[expr $RS232_x + $RS232_wd] $RS232_y} \
{$RS232_x [expr $RS232_y + $RS232_ht]} \
{[expr $RS232_x + $RS232_wd] [expr $RS232_y + $RS232_ht]} \
{$IO_x $IO_y} \
{[expr $IO_x + $IO_wd] $IO_y} \
{$Power_x $Power_y} \
{$Power_x [expr $Power_y + $Power_ht]} \
"
# Bohrungen für Nextion-IO-Adapter
circle $IO_x $IO_y $Bore_radius
circle [expr $IO_x + $IO_wd] $IO_y $Bore_radius
foreach i $points {
draw_hole_with_cross $i
}
# Bohrungen für Netzteilbuchse
circle $Power_x $Power_y $Bore_radius
circle $Power_x [expr $Power_y + $Power_ht] $Bore_radius
pen black $thinline solid
# Bemaßungen horizontal
# =====================
# Lochabstand Display
line $Display_x $Display_y \
$Display_x [expr $Plate_ht + $Distance_m];
dimlinerel $Display_wd 0;
line [here] [X [here]] $Display_y
# Lochabstand Relais-Modul
line $Relais_x $Relais_y \
$Relais_x [expr $Plate_ht + 2*$Distance_m];
dimlinerel $Relais_wd 0;
line [here] [X [here]] $Relais_y
# Breite der Europakarte
line 0 $Plate_ht 0 [expr $Plate_ht + 3*$Distance_m]
dimlinerel $Plate_wd 0;
line [here] [X [here]] $Plate_ht
# Lochabstand Nextion-IO-Adapter
line $IO_x $IO_y $IO_x -$Distance_m;
dimlinerel $IO_wd 0;
line [here] [X [here]] $IO_y
# Lochabstand RS232-TTL-Konverter
#line $RS232_x $RS232_y $RS232_x -$Distance_m;
#dimlinerel $RS232_wd 0;
#line [here] [X [here]] $RS232_y
# Lochabstand RS232-TTL-Konverter
moveto $RS232_x [expr $RS232_y + $RS232_ht]
linerel 0 [expr -$RS232_y - $RS232_ht - $Distance_m]
dimlinerel $RS232_wd 0
linerel 0 [expr $RS232_y + $RS232_ht + $Distance_m]
# Abstand Display von linker Kante
moveto 0 $IO_y
dimlinerel $Display_x 0
# Abstand Relais-Modul von linker Kante
moveto 0 [expr $Plate_ht + $Distance_m]
dimlinerel $Relais_x 0
# Abstand Nextion-IO-Adapter von linker Kante
line 0 0 0 -$Distance_m
dimlinerel $IO_x 0
# Abstand RS232-TTL-Konverter von rechter Kante
line $Plate_wd 0 $Plate_wd -$Distance_m
dimlinerel [expr $RS232_wd - $Plate_wd + $RS232_x] 0
# Bemaßungen vertikal
# ===================
# Abstand RS232-TTL-Konverter von oberer Kante
# line $RS232_x $RS232_y [expr $Plate_wd + $Distance_m] $RS232_y
# dimlinerel 0 -$RS232_y
# linerel -$Distance_m 0
# Abstand RS232-TTL-Konverter von oberer Kante
moveto $RS232_x $RS232_y
linerel [expr $Plate_wd - $RS232_x + $Distance_m] 0
dimlinerel 0 -$RS232_y
linerel -$Distance_m 0
# Lochabstand RS232-TTL-Konverter
moveto $RS232_x [expr $RS232_y + $RS232_ht]
linerel [expr $Plate_wd - $RS232_x + $Distance_m] 0
dimlinerel 0 -$RS232_ht
# Lochabstand Relais-Modul
moveto $Relais_x [expr $Relais_y + $Relais_ht]
linerel [expr $Plate_wd - $Relais_x + 2 * $Distance_m] 0
dimlinerel 0 -$Relais_ht
line [here] $Relais_x $Relais_y
# Lochabstand Netzteilbuchse
moveto $Power_x [expr $Power_y + $Power_ht]
linerel [expr $Plate_wd - $Power_x + $Distance_m] 0
dimlinerel 0 -$Power_ht
line [here] $Power_x $Power_y
# Abstand Relais-Modul zu Netzteilbuchse
moveto [expr $Plate_wd + $Distance_m] [expr $Relais_y + $Relais_ht]
dimlinerel 0 [expr $Relais_y - $Power_y]
# Abstand Relais-Modul von unterer Kante
moveto $Plate_wd $Plate_ht
linerel $Distance_m 0
dimlinerel 0 [expr $Relais_y - $Plate_ht + $Relais_ht]
# Abstand Nextion-IO-Adapter von oberer Kante
moveto $IO_x $IO_y
linerel [expr $IO_wd + $Distance_m] 0
dimlinerel 0 -$IO_y
# Lochabstand Display
moveto [expr $Display_x + $Display_wd] [expr $Display_y + $Display_ht]
linerel [expr -$Display_wd - $Display_x - $Distance_m] 0
dimlinerel 0 -$Display_ht
#linerel [expr $Display_wd + $Display_x + $Distance_m] 0
linerel [expr $Distance_m + $IO_x + .85 * $IO_wd] 0
moveto [expr $IO_x + 1.5 * $IO_wd] [Y [here]]
linerel [expr -[X [here]] + $Display_x + $Display_wd] 0
# Höhe der Europakarte
moveto 0 $Plate_ht
linerel [expr -2 * $Distance_m] 0
dimlinerel 0 -$Plate_ht
linerel [expr + 2 * $Distance_m] 0
# Abstand Display von unterer Kante
moveto $IO_x $Plate_ht
dimlinerel 0 [expr ($Display_ht - $Plate_ht) / 2]
line [here] [expr $Display_x + $Display_wd] [Y [here]]
Ventilsteuerung_2/images/Skizze_Montageplatte.png

200 KiB | W: | H:

Ventilsteuerung_2/images/Skizze_Montageplatte.png

72.2 KiB | W: | H:

Ventilsteuerung_2/images/Skizze_Montageplatte.png
Ventilsteuerung_2/images/Skizze_Montageplatte.png
Ventilsteuerung_2/images/Skizze_Montageplatte.png
Ventilsteuerung_2/images/Skizze_Montageplatte.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment