Skip to content

Commit

Permalink
Version 0.84
Browse files Browse the repository at this point in the history
  • Loading branch information
repetier committed Feb 10, 2013
1 parent 7b874a7 commit a19d776
Show file tree
Hide file tree
Showing 16 changed files with 354 additions and 313 deletions.
3 changes: 2 additions & 1 deletion Repetier-Host-licence.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Repetier-Host software

Copyright 2011 repetier
Copyright 2011-2013 Hot-World GmbH & Co. KG
Written by Dipl.-Ing. Roland Littwin aka. Repetier

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 6 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
Version 0.84
Version 0.84 09-02-2013
Added japanese translation by Hajime Ashida.
Fixed error marking elements outside even if inside.
Improved filament visualization.
Update printer shape when selecting printer over connect button.
Disable slic3r filament settings for non existent extruder.
Layer start is now at the z move starting a new layer.
Highlight line numbers depending on layer number even/odd.
Fixed bug not storing all 3d settings in registry.

Version 0.83 22-01-2013
Slic3r 0.9.8 included
Expand Down
4 changes: 2 additions & 2 deletions setup-config.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Repetier-Host"
#define MyAppVersion "0.83"
#define MyAppVersion "0.84"
#define MyAppPublisher "repetier"
#define MyAppURL "https://www.repetier.com"
#define MyAppExeName "RepetierHost.exe"
Expand All @@ -24,7 +24,7 @@ DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=Repetier-Host-licence.txt
OutputDir=installer/windows
OutputBaseFilename=setupRepetierHost_0_83
OutputBaseFilename=setupRepetierHost_0_84
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64
Expand Down
2 changes: 1 addition & 1 deletion src/RepetierHost/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/RepetierHost/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ private void ConnectHandler(object sender, EventArgs e)
ToolStripMenuItem clickedItem = (ToolStripMenuItem)sender;
printerSettings.load(clickedItem.Text);
printerSettings.formToCon();
slicerPanel.UpdateSelection();
printerSettings.UpdateDimensions();
Update3D();
conn.open();
}
public void PrinterChanged(RegistryKey pkey, bool printerChanged)
Expand Down
542 changes: 271 additions & 271 deletions src/RepetierHost/Main.resx

Large diffs are not rendered by default.

Binary file modified src/RepetierHost/RepetierHost.suo
Binary file not shown.
61 changes: 41 additions & 20 deletions src/RepetierHost/model/GCodeAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ public class GCodeAnalyzer
public event OnAnalyzerChange eventChange;
public int activeExtruder = 0;
//public float extruderTemp = 0;
public Dictionary<int,float> extruderTemp = new Dictionary<int,float>();
public Dictionary<int, float> extruderTemp = new Dictionary<int, float>();
public LinkedList<GCodeShort> unchangedLayer = new LinkedList<GCodeShort>();
public bool uploading = false;
public float bedTemp = 0;
public float x = 0, y = 0, z = 0, e = 0, emax = 0,f=1000;
public float lastX=0, lastY=0, lastZ=0, lastE=0;
public float xOffset = 0, yOffset = 0, zOffset = 0, eOffset = 0,lastZPrint = 0;
public float x = 0, y = 0, z = 0, e = 0, emax = 0, f = 1000;
public float lastX = 0, lastY = 0, lastZ = 0, lastE = 0;
public float xOffset = 0, yOffset = 0, zOffset = 0, eOffset = 0, lastZPrint = 0, layerZ = 0;
public bool fanOn = false;
public int fanVoltage = 0;
public bool powerOn = true;
Expand All @@ -51,7 +52,7 @@ public class GCodeAnalyzer
public bool privateAnalyzer = false;
public int maxDrawMethod = 2;
public bool drawing = true;
public int layer = 0;
public int layer = 0, lastlayer = 0;
public bool isG1Move = false;
public int speedMultiply = 100;
public float printerWidth, printerHeight, printerDepth;
Expand All @@ -62,20 +63,22 @@ public class GCodeAnalyzer
public GCodeAnalyzer(bool privAnal)
{
privateAnalyzer = privAnal;
foreach(int k in extruderTemp.Keys)
foreach (int k in extruderTemp.Keys)
extruderTemp[k] = 0;
bedTemp = 0;
}
public float getTemperature(int extr) {
public float getTemperature(int extr)
{
if (extr < 0) extr = activeExtruder;
if(!extruderTemp.ContainsKey(extr))
extruderTemp.Add(extr,0.0f);
if (!extruderTemp.ContainsKey(extr))
extruderTemp.Add(extr, 0.0f);
return extruderTemp[extr];
}
public void setTemperature(int extr,float t) {
public void setTemperature(int extr, float t)
{
if (extr < 0) extr = activeExtruder;
if (!extruderTemp.ContainsKey(extr))
extruderTemp.Add(extr,t);
extruderTemp.Add(extr, t);
else extruderTemp[extr] = t;
}
public void fireChanged()
Expand All @@ -98,7 +101,7 @@ public void start()
List<int> keys = new List<int>();
foreach (int k in extruderTemp.Keys)
keys.Add(k);
foreach(int k in keys)
foreach (int k in keys)
extruderTemp[k] = 0;
bedTemp = 0;
fanOn = false;
Expand All @@ -108,6 +111,8 @@ public void start()
drawing = true;
lastline = 0;
layer = 0;
lastlayer = 0;
layerZ = 0;
x = y = z = e = emax = lastZPrint = 0;
xOffset = yOffset = zOffset = eOffset = 0;
lastX = 0; lastY = 0; lastZ = 0; lastE = 0;
Expand All @@ -119,12 +124,15 @@ public void start()
Main.main.jobVisual.ResetQuality();
fireChanged();
}
public void StartJob() {
public void StartJob()
{
layer = 0;
lastZPrint = 0;
printingTime = 0;
lastX = 0; lastY = 0; lastZ = 0; lastE = 0;
eOffset = 0; emax = 0; e = 0;
lastlayer = 0;
layerZ = 0;
drawing = true;
uploading = false;
if (!privateAnalyzer)
Expand Down Expand Up @@ -176,7 +184,7 @@ public void Analyze(GCode code)
if (code.hasY) y = yOffset + code.Y;
if (code.hasZ)
{
z = zOffset + code.Z;
z = zOffset + code.Z;
}
if (code.hasE)
{
Expand Down Expand Up @@ -205,7 +213,7 @@ public void Analyze(GCode code)
if (!privateAnalyzer && Main.conn.job.hasData() && Main.conn.job.maxLayer >= 0)
{
//PrinterConnection.logInfo("Printing layer " + layer.ToString() + " of " + Main.conn.job.maxLayer.ToString());
PrinterConnection.logInfo(Trans.T2("L_PRINTING_LAYER_X_OF_Y",layer.ToString(), Main.conn.job.maxLayer.ToString()));
PrinterConnection.logInfo(Trans.T2("L_PRINTING_LAYER_X_OF_Y", layer.ToString(), Main.conn.job.maxLayer.ToString()));
}
}
}
Expand All @@ -223,6 +231,7 @@ public void Analyze(GCode code)
printingTime += Math.Sqrt(dx * dx + dy * dy + dz * dz) * 60.0f / f;
}
else printingTime += de * 60.0f / f;
if (z != lastZ) unchangedLayer.Clear();
lastX = x;
lastY = y;
lastZ = z;
Expand Down Expand Up @@ -304,7 +313,7 @@ public void Analyze(GCode code)
{
int idx = activeExtruder;
if (code.hasT) idx = code.T;
if (code.hasS) setTemperature(idx,code.S);
if (code.hasS) setTemperature(idx, code.S);
}
fireChanged();
break;
Expand Down Expand Up @@ -332,11 +341,11 @@ public void Analyze(GCode code)
fireChanged();
break;
case 203: // Temp monitor
if(code.hasS)
if (code.hasS)
tempMonitor = code.S;
break;
case 220:
if(code.hasS)
if (code.hasS)
speedMultiply = code.S;
break;
}
Expand Down Expand Up @@ -381,7 +390,7 @@ public void analyzeShort(GCodeShort code)
if (code.hasE)
{
eChanged = code.e != 0;
e += code.e;
e += code.e;
if (e > emax)
{
emax = e;
Expand Down Expand Up @@ -433,7 +442,7 @@ public void analyzeShort(GCodeShort code)
}
}
}
if(eventPosChangedFast!=null)
if (eventPosChangedFast != null)
eventPosChangedFast(x, y, z, e);
float dx = Math.Abs(x - lastX);
float dy = Math.Abs(y - lastY);
Expand Down Expand Up @@ -506,6 +515,18 @@ public void analyzeShort(GCodeShort code)
activeExtruder = code.tool;
break;
}
if (layer != lastlayer)
{
foreach (GCodeShort c in unchangedLayer)
{
c.layer = layer;
}
unchangedLayer.Clear();
layerZ = z;
lastlayer = layer;
}
else if (z != layerZ)
unchangedLayer.AddLast(code);
code.layer = layer;
code.tool = activeExtruder;
code.emax = emax;
Expand Down
12 changes: 6 additions & 6 deletions src/RepetierHost/model/GCodeVisual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ public void UpdateVBO(bool buffer)
GCodeVisual.normalize(ref dir);
double vacos = dir[0] * lastdir[0] + dir[1] * lastdir[1] + dir[2] * lastdir[2];
if (vacos > 1) vacos = 1;
if (vacos < 0.7)
vacos = 0.7;
if (vacos < 0.3)
vacos = 0.3;
float zoomw = (float)vacos; // Math.Cos(Math.Acos(vacos));
lastdir[0] = actdir[0];
lastdir[1] = actdir[1];
Expand Down Expand Up @@ -923,11 +923,11 @@ public void drawSegment(GCodePath path)
if (liveView && path.lastDist > minHotDist)
{
GL.EnableClientState(ArrayCap.ColorArray);
cp = new float[path.positions.Length*(GCodePath.correctNorms ? 2 : 1)];
cp = new float[path.positions.Length];
int nv = 8 * (method - 1);
if (method == 1) nv = 4;
if (method == 0) nv = 1;
if (GCodePath.correctNorms) nv *= 2;
if (method == 0) nv = 1;
int p = 0;
foreach (LinkedList<GCodePoint> points in path.pointsLists)
{
Expand Down Expand Up @@ -993,11 +993,11 @@ public void drawSegment(GCodePath path)
if (liveView && path.lastDist > minHotDist)
{
GL.EnableClientState(ArrayCap.ColorArray);
cp = new float[path.positions.Length * (GCodePath.correctNorms ? 2 : 1)];
cp = new float[path.positions.Length];
int nv = 8 * (method - 1);
if (method == 1) nv = 4;
if (method == 0) nv = 1;
if (GCodePath.correctNorms) nv *= 2;
if (method == 0) nv = 1;
int p = 0;
foreach (LinkedList<GCodePoint> points in path.pointsLists)
{
Expand Down
2 changes: 2 additions & 0 deletions src/RepetierHost/model/STL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ public void Load(string file)
tri.p1 = new Vector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle());
tri.p2 = new Vector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle());
tri.p3 = new Vector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle());
tri.normal = Vector3.Normalize(tri.normal);
list.AddLast(tri);
r.ReadUInt16();
}
Expand Down Expand Up @@ -420,6 +421,7 @@ private void LoadText(string file)
outer = text.IndexOf("outer loop", normal);
STLTriangle tri = new STLTriangle();
tri.normal = extractVector(text.Substring(normal, outer - normal));
tri.normal = Vector3.Normalize(tri.normal);
outer += 10;
vertex = text.IndexOf("vertex", outer) + 6;
vertex2 = text.IndexOf("vertex", vertex);
Expand Down
1 change: 1 addition & 0 deletions src/RepetierHost/view/FormPrinterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ private void buttonOK_Click(object sender, EventArgs e)
formToCon();
UpdateDimensions();
Hide();
Main.main.slicerPanel.UpdateSelection();
Main.main.Update3D();
Main.main.UpdateConnections();
}
Expand Down
13 changes: 9 additions & 4 deletions src/RepetierHost/view/RepetierEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ public void AddUndo(Undo u)
Brush commentBrush = Brushes.OliveDrab;
Brush paramTypeBrush = Brushes.Maroon;
Brush linesBgColor = Brushes.CadetBlue;
Brush linesBgAltColor = Brushes.DarkCyan;
Brush linesTextColor = Brushes.White;
Brush backBrush = Brushes.White;
Brush evenBackBrush = Brushes.Linen;
Expand Down Expand Up @@ -653,8 +654,9 @@ public void Clear()
PositionShowCursor(true, false);
Changed();
}
private void DrawRow(Graphics g, int line, string text, float x, float y)
private void DrawRow(Graphics g, int line, GCodeShort code, float x, float y)
{
string text = code.text;
float s1 = 0, s2 = 0;
g.FillRectangle(((line & 1)==0?backBrush:evenBackBrush), linesWidth, y, editor.Width - linesWidth, fontHeight);
string ln = line.ToString();
Expand Down Expand Up @@ -735,8 +737,11 @@ private void DrawRow(Graphics g, int line, string text, float x, float y)
ac++;
}
}
g.FillRectangle(linesBgColor, 0, y, linesWidth, fontHeight);
g.DrawString(ln, drawFont, linesTextColor, linesWidth-3 - fontWidth * ln.Length, y);
if((code.layer & 1)==0)
g.FillRectangle(linesBgColor, 0, y, linesWidth, fontHeight);
else
g.FillRectangle(linesBgAltColor, 0, y, linesWidth, fontHeight);
g.DrawString(ln, drawFont, linesTextColor, linesWidth - 3 - fontWidth * ln.Length, y);
PositionCursor();
}
private void CreateCursor()
Expand Down Expand Up @@ -786,7 +791,7 @@ private void editor_Paint(object sender, PaintEventArgs e)
rmax = lines.Count - topRow;
for (r = 0; r < rmax; r++)
{
DrawRow(g, topRow + r + 1, lines[topRow + r].text, -fontWidth*topCol, r * fontHeight);
DrawRow(g, topRow + r + 1, lines[topRow + r], -fontWidth*topCol, r * fontHeight);
}
if (Main.IsMono && blink && editor.Focused && _col>=topCol && _row>=topRow && _row<=topRow+rowsVisible)
{
Expand Down
6 changes: 3 additions & 3 deletions src/RepetierHost/view/SlicerPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ public void UpdateSelection()
comboSlic3rFilamentSettings2.Items.Add(noINI(fi.Name));
comboSlic3rFilamentSettings3.Items.Add(noINI(fi.Name));
}
comboSlic3rFilamentSettings.Enabled = true;
comboSlic3rFilamentSettings2.Enabled = true;
comboSlic3rFilamentSettings3.Enabled = true;
comboSlic3rFilamentSettings.Enabled = Main.conn.numberExtruder>0;
comboSlic3rFilamentSettings2.Enabled = Main.conn.numberExtruder > 1;
comboSlic3rFilamentSettings3.Enabled = Main.conn.numberExtruder > 2;
if (b.Slic3rFilamentSettings.Length > 0)
comboSlic3rFilamentSettings.SelectedItem = b.Slic3rFilamentSettings;
if (comboSlic3rFilamentSettings.SelectedIndex<0 && rgFiles.Count() > 0)
Expand Down
5 changes: 4 additions & 1 deletion src/RepetierHost/view/ThreeDControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ private void gl_Paint(object sender, PaintEventArgs e)
}
GL.End();
}
GL.Enable(EnableCap.CullFace);
if (Main.main.tab.SelectedIndex > 1)
GL.Enable(EnableCap.CullFace);
else
GL.Disable(EnableCap.CullFace);
GL.Disable(EnableCap.LineSmooth);
foreach (ThreeDModel model in view.models)
{
Expand Down
4 changes: 2 additions & 2 deletions src/RepetierHost/view/utils/RHUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ namespace RepetierHost.view.utils
{
public partial class RHUpdater : Form
{
public static string currentVersion = "0.83";
public static int buildVersion = 56;
public static string currentVersion = "0.84";
public static int buildVersion = 57;
public static string newestVersion = "";
public static int newestBuildVersion = 0;
public static string updateText = "";
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.82b
0.84

0 comments on commit a19d776

Please sign in to comment.