You can subscribe to this list here.
2009 |
Jan
(9) |
Feb
(137) |
Mar
(123) |
Apr
(60) |
May
(305) |
Jun
(49) |
Jul
(39) |
Aug
(44) |
Sep
(23) |
Oct
(42) |
Nov
(39) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(61) |
Feb
(50) |
Mar
(33) |
Apr
(10) |
May
(17) |
Jun
(19) |
Jul
(48) |
Aug
(71) |
Sep
(69) |
Oct
(59) |
Nov
(21) |
Dec
(74) |
2011 |
Jan
(38) |
Feb
(29) |
Mar
(19) |
Apr
(43) |
May
(16) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <adr...@us...> - 2011-07-06 17:36:53
|
Revision: 4144 http://reprap.svn.sourceforge.net/reprap/?rev=4144&view=rev Author: adrian-bowyer Date: 2011-07-06 17:36:46 +0000 (Wed, 06 Jul 2011) Log Message: ----------- Added configuration.h.dist to stop files getting corrupted with each download. Also some useful thermistor files. Added Paths: ----------- trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k_EPCOS_B57550G103J.h trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k_EPCOS_B57540G0104J.h trunk/software/firmware/Tonokip_Firmware/configuration.h.dist Removed Paths: ------------- trunk/software/firmware/Tonokip_Firmware/configuration.h Added: trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k_EPCOS_B57550G103J.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k_EPCOS_B57550G103J.h (rev 0) +++ trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k_EPCOS_B57550G103J.h 2011-07-06 17:36:46 UTC (rev 4144) @@ -0,0 +1,46 @@ +#ifndef BEDTHERMISTORTABLE_10K_H_ +#define BEDTHERMISTORTABLE_10K_H_ + +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) + + + +// RS thermistor 484-0149; EPCOS B57550G103J +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=10000 --t0=25 --r1=0 --r2=4700 --beta=3480 --max-adc=1023 +// r0: 10000 +// t0: 25 +// r1: 0 +// r2: 4700 +// beta: 3480 +// max adc: 1023 +#define BNUMTEMPS 20 +short bedtemptable[BNUMTEMPS][2] = { + {1, 599}, + {54, 160}, + {107, 123}, + {160, 103}, + {213, 90}, + {266, 79}, + {319, 70}, + {372, 62}, + {425, 55}, + {478, 49}, + {531, 43}, + {584, 37}, + {637, 31}, + {690, 25}, + {743, 19}, + {796, 12}, + {849, 5}, + {902, -3}, + {955, -16}, + {1008, -42} +}; +#endif + + Added: trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k_EPCOS_B57540G0104J.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k_EPCOS_B57540G0104J.h (rev 0) +++ trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k_EPCOS_B57540G0104J.h 2011-07-06 17:36:46 UTC (rev 4144) @@ -0,0 +1,77 @@ +#ifndef THERMISTORTABLE_100K_H_ +#define THERMISTORTABLE_100K_H_ + +// "RS 100k thermistor" Rs Part: 528-8592; "EPCOS NTC G540" B57540G0104J +// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4036 --max-adc=1023 +// r0: 100000 +// t0: 25 +// r1: 0 +// r2: 4700 +// beta: 4036 +// max adc: 1023 + +#define NUMTEMPS 20 +short temptable[NUMTEMPS][2] = { + {1, 864}, + {54, 258}, + {107, 211}, + {160, 185}, + {213, 168}, + {266, 154}, + {319, 143}, + {372, 133}, + {425, 125}, + {478, 116}, + {531, 109}, + {584, 101}, + {637, 94}, + {690, 87}, + {743, 79}, + {796, 70}, + {849, 61}, + {902, 50}, + {955, 34}, + {1008, 2} +}; + + +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 +// r0: 100000 +// t0: 25 +// r1: 0 +//// r2: 4700 +//// beta: 4066 +//// max adc: 1023 +// +//#define NUMTEMPS 20 +//short temptable[NUMTEMPS][2] = { +// {1, 864}, +// {54, 258}, +// {107, 211}, +// {160, 185}, +// {213, 168}, +// {266, 154}, +// {319, 143}, +// {372, 133}, +// {425, 125}, +// {478, 116}, +// {531, 109}, +// {584, 101}, +// {637, 94}, +// {690, 87}, +// {743, 79}, +// {796, 70}, +// {849, 61}, +// {902, 50}, +// {955, 34}, +// {1008, 2} +//}; + + +#endif + Deleted: trunk/software/firmware/Tonokip_Firmware/configuration.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-06-28 17:08:09 UTC (rev 4143) +++ trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-07-06 17:36:46 UTC (rev 4144) @@ -1,139 +0,0 @@ -#ifndef PARAMETERS_H -#define PARAMETERS_H - -// NO RS485/EXTRUDER CONTROLLER SUPPORT -// PLEASE VERIFY PIN ASSIGNMENTS FOR YOUR CONFIGURATION!!!!!!! -#define MOTHERBOARD 3 // ATMEGA168 = 0, SANGUINO = 1, MOTHERBOARD = 2, MEGA/RAMPS = 3, ATMEGA328 = 4, Gen6 = 5, Sanguinololu = 6 - -//Comment out to disable SD support -//#define SDSUPPORT 1 - -//Min step delay in microseconds. If you are experiencing missing steps, try to raise the delay microseconds, but be aware this -// If you enable this, make sure STEP_DELAY_RATIO is disabled. -#define STEP_DELAY_MICROS 1 - -// Do RepRap-style accelerations -// See: http://reprap.org/wiki/GCodes#G1:_Controlled_move -// Comment out to get Ordinary G-code F-value behaviour -#define REPRAP_ACC - -//Step delay over interval ratio. If you are still experiencing missing steps, try to uncomment the following line, but be aware this -//If you enable this, make sure STEP_DELAY_MICROS is disabled. -//#define STEP_DELAY_RATIO 0.25 - -//Acceleration settings -float full_velocity_units = 10; // the units between minimum and G1 move feedrate -float travel_move_full_velocity_units = 10; // used for travel moves -float min_units_per_second = 35.0; // the minimum feedrate -float min_constant_speed_units = 2; // the minimum units of an accelerated move that must be done at constant speed - // Note that if the move is shorter than this value, acceleration won't be perfomed, - // but will be done at the minimum between min_units_per_seconds and move feedrate speeds. - -// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!! - -//PID settings: -//Uncomment the following line to enable PID support. This is untested and could be disastrous. Be careful. -//#define PIDTEMP 1 -#ifdef PIDTEMP -#define PID_MAX 255 // limits current to nozzle -#define PID_INTEGRAL_DRIVE_MAX 220 -#define PID_PGAIN 180 //100 is 1.0 -#define PID_IGAIN 2 //100 is 1.0 -#define PID_DGAIN 100 //100 is 1.0 -#endif - -//Experimental temperature smoothing - only uncomment this if your temp readings are noisy -//#define SMOOTHING 1 -//#define SMOOTHFACTOR 16 //best to use a power of two here - determines how many values are averaged together by the smoothing algorithm - -//Experimental watchdog and minimal temp -//The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature -//If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109 -//#define WATCHPERIOD 5000 //5 seconds -//The minimal temperature defines the temperature below which the heater will not be enabled -//#define MINTEMP - -// Select one of these only to define how the nozzle temp is read. -#define HEATER_USES_THERMISTOR -//#define HEATER_USES_AD595 -//#define HEATER_USES_MAX6675 - -// Select one of these only to define how the bed temp is read. -#define BED_USES_THERMISTOR -//#define BED_USES_AD595 - -// Calibration formulas -// e_extruded_steps_per_mm = e_feedstock_steps_per_mm * (desired_extrusion_diameter^2 / feedstock_diameter^2) -// new_axis_steps_per_mm = previous_axis_steps_per_mm * (test_distance_instructed/test_distance_traveled) -// units are in millimeters or whatever length unit you prefer: inches,football-fields,parsecs etc - -//Calibration variables -float x_steps_per_unit = 80; -float y_steps_per_unit = 80; -float z_steps_per_unit = 6667.184; -float e_steps_per_unit = 48; - -#ifdef REPRAP_ACC -float f_steps_per_unit = 1; -float max_feedrate = 12000; -#else -float max_feedrate = 200000; //mmm, acceleration! -#endif - -//float x_steps_per_unit = 10.047; -//float y_steps_per_unit = 10.047; -//float z_steps_per_unit = 833.398; -//float e_steps_per_unit = 0.706; -//float max_feedrate = 3000; - -//For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 -const bool X_ENABLE_ON = 0; -const bool Y_ENABLE_ON = 0; -const bool Z_ENABLE_ON = 0; -const bool E_ENABLE_ON = 0; - -//Disables axis when it's not being used. -const bool DISABLE_X = false; -const bool DISABLE_Y = false; -const bool DISABLE_Z = false; -const bool DISABLE_E = false; - -const bool INVERT_X_DIR = false; -const bool INVERT_Y_DIR = false; -const bool INVERT_Z_DIR = true; -const bool INVERT_E_DIR = false; - -//Thermistor settings: -//Uncomment for 10k thermistor -#include "BedThermistorTable_10k.h" - -//Thermistor settings: -//Uncomment for 100k thermistor -#include "ThermistorTable_100k.h" -//#include "BedThermistorTable_100k.h" - -//Uncomment for 200k thermistor -//#include "ThermistorTable_200k.h" -//#include "BedThermistorTable_200k.h" - -//Identical thermistors on heater and bed - use this if you have no heated bed or if the thermistors are the same on both: -//#include "ThermistorTable_200k.h" -//#include "ThermistorTable_100k.h" -//#include "ThermistorTable_mendelparts.h" -//#define BNUMTEMPS NUMTEMPS -//#define bedtemptable temptable - -//Endstop Settings -#define ENDSTOPPULLUPS 1 -const bool ENDSTOPS_INVERTING = false; -const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero. N.B. If true this prevents G28 homing axes. -const bool max_software_endstops = true; //If true, axis won't move to coordinates greater than the defined lengths below. -const int X_MAX_LENGTH = 220; -const int Y_MAX_LENGTH = 220; -const int Z_MAX_LENGTH = 100; - -#define BAUDRATE 115200 - - - -#endif Added: trunk/software/firmware/Tonokip_Firmware/configuration.h.dist =================================================================== --- trunk/software/firmware/Tonokip_Firmware/configuration.h.dist (rev 0) +++ trunk/software/firmware/Tonokip_Firmware/configuration.h.dist 2011-07-06 17:36:46 UTC (rev 4144) @@ -0,0 +1,138 @@ +#ifndef PARAMETERS_H +#define PARAMETERS_H + +// NO RS485/EXTRUDER CONTROLLER SUPPORT +// PLEASE VERIFY PIN ASSIGNMENTS FOR YOUR CONFIGURATION!!!!!!! +#define MOTHERBOARD 6 // ATMEGA168 = 0, SANGUINO = 1, MOTHERBOARD = 2, MEGA/RAMPS = 3, ATMEGA328 = 4, Gen6 = 5, Sanguinololu = 6 + +//Comment out to disable SD support +//#define SDSUPPORT 1 + +//Min step delay in microseconds. If you are experiencing missing steps, try to raise the delay microseconds, but be aware this +// If you enable this, make sure STEP_DELAY_RATIO is disabled. +#define STEP_DELAY_MICROS 1 + +// Do RepRap-style accelerations +// See: http://reprap.org/wiki/GCodes#G1:_Controlled_move +// Comment out to get Ordinary G-code F-value behaviour +#define REPRAP_ACC + +//Step delay over interval ratio. If you are still experiencing missing steps, try to uncomment the following line, but be aware this +//If you enable this, make sure STEP_DELAY_MICROS is disabled. +//#define STEP_DELAY_RATIO 0.25 + +//Acceleration settings +float full_velocity_units = 10; // the units between minimum and G1 move feedrate +float travel_move_full_velocity_units = 10; // used for travel moves +float min_units_per_second = 35.0; // the minimum feedrate +float min_constant_speed_units = 2; // the minimum units of an accelerated move that must be done at constant speed + // Note that if the move is shorter than this value, acceleration won't be perfomed, + // but will be done at the minimum between min_units_per_seconds and move feedrate speeds. + +// AD595 THERMOCOUPLE SUPPORT UNTESTED... USE WITH CAUTION!!!! + +//PID settings: +//Uncomment the following line to enable PID support. This is untested and could be disastrous. Be careful. +//#define PIDTEMP 1 +#ifdef PIDTEMP +#define PID_MAX 255 // limits current to nozzle +#define PID_INTEGRAL_DRIVE_MAX 220 +#define PID_PGAIN 180 //100 is 1.0 +#define PID_IGAIN 2 //100 is 1.0 +#define PID_DGAIN 100 //100 is 1.0 +#endif + +//Experimental temperature smoothing - only uncomment this if your temp readings are noisy +//#define SMOOTHING 1 +//#define SMOOTHFACTOR 16 //best to use a power of two here - determines how many values are averaged together by the smoothing algorithm + +//Experimental watchdog and minimal temp +//The watchdog waits for the watchperiod in milliseconds whenever an M104 or M109 increases the target temperature +//If the temperature has not increased at the end of that period, the target temperature is set to zero. It can be reset with another M104/M109 +//#define WATCHPERIOD 5000 //5 seconds +//The minimal temperature defines the temperature below which the heater will not be enabled +//#define MINTEMP + +// Select one of these only to define how the nozzle temp is read. +#define HEATER_USES_THERMISTOR +//#define HEATER_USES_AD595 +//#define HEATER_USES_MAX6675 + +// Select one of these only to define how the bed temp is read. +#define BED_USES_THERMISTOR +//#define BED_USES_AD595 + +// Calibration formulas +// e_extruded_steps_per_mm = e_feedstock_steps_per_mm * (desired_extrusion_diameter^2 / feedstock_diameter^2) +// new_axis_steps_per_mm = previous_axis_steps_per_mm * (test_distance_instructed/test_distance_traveled) +// units are in millimeters or whatever length unit you prefer: inches,football-fields,parsecs etc + +//Calibration variables +float x_steps_per_unit = 80; +float y_steps_per_unit = 80; +float z_steps_per_unit = 2560; +float e_steps_per_unit = 30; + +#ifdef REPRAP_ACC +float f_steps_per_unit = 1; +float max_feedrate = 12000; +#else +float max_feedrate = 200000; //mmm, acceleration! +#endif + +//float x_steps_per_unit = 10.047; +//float y_steps_per_unit = 10.047; +//float z_steps_per_unit = 833.398; +//float e_steps_per_unit = 0.706; +//float max_feedrate = 3000; + +//For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +const bool X_ENABLE_ON = 0; +const bool Y_ENABLE_ON = 0; +const bool Z_ENABLE_ON = 0; +const bool E_ENABLE_ON = 0; + +//Disables axis when it's not being used. +const bool DISABLE_X = false; +const bool DISABLE_Y = false; +const bool DISABLE_Z = false; +const bool DISABLE_E = false; + +const bool INVERT_X_DIR = false; +const bool INVERT_Y_DIR = false; +const bool INVERT_Z_DIR = false; +const bool INVERT_E_DIR = false; + +//Thermistor settings: +//Uncomment for 10k thermistor +#include "BedThermistorTable_10k_EPCOS_B57550G103J.h" + +//Thermistor settings: +//Uncomment for 100k thermistor +#include "ThermistorTable_100k_EPCOS_B57540G0104J.h" + +//Uncomment for 200k thermistor +//#include "ThermistorTable_200k.h" +//#include "BedThermistorTable_200k.h" + +//Identical thermistors on heater and bed - use this if you have no heated bed or if the thermistors are the same on both: +//#include "ThermistorTable_200k.h" +//#include "ThermistorTable_100k.h" +//#include "ThermistorTable_mendelparts.h" +//#define BNUMTEMPS NUMTEMPS +//#define bedtemptable temptable + +//Endstop Settings +#define ENDSTOPPULLUPS 1 +const bool ENDSTOPS_INVERTING = false; +const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero. N.B. If true this prevents G28 homing axes. +const bool max_software_endstops = true; //If true, axis won't move to coordinates greater than the defined lengths below. +const int X_MAX_LENGTH = 220; +const int Y_MAX_LENGTH = 220; +const int Z_MAX_LENGTH = 100; + +#define BAUDRATE 115200 + + + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-06-28 17:08:15
|
Revision: 4143 http://reprap.svn.sourceforge.net/reprap/?rev=4143&view=rev Author: adrian-bowyer Date: 2011-06-28 17:08:09 +0000 (Tue, 28 Jun 2011) Log Message: ----------- Fixed bug described here: http://forums.reprap.org/read.php?146,69681,69681,quote=1 Now it compiles at least. Will test later this evening I hope. Modified Paths: -------------- trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde Modified: trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde =================================================================== --- trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde 2011-06-22 18:59:30 UTC (rev 4142) +++ trunk/software/firmware/FiveD_GCode/FiveD_GCode_Interpreter/FiveD_GCode_Interpreter.pde 2011-06-28 17:08:09 UTC (rev 4143) @@ -1,8 +1,8 @@ #include <ctype.h> #include <stdio.h> +#include "WProgram.h" #include <HardwareSerial.h> #include <avr/pgmspace.h> -#include "WProgram.h" #include "vectors.h" #include "features.h" #include "configuration.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rhy...@us...> - 2011-06-22 18:59:36
|
Revision: 4142 http://reprap.svn.sourceforge.net/reprap/?rev=4142&view=rev Author: rhys-jones Date: 2011-06-22 18:59:30 +0000 (Wed, 22 Jun 2011) Log Message: ----------- Fixing some errors in the x caarriage STL. STL's created using Viks openscad release rather than the original solid edge model. Modified Paths: -------------- trunk/mendel/mechanics/solid-models/cartesian-robot-m4/printed-parts/x-carriage-lower_1off.stl trunk/mendel/mechanics/solid-models/cartesian-robot-m4/printed-parts/x-carriage-upper_1off.stl Modified: trunk/mendel/mechanics/solid-models/cartesian-robot-m4/printed-parts/x-carriage-lower_1off.stl =================================================================== (Binary files differ) Modified: trunk/mendel/mechanics/solid-models/cartesian-robot-m4/printed-parts/x-carriage-upper_1off.stl =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-06-18 10:52:36
|
Revision: 4141 http://reprap.svn.sourceforge.net/reprap/?rev=4141&view=rev Author: adrian-bowyer Date: 2011-06-18 10:52:29 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Fixed bug whereby java.awt buttons disappeared when tabs were selected by replacing them with javax.swing buttons. Modified Paths: -------------- trunk/software/host/.classpath trunk/software/host/src/org/reprap/gui/botConsole/BotConsoleFrame.java trunk/software/host/src/org/reprap/gui/botConsole/PrintTabFrame.java trunk/software/host/src/org/reprap/gui/botConsole/bedPanel.java Modified: trunk/software/host/.classpath =================================================================== --- trunk/software/host/.classpath 2011-06-16 19:38:22 UTC (rev 4140) +++ trunk/software/host/.classpath 2011-06-18 10:52:29 UTC (rev 4141) @@ -7,7 +7,7 @@ <classpathentry kind="lib" path="lib/j3d-org-java3d-all.jar"/> <classpathentry kind="lib" path="lib/j3dutils.jar"/> <classpathentry kind="lib" path="lib/vecmath.jar"/> - <classpathentry kind="lib" path="lib/swing-layout-1.0.3.jar"/> <classpathentry kind="lib" path="lib/RXTXcomm.jar"/> + <classpathentry kind="lib" path="lib/swing-layout-1.0.4.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Modified: trunk/software/host/src/org/reprap/gui/botConsole/BotConsoleFrame.java =================================================================== --- trunk/software/host/src/org/reprap/gui/botConsole/BotConsoleFrame.java 2011-06-16 19:38:22 UTC (rev 4140) +++ trunk/software/host/src/org/reprap/gui/botConsole/BotConsoleFrame.java 2011-06-18 10:52:29 UTC (rev 4141) @@ -179,7 +179,40 @@ if (extruderCount < 1) throw new Exception("A Reprap printer must contain at least one extruder"); } + private void initialiseExtruderPanels() { + + extruderPanels = new GenericExtruderTabPanel[extruderCount]; + for (int i = 0; i < extruderCount; i++) { + extruderPanels[i] = new GenericExtruderTabPanel(); + try { + extruderPanels[i].initialiseExtruders(i); + } + catch (Exception e) { + System.out.println("Failure trying to initialise extruders in botConsole: " + e); + JOptionPane.showMessageDialog(null, e.getMessage()); + return; + } + try { + extruderPanels[i].setPrefs(); + } + catch (Exception e) { + System.out.println("Problem loading prefs for Extruder " + i); + JOptionPane.showMessageDialog(null, "Problem loading prefs for Extruder " + i); + } + } + } + private void addExtruderPanels() { + + xYZTabPanel = new org.reprap.gui.botConsole.XYZTabPanel(); + + jTabbedPane1.addTab("XYZ", xYZTabPanel); + for (int i = 0; i < extruderCount; i++) { + jTabbedPane1.addTab("Extruder " + i, extruderPanels[i]); + } + pack(); + } + /** This method is called from within the constructor to * initialize the form. @@ -191,7 +224,7 @@ jTabbedPane1 = new javax.swing.JTabbedPane(); initialiseExtruderPanels(); - printTabFrame1 = new org.reprap.gui.botConsole.PrintTabFrame(); + printTabFrame1 = new org.reprap.gui.botConsole.PrintTabFrame(false); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); @@ -214,7 +247,7 @@ .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 400, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(5, Short.MAX_VALUE)) ); - + pack(); }// </editor-fold>//GEN-END:initComponents @@ -278,43 +311,10 @@ return bcf.extruderPanels[0]; } - private void initialiseExtruderPanels() { + - extruderPanels = new GenericExtruderTabPanel[extruderCount]; - for (int i = 0; i < extruderCount; i++) { - extruderPanels[i] = new GenericExtruderTabPanel(); - try { - extruderPanels[i].initialiseExtruders(i); - } - catch (Exception e) { - System.out.println("Failure trying to initialise extruders in botConsole: " + e); - JOptionPane.showMessageDialog(null, e.getMessage()); - return; - } - try { - extruderPanels[i].setPrefs(); - } - catch (Exception e) { - System.out.println("Problem loading prefs for Extruder " + i); - JOptionPane.showMessageDialog(null, "Problem loading prefs for Extruder " + i); - } - } - } - - private void addExtruderPanels() { - - xYZTabPanel = new org.reprap.gui.botConsole.XYZTabPanel(); - jTabbedPane1.addTab("XYZ", xYZTabPanel); - for (int i = 0; i < extruderCount; i++) { - jTabbedPane1.addTab("Extruder " + i, extruderPanels[i]); - } - pack(); - } - - - private int extruderCount; //private int currentExtruder; Modified: trunk/software/host/src/org/reprap/gui/botConsole/PrintTabFrame.java =================================================================== --- trunk/software/host/src/org/reprap/gui/botConsole/PrintTabFrame.java 2011-06-16 19:38:22 UTC (rev 4140) +++ trunk/software/host/src/org/reprap/gui/botConsole/PrintTabFrame.java 2011-06-18 10:52:29 UTC (rev 4141) @@ -23,7 +23,8 @@ * * @author ensab */ -public class PrintTabFrame extends javax.swing.JInternalFrame { +public class PrintTabFrame extends javax.swing.JInternalFrame {//AB99 +//public class PrintTabFrame extends javax.swing.JPanel { private static final long serialVersionUID = 1L; private BotConsoleFrame parentBotConsoleFrame = null; // private XYZTabPanel xYZTabPanel = null; @@ -39,8 +40,8 @@ private boolean gcodeLoaded = false; /** Creates new form PrintTabFrame */ - public PrintTabFrame() { - initComponents(); + public PrintTabFrame(boolean pref) { + initComponents(pref); String machine = "simulator"; //toSNAPRepRapRadioButton.setSelected(false); @@ -141,13 +142,71 @@ * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents - private void initComponents() { + private void initComponents(boolean pref) { buttonGroup1 = new javax.swing.ButtonGroup(); - printButton = new java.awt.Button(); - pcbButton = new java.awt.Button(); - pauseButton = new java.awt.Button(); - stopButton = new java.awt.Button(); - exitButton = new java.awt.Button(); + + // if(pref) + // { + //preferencesButton = new java.awt.Button(); + preferencesButton = new javax.swing.JButton(); + preferencesButton.setActionCommand("preferences"); + preferencesButton.setBackground(new java.awt.Color(255, 102, 255)); + preferencesButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + preferences(evt); + } + }); + //preferencesButton.setLabel("Preferences"); + preferencesButton.setText("Preferences"); + // return; + // } + + // If this isn't here it falls over. God knows why... + dummyButton = new java.awt.Button(); + dummyButton.setActionCommand("dummy"); + dummyButton.setBackground(new java.awt.Color(238, 238, 238)); + dummyButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + dummy(evt); + } + }); + dummyButton.setLabel(" "); + + + printButton = new javax.swing.JButton(); + pcbButton = new javax.swing.JButton(); + pauseButton = new javax.swing.JButton(); + stopButton = new javax.swing.JButton(); + exitButton = new javax.swing.JButton(); + loadSTL = new javax.swing.JButton(); + loadGCode = new javax.swing.JButton(); + loadRFO = new javax.swing.JButton(); +// preferencesButton = new javax.swing.JButton(); + saveRFO = new javax.swing.JButton(); + + // printButton = new java.awt.Button(); + // pcbButton = new java.awt.Button(); + // pauseButton = new java.awt.Button(); + // stopButton = new java.awt.Button(); + // exitButton = new java.awt.Button(); + // loadSTL = new java.awt.Button(); + // loadGCode = new java.awt.Button(); + // loadRFO = new java.awt.Button(); + +// saveRFO = new java.awt.Button(); + + + printButton.setText("Print"); + pcbButton.setText("PCB"); + pauseButton.setText("Pause"); + stopButton.setText("STOP !"); + exitButton.setText("Exit"); + loadSTL.setText("Load STL"); + loadGCode.setText("Load GCode"); + loadRFO.setText("Load RFO"); + saveRFO.setText("Save RFO"); + + layerPauseCheck = new javax.swing.JCheckBox(); layerPause(false); //toSNAPRepRapRadioButton = new javax.swing.JRadioButton(); @@ -160,20 +219,18 @@ progressLabel = new javax.swing.JLabel(); currentLayerOutOfN = new javax.swing.JLabel(); progressBar = new javax.swing.JProgressBar(); - loadSTL = new java.awt.Button(); - loadGCode = new java.awt.Button(); + gCodeToFileRadioButton = new javax.swing.JRadioButton(); - loadRFO = new java.awt.Button(); + toGCodeRepRapRadioButton = new javax.swing.JRadioButton(); fileNameBox = new javax.swing.JLabel(); - preferencesButton = new java.awt.Button(); - saveRFO = new java.awt.Button(); + displayPathsCheck = new javax.swing.JCheckBox(); displayPaths(false); printButton.setBackground(new java.awt.Color(51, 204, 0)); printButton.setFont(printButton.getFont()); - printButton.setLabel("Print"); // NOI18N + // NOI18N printButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { printButtonActionPerformed(evt); @@ -182,7 +239,7 @@ pcbButton.setBackground(new java.awt.Color(152, 99, 62)); pcbButton.setFont(pcbButton.getFont()); - pcbButton.setLabel("PCB"); // NOI18N + // NOI18N pcbButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pcbButtonActionPerformed(evt); @@ -190,7 +247,7 @@ }); pauseButton.setBackground(new java.awt.Color(255, 204, 0)); - pauseButton.setLabel("Pause"); // NOI18N + // NOI18N pauseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pauseButtonActionPerformed(evt); @@ -199,14 +256,14 @@ stopButton.setBackground(new java.awt.Color(255, 0, 0)); stopButton.setFont(new java.awt.Font("Dialog", 1, 12)); - stopButton.setLabel("STOP !"); // NOI18N + // NOI18N stopButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stopButtonActionPerformed(evt); } }); - exitButton.setLabel("Exit"); + exitButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitButtonActionPerformed(evt); @@ -220,13 +277,6 @@ } }); -// buttonGroup1.add(toSNAPRepRapRadioButton); -// toSNAPRepRapRadioButton.setText("Print on SNAP RepRap"); -// toSNAPRepRapRadioButton.addMouseListener(new java.awt.event.MouseAdapter() { -// public void mousePressed(java.awt.event.MouseEvent evt) { -// selectorRadioButtonMousePressed(evt); -// } -// }); getWebPage.setIcon(new javax.swing.ImageIcon( ClassLoader.getSystemResource("rr-logo-green-url.png"))); // NOI18N @@ -260,7 +310,7 @@ loadSTL.setActionCommand("loadSTL"); loadSTL.setBackground(new java.awt.Color(0, 204, 255)); - loadSTL.setLabel("Load STL"); // NOI18N + // NOI18N loadSTL.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadSTL(evt); @@ -269,7 +319,7 @@ loadGCode.setActionCommand("loadGCode"); loadGCode.setBackground(new java.awt.Color(0, 204, 255)); - loadGCode.setLabel("Load GCode"); // NOI18N + // NOI18N loadGCode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LoadGCode(evt); @@ -286,7 +336,7 @@ loadRFO.setActionCommand("loadRFO"); loadRFO.setBackground(new java.awt.Color(0, 204, 255)); - loadRFO.setLabel("Load RFO"); // NOI18N + // NOI18N loadRFO.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadRFO(evt); @@ -304,24 +354,40 @@ fileNameBox.setFont(new java.awt.Font("Tahoma", 0, 12)); fileNameBox.setText(" - "); - preferencesButton.setActionCommand("preferences"); - preferencesButton.setBackground(new java.awt.Color(255, 102, 255)); - preferencesButton.setLabel("Preferences"); // NOI18N - preferencesButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - preferences(evt); - } - }); + saveRFO.setActionCommand("saveRFO"); saveRFO.setBackground(new java.awt.Color(153, 153, 153)); - saveRFO.setLabel("Save RFO"); // NOI18N + // NOI18N saveRFO.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveRFO(evt); } }); + + + + + + + + + // printButton.setLabel("Print"); + // pcbButton.setLabel("PCB"); + // pauseButton.setLabel("Pause"); +// stopButton.setLabel("STOP !"); +// exitButton.setLabel("Exit"); +// loadSTL.setLabel("Load STL"); +// loadGCode.setLabel("Load GCode"); +// loadRFO.setLabel("Load RFO"); + +// saveRFO.setLabel("Save RFO"); + + + + + displayPathsCheck.setText("Display paths"); displayPathsCheck.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { @@ -329,8 +395,9 @@ } }); - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); + org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());//AB99 getContentPane().setLayout(layout); + //this.setLayout(layout);//AB99 layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() @@ -338,12 +405,12 @@ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(pcbButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(saveRFO, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(loadGCode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(pcbButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(saveRFO, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(loadGCode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(loadRFO, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(loadSTL, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) + .add(loadRFO, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(loadSTL, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) //.add(toSNAPRepRapRadioButton) @@ -356,15 +423,19 @@ .add(layout.createSequentialGroup() .add(preferencesButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(getWebPage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 190, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(dummyButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(getWebPage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 190, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + ) .add(layout.createSequentialGroup() + .add(printButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) //.add(pcbButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) //.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(pauseButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 78, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(stopButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 75, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(stopButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 85, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(exitButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 62, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(layout.createSequentialGroup() @@ -397,7 +468,8 @@ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(getWebPage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(getWebPage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 72, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + ) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() @@ -411,7 +483,9 @@ .add(toGCodeRepRapRadioButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(gCodeToFileRadioButton)) - .add(preferencesButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(preferencesButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(dummyButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + ) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() @@ -451,8 +525,8 @@ .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap(24, Short.MAX_VALUE)) ); - - pack(); + + //pack(); //AB99 }// </editor-fold>//GEN-END:initComponents private void printButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printButtonActionPerformed @@ -765,6 +839,10 @@ prefs.setVisible(true); // prefs.show(); }//GEN-LAST:event_preferences +private void dummy(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_preferences + +}//GEN-LAST:event_preferences + private void saveRFO(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveRFO if(!SLoadOK) return; @@ -838,27 +916,50 @@ private javax.swing.ButtonGroup buttonGroup1; private javax.swing.JLabel currentLayerOutOfN; private javax.swing.JCheckBox displayPathsCheck; - private java.awt.Button exitButton; + private javax.swing.JLabel expectedBuildTime; private javax.swing.JLabel expectedBuildTimeLabel; private javax.swing.JLabel expectedFinishTime; private javax.swing.JLabel expectedFinishTimeLabel; private javax.swing.JLabel fileNameBox; private javax.swing.JRadioButton gCodeToFileRadioButton; - private javax.swing.JButton getWebPage; + private javax.swing.JLabel hoursMinutesLabel1; private javax.swing.JCheckBox layerPauseCheck; - private java.awt.Button loadGCode; - private java.awt.Button loadRFO; - private java.awt.Button loadSTL; - private java.awt.Button pauseButton; - private java.awt.Button preferencesButton; - private java.awt.Button printButton; - private java.awt.Button pcbButton; + + private javax.swing.JButton getWebPage; + + private javax.swing.JButton loadGCode; + private javax.swing.JButton loadRFO; + private javax.swing.JButton loadSTL; + private javax.swing.JButton pauseButton; + private javax.swing.JButton preferencesButton; + private javax.swing.JButton printButton; + private javax.swing.JButton pcbButton; + private javax.swing.JButton exitButton; + private javax.swing.JButton saveRFO; + private javax.swing.JButton stopButton; + + + + // private java.awt.Button loadGCode; + // private java.awt.Button loadRFO; +// private java.awt.Button loadSTL; +// private java.awt.Button pauseButton; +// private java.awt.Button preferencesButton; + + private java.awt.Button dummyButton; +// private java.awt.Button printButton; +// private java.awt.Button pcbButton; +// private java.awt.Button exitButton; +// private java.awt.Button saveRFO; +// private java.awt.Button stopButton; + + + private javax.swing.JProgressBar progressBar; private javax.swing.JLabel progressLabel; - private java.awt.Button saveRFO; - private java.awt.Button stopButton; + private javax.swing.JRadioButton toGCodeRepRapRadioButton; //private javax.swing.JRadioButton toSNAPRepRapRadioButton; // End of variables declaration//GEN-END:variables Modified: trunk/software/host/src/org/reprap/gui/botConsole/bedPanel.java =================================================================== --- trunk/software/host/src/org/reprap/gui/botConsole/bedPanel.java 2011-06-16 19:38:22 UTC (rev 4140) +++ trunk/software/host/src/org/reprap/gui/botConsole/bedPanel.java 2011-06-18 10:52:29 UTC (rev 4141) @@ -1,176 +1,176 @@ /* * * !!!!! - * NOTE: PLEASE ONLY EDIT THIS USING THE NETBEANS IDE 6.0.1 OR HIGHER!!!! - * !!!!! - * - * ... an .xml file is associated with this class. Cheers. - * - * bedPanel.java - * - * Created on 30 March 2008, 18:55 - */ - -package org.reprap.gui.botConsole; - -import java.awt.Color; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; -import java.awt.font.FontRenderContext; -import java.awt.geom.Line2D; -import java.awt.geom.Point2D; - -/** - * - * @author reprap - */ -public class bedPanel extends javax.swing.JPanel { - private static final long serialVersionUID = 1L; - private final int CROSS_HAIR_SIZE = 10; - private Line2D.Double a1, a2, b1, b2; - private Point2D.Double aDatum, bDatum; - private int x; - private int y; - private Font font; - private int fontSize; - - /** Creates new form bedPanel */ - public bedPanel() { - - // First cross hair - aDatum = new Point2D.Double(); - a1 = new Line2D.Double(); - a2 = new Line2D.Double(); - - // History cross hair - bDatum = new Point2D.Double(); - b1 = new Line2D.Double(); - b2 = new Line2D.Double(); - - initComponents(); - - } - - public void setDimensions() { - x = this.getWidth(); - y = this.getHeight(); - - // Text imitialisation - fontSize = (int)(y/20); - font = new Font("dialog", Font.PLAIN, fontSize); - repaint(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents - private void initComponents() { - - setBackground(java.awt.Color.white); - setMaximumSize(new java.awt.Dimension(200, 200)); - setMinimumSize(new java.awt.Dimension(200, 200)); - setPreferredSize(new java.awt.Dimension(200, 200)); - - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 200, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 200, Short.MAX_VALUE) - ); - }// </editor-fold>//GEN-END:initComponents - - public void mousePressed() { - unClicked = false; - } - - public void updateCrossHair(int posX, int posY) { - - c = Color.black; - - aDatum.setLocation(posX, posY); - a1.setLine(aDatum.getX(), aDatum.getY()-CROSS_HAIR_SIZE, aDatum.getX(), aDatum.getY()+CROSS_HAIR_SIZE); - a2.setLine(aDatum.getX()-CROSS_HAIR_SIZE, aDatum.getY(), aDatum.getX()+CROSS_HAIR_SIZE, aDatum.getY()); - - updateOldPosition(posX, posY); - - repaint(); - } - - public void updateOldPosition(int posX, int posY) { - - bDatum.setLocation(posX, posY); - b1.setLine(bDatum.getX(), bDatum.getY()-CROSS_HAIR_SIZE/2, bDatum.getX(), bDatum.getY()+CROSS_HAIR_SIZE/2); - b2.setLine(bDatum.getX()-CROSS_HAIR_SIZE/2, bDatum.getY(), bDatum.getX()+CROSS_HAIR_SIZE/2, bDatum.getY()); - } - - public void dragCrossHair(int posX, int posY) { - - c = Color.red; - - aDatum.setLocation(posX, posY); - a1.setLine(aDatum.getX(), aDatum.getY()-x, aDatum.getX(), aDatum.getY()+x); - a2.setLine(aDatum.getX()-x, aDatum.getY(), aDatum.getX()+x, aDatum.getY()); - - repaint(); - } - - public void paintComponent(Graphics g) { - super.paintComponent(g); - Graphics2D g2 = (Graphics2D)g; - g2.setRenderingHint( - RenderingHints.KEY_ANTIALIASING, - RenderingHints.VALUE_ANTIALIAS_ON); - g2.setRenderingHint( - RenderingHints.KEY_COLOR_RENDERING, - RenderingHints.VALUE_COLOR_RENDER_SPEED); - g2.setRenderingHint( - RenderingHints.KEY_RENDERING, - RenderingHints.VALUE_RENDER_SPEED); - g2.setColor(c); - g2.draw(a1); - g2.draw(a2); - - g2.setColor(Color.gray); - g2.draw(b1); - g2.draw(b2); - - if (unClicked) { - g2.setFont(font); - FontRenderContext frc = g2.getFontRenderContext(); - - float width; - float sx; - float sy; - float lineHeight = font.getSize(); - float space = font.getSize()/4; - int lines = s.length; - - for (int i = 0; i < lines; i++) { - width = (float)font.getStringBounds(s[i], frc).getWidth(); - sx = (x - width)/2; - sy = y/2+(lineHeight)/2 - (lines-1)*((lineHeight+space)/2) + (i*(lineHeight+space)); - g2.drawString(s[i], sx, sy); - } - } - } - - private Color c; - private boolean unClicked = true; - private String s1 = "Click to load new coordinates"; - private String s2 = "Drag for cross-hairs"; - private String s3 = ""; //"Home X & Y axes first"; - private String[] s = new String[] { s3, s1, s2 }; - - // Variables declaration - do not modify//GEN-BEGIN:variables - // End of variables declaration//GEN-END:variables - -} +// * NOTE: PLEASE ONLY EDIT THIS USING THE NETBEANS IDE 6.0.1 OR HIGHER!!!! +// * !!!!! +// * +// * ... an .xml file is associated with this class. Cheers. +// * +// * bedPanel.java +// * +// * Created on 30 March 2008, 18:55 +// */ +// +//package org.reprap.gui.botConsole; +// +//import java.awt.Color; +//import java.awt.Font; +//import java.awt.Graphics; +//import java.awt.Graphics2D; +//import java.awt.RenderingHints; +//import java.awt.font.FontRenderContext; +//import java.awt.geom.Line2D; +//import java.awt.geom.Point2D; +// +///** +// * +// * @author reprap +// */ +//public class bedPanel extends javax.swing.JPanel { +// private static final long serialVersionUID = 1L; +// private final int CROSS_HAIR_SIZE = 10; +// private Line2D.Double a1, a2, b1, b2; +// private Point2D.Double aDatum, bDatum; +// private int x; +// private int y; +// private Font font; +// private int fontSize; +// +// /** Creates new form bedPanel */ +// public bedPanel() { +// +// // First cross hair +// aDatum = new Point2D.Double(); +// a1 = new Line2D.Double(); +// a2 = new Line2D.Double(); +// +// // History cross hair +// bDatum = new Point2D.Double(); +// b1 = new Line2D.Double(); +// b2 = new Line2D.Double(); +// +// initComponents(); +// +// } +// +// public void setDimensions() { +// x = this.getWidth(); +// y = this.getHeight(); +// +// // Text imitialisation +// fontSize = (int)(y/20); +// font = new Font("dialog", Font.PLAIN, fontSize); +// repaint(); +// } +// +// /** This method is called from within the constructor to +// * initialize the form. +// * WARNING: Do NOT modify this code. The content of this method is +// * always regenerated by the Form Editor. +// */ +// // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents +// private void initComponents() { +// +// setBackground(java.awt.Color.white); +// setMaximumSize(new java.awt.Dimension(200, 200)); +// setMinimumSize(new java.awt.Dimension(200, 200)); +// setPreferredSize(new java.awt.Dimension(200, 200)); +// +// org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); +// this.setLayout(layout); +// layout.setHorizontalGroup( +// layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) +// .add(0, 200, Short.MAX_VALUE) +// ); +// layout.setVerticalGroup( +// layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) +// .add(0, 200, Short.MAX_VALUE) +// ); +// }// </editor-fold>//GEN-END:initComponents +// +// public void mousePressed() { +// unClicked = false; +// } +// +// public void updateCrossHair(int posX, int posY) { +// +// c = Color.black; +// +// aDatum.setLocation(posX, posY); +// a1.setLine(aDatum.getX(), aDatum.getY()-CROSS_HAIR_SIZE, aDatum.getX(), aDatum.getY()+CROSS_HAIR_SIZE); +// a2.setLine(aDatum.getX()-CROSS_HAIR_SIZE, aDatum.getY(), aDatum.getX()+CROSS_HAIR_SIZE, aDatum.getY()); +// +// updateOldPosition(posX, posY); +// +// repaint(); +// } +// +// public void updateOldPosition(int posX, int posY) { +// +// bDatum.setLocation(posX, posY); +// b1.setLine(bDatum.getX(), bDatum.getY()-CROSS_HAIR_SIZE/2, bDatum.getX(), bDatum.getY()+CROSS_HAIR_SIZE/2); +// b2.setLine(bDatum.getX()-CROSS_HAIR_SIZE/2, bDatum.getY(), bDatum.getX()+CROSS_HAIR_SIZE/2, bDatum.getY()); +// } +// +// public void dragCrossHair(int posX, int posY) { +// +// c = Color.red; +// +// aDatum.setLocation(posX, posY); +// a1.setLine(aDatum.getX(), aDatum.getY()-x, aDatum.getX(), aDatum.getY()+x); +// a2.setLine(aDatum.getX()-x, aDatum.getY(), aDatum.getX()+x, aDatum.getY()); +// +// repaint(); +// } +// +// public void paintComponent(Graphics g) { +// super.paintComponent(g); +// Graphics2D g2 = (Graphics2D)g; +// g2.setRenderingHint( +// RenderingHints.KEY_ANTIALIASING, +// RenderingHints.VALUE_ANTIALIAS_ON); +// g2.setRenderingHint( +// RenderingHints.KEY_COLOR_RENDERING, +// RenderingHints.VALUE_COLOR_RENDER_SPEED); +// g2.setRenderingHint( +// RenderingHints.KEY_RENDERING, +// RenderingHints.VALUE_RENDER_SPEED); +// g2.setColor(c); +// g2.draw(a1); +// g2.draw(a2); +// +// g2.setColor(Color.gray); +// g2.draw(b1); +// g2.draw(b2); +// +// if (unClicked) { +// g2.setFont(font); +// FontRenderContext frc = g2.getFontRenderContext(); +// +// float width; +// float sx; +// float sy; +// float lineHeight = font.getSize(); +// float space = font.getSize()/4; +// int lines = s.length; +// +// for (int i = 0; i < lines; i++) { +// width = (float)font.getStringBounds(s[i], frc).getWidth(); +// sx = (x - width)/2; +// sy = y/2+(lineHeight)/2 - (lines-1)*((lineHeight+space)/2) + (i*(lineHeight+space)); +// g2.drawString(s[i], sx, sy); +// } +// } +// } +// +// private Color c; +// private boolean unClicked = true; +// private String s1 = "Click to load new coordinates"; +// private String s2 = "Drag for cross-hairs"; +// private String s3 = ""; //"Home X & Y axes first"; +// private String[] s = new String[] { s3, s1, s2 }; +// +// // Variables declaration - do not modify//GEN-BEGIN:variables +// // End of variables declaration//GEN-END:variables +// +//} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-06-16 19:38:28
|
Revision: 4140 http://reprap.svn.sourceforge.net/reprap/?rev=4140&view=rev Author: adrian-bowyer Date: 2011-06-16 19:38:22 +0000 (Thu, 16 Jun 2011) Log Message: ----------- Removed bug whereby leading and trailing spaces in the serial port name would mean that it was not found. Modified Paths: -------------- trunk/software/host/.classpath trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java Added Paths: ----------- trunk/software/host/lib/swing-layout-1.0.4.jar Modified: trunk/software/host/.classpath =================================================================== --- trunk/software/host/.classpath 2011-06-12 11:02:28 UTC (rev 4139) +++ trunk/software/host/.classpath 2011-06-16 19:38:22 UTC (rev 4140) @@ -6,8 +6,8 @@ <classpathentry kind="lib" path="lib/j3dcore.jar"/> <classpathentry kind="lib" path="lib/j3d-org-java3d-all.jar"/> <classpathentry kind="lib" path="lib/j3dutils.jar"/> + <classpathentry kind="lib" path="lib/vecmath.jar"/> + <classpathentry kind="lib" path="lib/swing-layout-1.0.3.jar"/> <classpathentry kind="lib" path="lib/RXTXcomm.jar"/> - <classpathentry kind="lib" path="lib/swing-layout-1.0.3.jar"/> - <classpathentry kind="lib" path="lib/vecmath.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Added: trunk/software/host/lib/swing-layout-1.0.4.jar =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/swing-layout-1.0.4.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java =================================================================== --- trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java 2011-06-12 11:02:28 UTC (rev 4139) +++ trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java 2011-06-16 19:38:22 UTC (rev 4140) @@ -840,6 +840,8 @@ serialInStream = null; serialOutStream = null; + portName = portName.trim(); + //open our port. Debug.d("GCode opening port " + portName); Main.setRepRapPresent(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Rhy...@us...> - 2011-06-12 11:02:34
|
Revision: 4139 http://reprap.svn.sourceforge.net/reprap/?rev=4139&view=rev Author: Rhys-Jones Date: 2011-06-12 11:02:28 +0000 (Sun, 12 Jun 2011) Log Message: ----------- Fixing some firmware bugs Modified Paths: -------------- trunk/software/firmware/Tonokip_Firmware/configuration.h Modified: trunk/software/firmware/Tonokip_Firmware/configuration.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-06-12 10:06:20 UTC (rev 4138) +++ trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-06-12 11:02:28 UTC (rev 4139) @@ -105,7 +105,7 @@ //Thermistor settings: //Uncomment for 10k thermistor -#include "BedThermistorTable_100k.h" +#include "BedThermistorTable_10k.h" //Thermistor settings: //Uncomment for 100k thermistor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Rhy...@us...> - 2011-06-12 10:06:28
|
Revision: 4138 http://reprap.svn.sourceforge.net/reprap/?rev=4138&view=rev Author: Rhys-Jones Date: 2011-06-12 10:06:20 +0000 (Sun, 12 Jun 2011) Log Message: ----------- Fixing some firmware bugs Modified Paths: -------------- trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_100k.h trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_200k.h trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k.h trunk/software/firmware/Tonokip_Firmware/ThermistorTable_200k.h trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde trunk/software/firmware/Tonokip_Firmware/configuration.h Added Paths: ----------- trunk/software/.project trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k.h Added: trunk/software/.project =================================================================== --- trunk/software/.project (rev 0) +++ trunk/software/.project 2011-06-12 10:06:20 UTC (rev 4138) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>software</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + </buildSpec> + <natures> + </natures> +</projectDescription> Modified: trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_100k.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_100k.h 2011-06-03 00:27:13 UTC (rev 4137) +++ trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_100k.h 2011-06-12 10:06:20 UTC (rev 4138) @@ -1,5 +1,5 @@ -#ifndef THERMISTORTABLE_H_ -#define THERMISTORTABLE_H_ +#ifndef BEDTHERMISTORTABLE_100K_H +#define BEDTHERMISTORTABLE_100K_H_ // Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) // See this page: Added: trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k.h (rev 0) +++ trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_10k.h 2011-06-12 10:06:20 UTC (rev 4138) @@ -0,0 +1,46 @@ +#ifndef BEDTHERMISTORTABLE_10K_H_ +#define BEDTHERMISTORTABLE_10K_H_ + +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) + + + +// RS thermistor 484-0149; EPCOS B57550G103J +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=10000 --t0=25 --r1=0 --r2=4700 --beta=3480 --max-adc=1023 +// r0: 10000 +// t0: 25 +// r1: 0 +// r2: 4700 +// beta: 3480 +// max adc: 1023 +#define BNUMTEMPS 20 +short bedtemptable[BNUMTEMPS][2] = { + {1, 599}, + {54, 160}, + {107, 123}, + {160, 103}, + {213, 90}, + {266, 79}, + {319, 70}, + {372, 62}, + {425, 55}, + {478, 49}, + {531, 43}, + {584, 37}, + {637, 31}, + {690, 25}, + {743, 19}, + {796, 12}, + {849, 5}, + {902, -3}, + {955, -16}, + {1008, -42} +}; +#endif + + Modified: trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_200k.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_200k.h 2011-06-03 00:27:13 UTC (rev 4137) +++ trunk/software/firmware/Tonokip_Firmware/BedThermistorTable_200k.h 2011-06-12 10:06:20 UTC (rev 4138) @@ -1,5 +1,5 @@ -#ifndef THERMISTORTABLE_H_ -#define THERMISTORTABLE_H_ +#ifndef BEDTHERMISTORTABLE_200K_H_ +#define BEDTHERMISTORTABLE_200K_H_ // Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) // See this page: Modified: trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k.h 2011-06-03 00:27:13 UTC (rev 4137) +++ trunk/software/firmware/Tonokip_Firmware/ThermistorTable_100k.h 2011-06-12 10:06:20 UTC (rev 4138) @@ -1,11 +1,8 @@ -#ifndef THERMISTORTABLE_H_ -#define THERMISTORTABLE_H_ +#ifndef THERMISTORTABLE_100K_H_ +#define THERMISTORTABLE_100K_H_ -// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) -// See this page: -// http://dev.www.reprap.org/bin/view/Main/Thermistor -// for details of what goes in this table. -// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) + +//LabMakergearextruder // ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 // r0: 100000 // t0: 25 @@ -13,73 +10,68 @@ // r2: 4700 // beta: 4066 // max adc: 1023 - -#define NUMTEMPS 61 +#define NUMTEMPS 20 short temptable[NUMTEMPS][2] = { -{ 23 , 300 }, -{ 25 , 295 }, -{ 27 , 290 }, -{ 28 , 285 }, -{ 31 , 280 }, -{ 33 , 275 }, -{ 35 , 270 }, -{ 38 , 265 }, -{ 41 , 260 }, -{ 44 , 255 }, -{ 48 , 250 }, -{ 52 , 245 }, -{ 56 , 240 }, -{ 61 , 235 }, -{ 66 , 230 }, -{ 71 , 225 }, -{ 78 , 220 }, -{ 84 , 215 }, -{ 92 , 210 }, -{ 100 , 205 }, -{ 109 , 200 }, -{ 120 , 195 }, -{ 131 , 190 }, -{ 143 , 185 }, -{ 156 , 180 }, -{ 171 , 175 }, -{ 187 , 170 }, -{ 205 , 165 }, -{ 224 , 160 }, -{ 245 , 155 }, -{ 268 , 150 }, -{ 293 , 145 }, -{ 320 , 140 }, -{ 348 , 135 }, -{ 379 , 130 }, -{ 411 , 125 }, -{ 445 , 120 }, -{ 480 , 115 }, -{ 516 , 110 }, -{ 553 , 105 }, -{ 591 , 100 }, -{ 628 , 95 }, -{ 665 , 90 }, -{ 702 , 85 }, -{ 737 , 80 }, -{ 770 , 75 }, -{ 801 , 70 }, -{ 830 , 65 }, -{ 857 , 60 }, -{ 881 , 55 }, -{ 903 , 50 }, -{ 922 , 45 }, -{ 939 , 40 }, -{ 954 , 35 }, -{ 966 , 30 }, -{ 977 , 25 }, -{ 985 , 20 }, -{ 993 , 15 }, -{ 999 , 10 }, -{ 1004 , 5 }, -{ 1008 , 0 }, - + {1, 841}, + {54, 255}, + {107, 209}, + {160, 184}, + {213, 166}, + {266, 153}, + {319, 142}, + {372, 132}, + {425, 124}, + {478, 116}, + {531, 108}, + {584, 101}, + {637, 93}, + {690, 86}, + {743, 78}, + {796, 70}, + {849, 61}, + {902, 50}, + {955, 34}, + {1008, 3} }; +// Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) +// See this page: +// http://dev.www.reprap.org/bin/view/Main/Thermistor +// for details of what goes in this table. +// Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) +// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 +// r0: 100000 +// t0: 25 +// r1: 0 +//// r2: 4700 +//// beta: 4066 +//// max adc: 1023 +// +//#define NUMTEMPS 20 +//short temptable[NUMTEMPS][2] = { +// {1, 864}, +// {54, 258}, +// {107, 211}, +// {160, 185}, +// {213, 168}, +// {266, 154}, +// {319, 143}, +// {372, 133}, +// {425, 125}, +// {478, 116}, +// {531, 109}, +// {584, 101}, +// {637, 94}, +// {690, 87}, +// {743, 79}, +// {796, 70}, +// {849, 61}, +// {902, 50}, +// {955, 34}, +// {1008, 2} +//}; + + #endif Modified: trunk/software/firmware/Tonokip_Firmware/ThermistorTable_200k.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/ThermistorTable_200k.h 2011-06-03 00:27:13 UTC (rev 4137) +++ trunk/software/firmware/Tonokip_Firmware/ThermistorTable_200k.h 2011-06-12 10:06:20 UTC (rev 4138) @@ -1,5 +1,5 @@ -#ifndef THERMISTORTABLE_H_ -#define THERMISTORTABLE_H_ +#ifndef THERMISTORTABLE_200K_H_ +#define THERMISTORTABLE_200K_H_ // Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) // See this page: Modified: trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde =================================================================== --- trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-06-03 00:27:13 UTC (rev 4137) +++ trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-06-12 10:06:20 UTC (rev 4138) @@ -491,7 +491,7 @@ inline void home_x() { saved_feedrate = current_feedrate; - current_feedrate = 1500.0; + current_feedrate = 2500.0; current_to_dest(); if(X_MIN_PIN >= 0) destination_x = -2.0*X_MAX_LENGTH; @@ -510,7 +510,7 @@ inline void home_y() { saved_feedrate = current_feedrate; - current_feedrate = 1500.0; + current_feedrate = 2500.0; current_to_dest(); if(Y_MIN_PIN >= 0) destination_y = -2.0*Y_MAX_LENGTH; @@ -529,7 +529,7 @@ inline void home_z() { saved_feedrate = current_feedrate; - current_feedrate = 100.0; + current_feedrate = 50.0; current_to_dest(); if(Z_MIN_PIN >= 0) destination_z = -2.0*Z_MAX_LENGTH; Modified: trunk/software/firmware/Tonokip_Firmware/configuration.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-06-03 00:27:13 UTC (rev 4137) +++ trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-06-12 10:06:20 UTC (rev 4138) @@ -3,7 +3,7 @@ // NO RS485/EXTRUDER CONTROLLER SUPPORT // PLEASE VERIFY PIN ASSIGNMENTS FOR YOUR CONFIGURATION!!!!!!! -#define MOTHERBOARD 6 // ATMEGA168 = 0, SANGUINO = 1, MOTHERBOARD = 2, MEGA/RAMPS = 3, ATMEGA328 = 4, Gen6 = 5, Sanguinololu = 6 +#define MOTHERBOARD 3 // ATMEGA168 = 0, SANGUINO = 1, MOTHERBOARD = 2, MEGA/RAMPS = 3, ATMEGA328 = 4, Gen6 = 5, Sanguinololu = 6 //Comment out to disable SD support //#define SDSUPPORT 1 @@ -68,14 +68,14 @@ // units are in millimeters or whatever length unit you prefer: inches,football-fields,parsecs etc //Calibration variables -float x_steps_per_unit = 91.42; -float y_steps_per_unit = 91.42; -float z_steps_per_unit = 5028.6; -float e_steps_per_unit = 30; +float x_steps_per_unit = 80; +float y_steps_per_unit = 80; +float z_steps_per_unit = 6667.184; +float e_steps_per_unit = 48; #ifdef REPRAP_ACC float f_steps_per_unit = 1; -float max_feedrate = 4000; +float max_feedrate = 12000; #else float max_feedrate = 200000; //mmm, acceleration! #endif @@ -100,13 +100,16 @@ const bool INVERT_X_DIR = false; const bool INVERT_Y_DIR = false; -const bool INVERT_Z_DIR = false; +const bool INVERT_Z_DIR = true; const bool INVERT_E_DIR = false; //Thermistor settings: +//Uncomment for 10k thermistor +#include "BedThermistorTable_100k.h" +//Thermistor settings: //Uncomment for 100k thermistor -//#include "ThermistorTable_100k.h" +#include "ThermistorTable_100k.h" //#include "BedThermistorTable_100k.h" //Uncomment for 200k thermistor @@ -114,11 +117,11 @@ //#include "BedThermistorTable_200k.h" //Identical thermistors on heater and bed - use this if you have no heated bed or if the thermistors are the same on both: -#include "ThermistorTable_200k.h" +//#include "ThermistorTable_200k.h" //#include "ThermistorTable_100k.h" //#include "ThermistorTable_mendelparts.h" -#define BNUMTEMPS NUMTEMPS -#define bedtemptable temptable +//#define BNUMTEMPS NUMTEMPS +//#define bedtemptable temptable //Endstop Settings #define ENDSTOPPULLUPS 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ree...@us...> - 2011-06-03 00:27:19
|
Revision: 4137 http://reprap.svn.sourceforge.net/reprap/?rev=4137&view=rev Author: reece-arnott2 Date: 2011-06-03 00:27:13 +0000 (Fri, 03 Jun 2011) Log Message: ----------- Added Paths: ----------- trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libgluegen-rt.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl_awt.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl_cg.so Removed Paths: ------------- trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl-cg.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxParallel.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxSerial.so Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libgluegen-rt.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libgluegen-rt.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl-cg.so =================================================================== (Binary files differ) Deleted: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl.so =================================================================== (Binary files differ) Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl_awt.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl_awt.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl_cg.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libjogl_cg.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxParallel.so =================================================================== (Binary files differ) Deleted: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxSerial.so =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ree...@us...> - 2011-06-03 00:22:33
|
Revision: 4136 http://reprap.svn.sourceforge.net/reprap/?rev=4136&view=rev Author: reece-arnott2 Date: 2011-06-03 00:22:27 +0000 (Fri, 03 Jun 2011) Log Message: ----------- Added Paths: ----------- trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libgluegen-rt.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl_awt.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl_cg.so Removed Paths: ------------- trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl-cg.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/librxtxSerial.so Added: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libgluegen-rt.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libgluegen-rt.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl-cg.so =================================================================== (Binary files differ) Deleted: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl.so =================================================================== (Binary files differ) Added: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl_awt.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl_awt.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl_cg.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libjogl_cg.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/librxtxSerial.so =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rhy...@us...> - 2011-05-20 13:41:43
|
Revision: 4135 http://reprap.svn.sourceforge.net/reprap/?rev=4135&view=rev Author: rhys-jones Date: 2011-05-20 13:41:37 +0000 (Fri, 20 May 2011) Log Message: ----------- Fixing percent infill bug Modified Paths: -------------- trunk/software/host/src/org/reprap/devices/GenericExtruder.java Modified: trunk/software/host/src/org/reprap/devices/GenericExtruder.java =================================================================== --- trunk/software/host/src/org/reprap/devices/GenericExtruder.java 2011-05-19 11:25:21 UTC (rev 4134) +++ trunk/software/host/src/org/reprap/devices/GenericExtruder.java 2011-05-20 13:41:37 UTC (rev 4135) @@ -411,10 +411,7 @@ extrusionTemp = Preferences.loadGlobalDouble(prefName + "ExtrusionTemp(C)"); extrusionSize = Preferences.loadGlobalDouble(prefName + "ExtrusionSize(mm)"); extrusionHeight = Preferences.loadGlobalDouble(prefName + "ExtrusionHeight(mm)"); - if (Preferences.loadGlobalDouble(prefName + "ExtrusionInfillWidth(mm)")==-1) - extrusionInfillWidth = extrusionSize/Preferences.loadGlobalDouble(prefName + "ExtrusionPercentInfill(0..1)"); - else - extrusionInfillWidth = Preferences.loadGlobalDouble(prefName + "ExtrusionInfillWidth(mm)"); + extrusionInfillWidth = Preferences.loadGlobalDouble(prefName + "ExtrusionInfillWidth(mm)"); lowerFineLayers = 2; //Preferences.loadGlobalInt(prefName + "LowerFineLayers(0...)"); upperFineLayers = 2; //Preferences.loadGlobalInt(prefName + "UpperFineLayers(0...)"); extrusionBroadWidth = Preferences.loadGlobalDouble(prefName + "ExtrusionBroadWidth(mm)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-19 11:25:27
|
Revision: 4134 http://reprap.svn.sourceforge.net/reprap/?rev=4134&view=rev Author: adrian-bowyer Date: 2011-05-19 11:25:21 +0000 (Thu, 19 May 2011) Log Message: ----------- Fixed bug where setting infill width negative didn't turn off infill. It should now do so. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java Modified: trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java 2011-05-18 11:35:58 UTC (rev 4133) +++ trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java 2011-05-19 11:25:21 UTC (rev 4134) @@ -2481,8 +2481,11 @@ */ public RrPolygonList hatch(RrHalfPlane hp, double gap, Attributes a) //, Rr2Point startNearHere) { - push("Computing hatching... "); + //push("Computing hatching... "); + if(gap <= 0) // Means the user has turned infill off for this; return an empty list. + return new RrPolygonList(); + RrRectangle big = box().scale(1.1); double d = Math.sqrt(big.dSquared()); @@ -2565,7 +2568,7 @@ RrPolygonList result = snakes.realPolygons(a).simplify(realResolution); //result = result.nearEnds(startNearHere); - pop(); + //pop(); return result; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-18 11:36:05
|
Revision: 4133 http://reprap.svn.sourceforge.net/reprap/?rev=4133&view=rev Author: adrian-bowyer Date: 2011-05-18 11:35:58 +0000 (Wed, 18 May 2011) Log Message: ----------- Small improvement to infill. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java Modified: trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java 2011-05-18 11:35:13 UTC (rev 4132) +++ trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java 2011-05-18 11:35:58 UTC (rev 4133) @@ -1004,11 +1004,10 @@ // Shapes will be outlined, and so need to be shrunk to allow for that. But they // must not also shrink from each other internally. So initially expand them so they overlap - // (The 0.75 is a bit of a hack, but it seems to work)... - infill.bridges = infill.bridges.offset(layerConditions, false, 0.75); - infill.insides = infill.insides.offset(layerConditions, false, 0.75); - infill.surfaces = infill.surfaces.offset(layerConditions, false, 0.75); + infill.bridges = infill.bridges.offset(layerConditions, false, 1); + infill.insides = infill.insides.offset(layerConditions, false, 1); + infill.surfaces = infill.surfaces.offset(layerConditions, false, 1); // Now intersect them with the slice so the outer edges are back where they should be. @@ -1033,62 +1032,6 @@ return infill.hatchedPolygons; - /* - - BooleanGridList adjacentSlices = slice(stl, layer+1, layerConditions); - BooleanGridList supportBeneath = null; - - adjacentSlices = BooleanGridList.intersections(slice(stl, layer+2, layerConditions), adjacentSlices); - supportBeneath = slice(stl, layer-1, layerConditions); - adjacentSlices = BooleanGridList.intersections(supportBeneath, adjacentSlices); - adjacentSlices = BooleanGridList.intersections(slice(stl, layer-2, layerConditions), adjacentSlices); - - BooleanGridList insides = null; - - // The insides are the bits that aren't surface. - // The outsides are the bits that are left when the insides are subtracted from the total. - // We grow the outsides just into the insides (nowhere else) to - // ensure that they go a little way into the inside infill. - - BooleanGridList nothingAbove = slice; - BooleanGridList unSupported = null; - BooleanGridList lands = null; - if(adjacentSlices != null && layerConditions.getModelLayer() > 1) - { - insides = BooleanGridList.intersections(slice, adjacentSlices); - nothingAbove = BooleanGridList.differences(slice, adjacentSlices, false); - unSupported = BooleanGridList.differences(nothingAbove, supportBeneath, true); - nothingAbove = BooleanGridList.differences(nothingAbove, unSupported, false); - nothingAbove = nothingAbove.offset(layerConditions, false, -2); - nothingAbove = BooleanGridList.intersections(nothingAbove, slice); - //lands = BooleanGridList.intersections(nothingAbove, insides); - unSupported = unSupported.offset(layerConditions, false, -2); // -2 indents us a little into the inside volume - unSupported = BooleanGridList.intersections(unSupported, slice); - } - - nothingAbove = nothingAbove.offset(layerConditions, false, 1); - if(unSupported != null) - unSupported = unSupported.offset(layerConditions, false, 1); - - if(insides != null) - { - insides = insides.offset(layerConditions, false, 1); - lands = BooleanGridList.intersections(unSupported, insides); - insides = BooleanGridList.differences(insides, nothingAbove, false); // Don't overplot the indented area - insides = BooleanGridList.differences(insides, unSupported, false); - } - - hatchedPolygons = nothingAbove.hatch(layerConditions, true, null); - if(unSupported != null && lands != null) - hatchedPolygons.add(bridges(unSupported, lands, layerConditions)); - - if(insides != null) - hatchedPolygons.add(insides.hatch(layerConditions, false, null)); - - return hatchedPolygons; - - */ - } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ree...@us...> - 2011-05-16 04:51:59
|
Revision: 4131 http://reprap.svn.sourceforge.net/reprap/?rev=4131&view=rev Author: reece-arnott2 Date: 2011-05-16 04:51:52 +0000 (Mon, 16 May 2011) Log Message: ----------- Added in Linux 64 bit libraries and changed the shell script to set the library path based on the machine type returned by 'uname -m'. To do this I needed to put the 32 bit and 64 bit libraries in seperate subfolders (lib-i686 and lib-x86_64). Also changed host-package-release to go up an additional folder when including machine-type (darwin/mendel/etc.) and electronics folders as folder structure seems to have changed since last time it was used. Modified Paths: -------------- trunk/software/host/host-package-release trunk/software/host/lib/system-dependent/linux-i386/reprap Added Paths: ----------- trunk/software/host/lib/system-dependent/linux-i386/lib-i686/ trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl-cg.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxParallel.so trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxSerial.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/ trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl-cg.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl.so trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/librxtxSerial.so Removed Paths: ------------- trunk/software/host/lib/system-dependent/linux-i386/libj3dcore-ogl-cg.so trunk/software/host/lib/system-dependent/linux-i386/libj3dcore-ogl.so trunk/software/host/lib/system-dependent/linux-i386/librxtxParallel.so trunk/software/host/lib/system-dependent/linux-i386/librxtxSerial.so Modified: trunk/software/host/host-package-release =================================================================== --- trunk/software/host/host-package-release 2011-05-11 21:10:40 UTC (rev 4130) +++ trunk/software/host/host-package-release 2011-05-16 04:51:52 UTC (rev 4131) @@ -21,7 +21,7 @@ # Where are all the other non-host-software files we need to include? DESIGNFILES="" -for i in ../$MACHINE ../electronics ../firmware +for i in ../../$MACHINE ../../electronics ../firmware do if [ -d "$i" ] then @@ -61,7 +61,7 @@ # Copy files into binary package directory for F in $FILELIST do - cp -p $F "$BASENAME" + cp -rp $F "$BASENAME" done echo "Executable created." @@ -85,14 +85,14 @@ mkdir -p "$SRCFILENAME"/lib for F in $LIBFILES do - cp -pr $F "$SRCFILENAME"/lib + cp -rp $F "$SRCFILENAME"/lib done echo "Sources copied." for F in $DESIGNFILES do - cp -pr $F "$BASENAME" + cp -rp $F "$BASENAME" done #Remove local configuration files Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl-cg.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl-cg.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/libj3dcore-ogl.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxParallel.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxParallel.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxSerial.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-i686/librxtxSerial.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl-cg.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl-cg.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/libj3dcore-ogl.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/librxtxSerial.so =================================================================== (Binary files differ) Property changes on: trunk/software/host/lib/system-dependent/linux-i386/lib-x86_64/librxtxSerial.so ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/software/host/lib/system-dependent/linux-i386/libj3dcore-ogl-cg.so =================================================================== (Binary files differ) Deleted: trunk/software/host/lib/system-dependent/linux-i386/libj3dcore-ogl.so =================================================================== (Binary files differ) Deleted: trunk/software/host/lib/system-dependent/linux-i386/librxtxParallel.so =================================================================== (Binary files differ) Deleted: trunk/software/host/lib/system-dependent/linux-i386/librxtxSerial.so =================================================================== (Binary files differ) Modified: trunk/software/host/lib/system-dependent/linux-i386/reprap =================================================================== --- trunk/software/host/lib/system-dependent/linux-i386/reprap 2011-05-11 21:10:40 UTC (rev 4130) +++ trunk/software/host/lib/system-dependent/linux-i386/reprap 2011-05-16 04:51:52 UTC (rev 4131) @@ -6,6 +6,12 @@ cd $REPRAP_DIR +MACHINE=`uname -m` + +# put the directory with the native RXTX and j3d libs in the library path +LD_LIBRARY_PATH=`pwd`/lib-${MACHINE}:${LD_LIBRARY_PATH} +export LD_LIBRARY_PATH + # build up classpath # when we move to OpenJDK/Java-6 these next few can be replaced with wildcard # *.jar and we will not need swing-layout any more. @@ -19,4 +25,4 @@ CLASSPATH=$CLASSPATH:. # invoke the code -java -cp $CLASSPATH -Xmx$REPRAP_RAM_SIZE -Djava.library.path=. org.reprap.Main +java -cp $CLASSPATH -Xmx$REPRAP_RAM_SIZE org.reprap.Main This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-11 21:10:46
|
Revision: 4130 http://reprap.svn.sourceforge.net/reprap/?rev=4130&view=rev Author: adrian-bowyer Date: 2011-05-11 21:10:40 +0000 (Wed, 11 May 2011) Log Message: ----------- Decided to plot outlines first, rather than either infill or outlines, whichever is nearest. Also, it now does outlines from the inside outwards. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/Producer.java trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java Modified: trunk/software/host/src/org/reprap/geometry/Producer.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/Producer.java 2011-05-11 17:56:30 UTC (rev 4129) +++ trunk/software/host/src/org/reprap/geometry/Producer.java 2011-05-11 21:10:40 UTC (rev 4130) @@ -265,7 +265,8 @@ } RrPolygonList allPolygons[] = new RrPolygonList[totalPhysicalExtruders]; - RrPolygonList tempPolygons[] = new RrPolygonList[totalPhysicalExtruders]; + RrPolygonList tempBorderPolygons[] = new RrPolygonList[totalPhysicalExtruders]; + RrPolygonList tempFillPolygons[] = new RrPolygonList[totalPhysicalExtruders]; boolean firstTimeRound = true; @@ -301,62 +302,56 @@ fills = fills.cullShorts(); shield = false; RrPolygonList support = allSTLs.computeSupport(stl, layerRules); - /* - borders = borders.nearEnds(startNearHere, false, -1); - if(borders.size() > 0) + for(int physicalExtruder = 0; physicalExtruder < allPolygons.length; physicalExtruder++) { - RrPolygon last = borders.polygon(borders.size() - 1); - startNearHere = last.point(last.size() - 1); + tempBorderPolygons[physicalExtruder] = new RrPolygonList(); + tempFillPolygons[physicalExtruder] = new RrPolygonList(); } - fills = fills.nearEnds(startNearHere, false, -1); - if(fills.size() > 0) - { - RrPolygon last = fills.polygon(fills.size() - 1); - startNearHere = last.point(last.size() - 1); - } - support = support.nearEnds(startNearHere, false, -1); - if(support.size() > 0) - { - RrPolygon last = support.polygon(support.size() - 1); - startNearHere = last.point(last.size() - 1); - } - */ - for(int physicalExtruder = 0; physicalExtruder < allPolygons.length; physicalExtruder++) - tempPolygons[physicalExtruder] = new RrPolygonList(); for(int pol = 0; pol < borders.size(); pol++) { - //shield = false; RrPolygon p = borders.polygon(pol); - tempPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); + tempBorderPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); } for(int pol = 0; pol < fills.size(); pol++) { - //shield = false; RrPolygon p = fills.polygon(pol); - tempPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); + tempFillPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); } for(int pol = 0; pol < support.size(); pol++) { - //shield = false; RrPolygon p = support.polygon(pol); - tempPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); + tempFillPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); } + for(int physicalExtruder = 0; physicalExtruder < allPolygons.length; physicalExtruder++) { - if(tempPolygons[physicalExtruder].size() > 0) + if(tempBorderPolygons[physicalExtruder].size() > 0) { - double linkUp = tempPolygons[physicalExtruder].polygon(0).getAttributes().getExtruder().getExtrusionSize(); + double linkUp = tempBorderPolygons[physicalExtruder].polygon(0).getAttributes().getExtruder().getExtrusionSize(); linkUp = (4*linkUp*linkUp); - tempPolygons[physicalExtruder].radicalReOrder(linkUp); - tempPolygons[physicalExtruder] = tempPolygons[physicalExtruder].nearEnds(startNearHere, false, -1); - if(tempPolygons[physicalExtruder].size() > 0) + tempBorderPolygons[physicalExtruder].radicalReOrder(linkUp); + tempBorderPolygons[physicalExtruder] = tempBorderPolygons[physicalExtruder].nearEnds(startNearHere, false, -1); + if(tempBorderPolygons[physicalExtruder].size() > 0) { - RrPolygon last = tempPolygons[physicalExtruder].polygon(tempPolygons[physicalExtruder].size() - 1); + RrPolygon last = tempBorderPolygons[physicalExtruder].polygon(tempBorderPolygons[physicalExtruder].size() - 1); startNearHere = last.point(last.size() - 1); } - allPolygons[physicalExtruder].add(tempPolygons[physicalExtruder]); + allPolygons[physicalExtruder].add(tempBorderPolygons[physicalExtruder]); } + if(tempFillPolygons[physicalExtruder].size() > 0) + { + double linkUp = tempFillPolygons[physicalExtruder].polygon(0).getAttributes().getExtruder().getExtrusionSize(); + linkUp = (4*linkUp*linkUp); + tempFillPolygons[physicalExtruder].radicalReOrder(linkUp); + tempFillPolygons[physicalExtruder] = tempFillPolygons[physicalExtruder].nearEnds(startNearHere, false, -1); + if(tempFillPolygons[physicalExtruder].size() > 0) + { + RrPolygon last = tempFillPolygons[physicalExtruder].polygon(tempFillPolygons[physicalExtruder].size() - 1); + startNearHere = last.point(last.size() - 1); + } + allPolygons[physicalExtruder].add(tempFillPolygons[physicalExtruder]); + } } } Modified: trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java 2011-05-11 17:56:30 UTC (rev 4129) +++ trunk/software/host/src/org/reprap/geometry/polygons/BooleanGridList.java 2011-05-11 21:10:40 UTC (rev 4130) @@ -115,6 +115,18 @@ } /** + * Reverse the order of the list + * @return + */ + public BooleanGridList reverse() + { + BooleanGridList result = new BooleanGridList(); + for(int i = size() - 1; i >= 0; i--) + result.add(get(i)); + return result; + } + + /** * Offset all the shapes in the list for this layer * @param lc * @param outline @@ -160,6 +172,7 @@ result.add(thisOne); shell++; } + result = result.reverse(); // Best to plot from the inside out } else { // Must be a hatch. Only do it if the gap is +ve or we're building the foundation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-11 17:56:36
|
Revision: 4129 http://reprap.svn.sourceforge.net/reprap/?rev=4129&view=rev Author: adrian-bowyer Date: 2011-05-11 17:56:30 +0000 (Wed, 11 May 2011) Log Message: ----------- Joining up polygons whose ends nearly match. Fixed minor bugs. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java Modified: trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java 2011-05-11 10:07:53 UTC (rev 4128) +++ trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java 2011-05-11 17:56:30 UTC (rev 4129) @@ -888,7 +888,7 @@ // Swap the odd half of the asymmetric cases so they're all the same - if(!myPolygon.isClosed() && itsPolygon.isClosed()) + if(myPolygon.isClosed() && !itsPolygon.isClosed()) { polygons.set(i, itsPolygon); polygons.set(j, myPolygon); @@ -942,29 +942,29 @@ polygons.remove(j); } - } else if(myPolygon.isClosed() && !itsPolygon.isClosed()) + } else if(!myPolygon.isClosed() && itsPolygon.isClosed()) { - // ... I'm closed; it's open - // Compare all my points with its two ends + // ... I'm open, it's closed; + // Compare my end points with all its points - reverseIt = false; - myPoint = myPolygon.nearestVertex(itsPolygon.point(0)); - d = Rr2Point.dSquared(myPolygon.point(myPoint), itsPolygon.point(0)); - myTempPoint = myPolygon.nearestVertex(itsPolygon.point(itsPolygon.size() - 1)); - d2 = Rr2Point.dSquared(myPolygon.point(myTempPoint), itsPolygon.point(itsPolygon.size() -1 )); + reverseMe = true; + itsPoint = itsPolygon.nearestVertex(myPolygon.point(0)); + d = Rr2Point.dSquared(itsPolygon.point(itsPoint), myPolygon.point(0)); + itsTempPoint = itsPolygon.nearestVertex(myPolygon.point(myPolygon.size() - 1)); + d2 = Rr2Point.dSquared(itsPolygon.point(itsTempPoint), myPolygon.point(myPolygon.size() - 1)); if(d2 < d) { - myPoint = myTempPoint; - reverseIt = true; + itsPoint = itsTempPoint; + reverseMe = false; d = d2; } if(d < linkUp) { - myPolygon = myPolygon.newStart(myPoint); - myPolygon.add(myPolygon.point(0)); // Make sure the first half really is closed - if(reverseIt) - itsPolygon = itsPolygon.negate(); + itsPolygon = itsPolygon.newStart(itsPoint); + itsPolygon.add(itsPolygon.point(0)); // Make sure the second half really is closed + if(reverseMe) + myPolygon = myPolygon.negate(); myPolygon.add(itsPolygon); myPolygon.setOpen(); // We were closed, but we must now be open polygons.set(i, myPolygon); @@ -993,8 +993,9 @@ myPolygon = myPolygon.newStart(myPoint); myPolygon.add(myPolygon.point(0)); // Make sure we come back to the start itsPolygon = itsPolygon.newStart(itsPoint); + itsPolygon.add(itsPolygon.point(0)); // Make sure we come back to the start myPolygon.add(itsPolygon); - myPolygon.setOpen(); // We were closed, but we must now be open + //myPolygon.setOpen(); // We were closed, but we must now be open polygons.set(i, myPolygon); polygons.remove(j); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-11 10:08:00
|
Revision: 4128 http://reprap.svn.sourceforge.net/reprap/?rev=4128&view=rev Author: adrian-bowyer Date: 2011-05-11 10:07:53 +0000 (Wed, 11 May 2011) Log Message: ----------- Implementation of Rhys's idea to join up polygons whose ends nearly match (within 2*filament-thickness). It also joins closed polygons which have any pair of points closer too. Tested, but experimental. Probably works best if you turn Middle Starts off for all extruders. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/Producer.java trunk/software/host/src/org/reprap/geometry/polygons/RrPolygon.java trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java trunk/software/host/src/org/reprap/machines/GCodeRepRap.java Modified: trunk/software/host/src/org/reprap/geometry/Producer.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/Producer.java 2011-05-09 08:46:20 UTC (rev 4127) +++ trunk/software/host/src/org/reprap/geometry/Producer.java 2011-05-11 10:07:53 UTC (rev 4128) @@ -265,6 +265,7 @@ } RrPolygonList allPolygons[] = new RrPolygonList[totalPhysicalExtruders]; + RrPolygonList tempPolygons[] = new RrPolygonList[totalPhysicalExtruders]; boolean firstTimeRound = true; @@ -300,7 +301,9 @@ fills = fills.cullShorts(); shield = false; RrPolygonList support = allSTLs.computeSupport(stl, layerRules); - borders = borders.nearEnds(startNearHere, false, -1); + /* + borders = borders.nearEnds(startNearHere, false, -1); + if(borders.size() > 0) { RrPolygon last = borders.polygon(borders.size() - 1); @@ -318,24 +321,43 @@ RrPolygon last = support.polygon(support.size() - 1); startNearHere = last.point(last.size() - 1); } + */ + for(int physicalExtruder = 0; physicalExtruder < allPolygons.length; physicalExtruder++) + tempPolygons[physicalExtruder] = new RrPolygonList(); for(int pol = 0; pol < borders.size(); pol++) { //shield = false; RrPolygon p = borders.polygon(pol); - allPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); + tempPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); } for(int pol = 0; pol < fills.size(); pol++) { //shield = false; RrPolygon p = fills.polygon(pol); - allPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); + tempPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); } for(int pol = 0; pol < support.size(); pol++) { //shield = false; RrPolygon p = support.polygon(pol); - allPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); + tempPolygons[p.getAttributes().getExtruder().getPhysicalExtruderNumber()].add(p); } + for(int physicalExtruder = 0; physicalExtruder < allPolygons.length; physicalExtruder++) + { + if(tempPolygons[physicalExtruder].size() > 0) + { + double linkUp = tempPolygons[physicalExtruder].polygon(0).getAttributes().getExtruder().getExtrusionSize(); + linkUp = (4*linkUp*linkUp); + tempPolygons[physicalExtruder].radicalReOrder(linkUp); + tempPolygons[physicalExtruder] = tempPolygons[physicalExtruder].nearEnds(startNearHere, false, -1); + if(tempPolygons[physicalExtruder].size() > 0) + { + RrPolygon last = tempPolygons[physicalExtruder].polygon(tempPolygons[physicalExtruder].size() - 1); + startNearHere = last.point(last.size() - 1); + } + allPolygons[physicalExtruder].add(tempPolygons[physicalExtruder]); + } + } } Modified: trunk/software/host/src/org/reprap/geometry/polygons/RrPolygon.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/RrPolygon.java 2011-05-09 08:46:20 UTC (rev 4127) +++ trunk/software/host/src/org/reprap/geometry/polygons/RrPolygon.java 2011-05-11 10:07:53 UTC (rev 4128) @@ -129,49 +129,23 @@ private int extrudeEnd; /** + * The squared distance from the end of the polygon of the extrude end + */ + private double extrudeEndDistance2; + + /** * The index of the last point at which the valve (if any) is open. */ private int valveEnd; /** - * Destroy me and all that I point to + * The squared distance from the end of the polygon of the valve end */ -// public void destroy() -// { -// if(beingDestroyed) // Prevent infinite loop -// return; -// beingDestroyed = true; -// -// if(speeds != null) -// { -// for(int i = 0; i < size(); i++) -// speeds.set(i, null); -// } -// speeds = null; -// -// if(points != null) -// { -// for(int i = 0; i < size(); i++) -// { -// points.get(i).destroy(); -// points.set(i, null); -// } -// } -// points = null; -// -// if(box != null) -// box.destroy(); -// box = null; -// -// // Don't destroy the attribute - that may still be needed -// -// //if(att != null) -// // att.destroy(); -// att = null; -// beingDestroyed = false; -// } + private double valveEndDistance2; + + /** * Make an empty polygon */ @@ -186,10 +160,28 @@ closed = c; extrudeEnd = -1; valveEnd = -1; + extrudeEndDistance2 = 0; + valveEndDistance2 = 0; pa = null; } /** + * Set the polygon as closed + */ + public void setClosed() + { + closed = true; + } + + /** + * Set the polygon not closed + */ + public void setOpen() + { + closed = false; + } + + /** * Get the data * @param i * @return i-th point object of polygon @@ -257,6 +249,31 @@ } /** + * Something has been done to the polygon that may require its + * extrude and valve endings to be updated + */ + private void updateExtrudeValveEnd() + { + if(extrudeEnd >= 0) + { + if(extrudeEndDistance2 <= 0) + { + extrudeEnd = -1; + extrudeEndDistance2 = 0; + return; + } + double d2 = 0; + System.out.println("Updating e..."); + } + if(valveEnd >= 0) + { + System.out.println("Updating v..."); + } + // if speeds are set, interpolate + } + + + /** * What's the last point to plot to? * @return */ @@ -308,6 +325,8 @@ closed = p.closed; extrudeEnd = p.extrudeEnd; valveEnd = p.valveEnd; + extrudeEndDistance2 = p.extrudeEndDistance2; + valveEndDistance2 = p.valveEndDistance2; if(p.pa != null) pa = new PolygonAttributes(p.pa); else @@ -334,6 +353,7 @@ Debug.e("Rr2Point.add(): adding a point to a polygon with its speeds set."); points.add(new Rr2Point(p)); box.expand(p); + updateExtrudeValveEnd(); } /** @@ -345,12 +365,20 @@ { if(speeds != null) Debug.e("Rr2Point.add(): adding a point to a polygon with its speeds set."); + points.add(i, new Rr2Point(p)); box.expand(p); + boolean update = false; if(i <= extrudeEnd) extrudeEnd++; + else + update = true; if(i <= valveEnd) valveEnd++; + else + update = true; + if(update) + updateExtrudeValveEnd(); } /** @@ -364,6 +392,7 @@ Debug.e("Rr2Point.set(): adding a point to a polygon with its speeds set."); points.set(i, new Rr2Point(p)); box.expand(p); // Note if the old point was on the convex hull, and the new one is within, box will be too big after this + updateExtrudeValveEnd(); } /** @@ -375,14 +404,24 @@ public void add(int i, Rr2Point p, double s) { if(speeds == null) + { Debug.e("Rr2Point.add(): adding a point and a speed to a polygon without its speeds set."); + return; + } points.add(i, new Rr2Point(p)); speeds.add(i, s); box.expand(p); + boolean update = false; if(i <= extrudeEnd) extrudeEnd++; + else + update = true; if(i <= valveEnd) valveEnd++; + else + update = true; + if(update) + updateExtrudeValveEnd(); } /** @@ -398,6 +437,7 @@ points.set(i, new Rr2Point(p)); speeds.set(i, s); box.expand(p); // Note if the old point was on the convex hull, and the new one is within, box will be too big after this + updateExtrudeValveEnd(); } /** @@ -421,18 +461,20 @@ * Eet the last point to plot to * @param d */ - public void setExtrudeEnd(int d) + public void setExtrudeEnd(int d, double d2) { extrudeEnd = d; + extrudeEndDistance2 = d2; } /** * Eet the last point to valve-open to * @param d */ - public void setValveEnd(int d) + public void setValveEnd(int d, double d2) { valveEnd = d; + valveEndDistance2 = d2; } /** @@ -471,13 +513,8 @@ if(extrudeEnd >= 0 || valveEnd >= 0) Debug.e("Rr2Point.add(): adding a polygon to another polygon with its extrude or valve ending set."); for(int i = 0; i < p.size(); i++) - { - if(i == p.extrudeEnd) - extrudeEnd = size(); - if(i == p.valveEnd) - valveEnd = size(); points.add(new Rr2Point(p.point(i))); - } + box.expand(p.box); if(speeds == null) { @@ -494,6 +531,7 @@ { speeds.add(new Double(p.speed(i))); } + updateExtrudeValveEnd(); } /** @@ -511,30 +549,17 @@ { Debug.e("Rr2Point.add(): attempt to add a polygon to another polygon when one has speeds and the other doesn't."); return; - } - if(k <= extrudeEnd || k <= valveEnd) - Debug.e("Rr2Point.add(): adding a polygon to another polygon with its extrude or valve ending set."); - int de = -1; - int dv = -1; - if (extrudeEnd >= 0) - de = extrudeEnd + p.size(); - if (valveEnd >= 0) - dv = valveEnd + p.size(); + } for(int i = 0; i < p.size(); i++) { - if(i == p.extrudeEnd) - extrudeEnd = size(); - if(i == p.valveEnd) - valveEnd = size(); if(speeds != null) add(k, new Rr2Point(p.point(i)), p.speed(i)); else points.add(k, new Rr2Point(p.point(i))); k++; } - extrudeEnd = Math.max(extrudeEnd, de); - valveEnd = Math.max(valveEnd, dv); box.expand(p.box); + updateExtrudeValveEnd(); } /** @@ -585,8 +610,6 @@ */ public RrPolygon negate() { - if(extrudeEnd >= 0 || valveEnd >= 0) - Debug.e("Rr2Point.negate(): negating a polygon with its extrude or valve ending set."); RrPolygon result = new RrPolygon(att, closed); for(int i = size() - 1; i >= 0; i--) { @@ -598,6 +621,9 @@ { result.setSpeed(i, speed(i)); } + result.setExtrudeEnd(extrudeEnd, extrudeEndDistance2); + result.setValveEnd(valveEnd, valveEndDistance2); + result.updateExtrudeValveEnd(); return result; } @@ -606,8 +632,6 @@ */ public RrPolygon randomStart() { - if(extrudeEnd >= 0 || valveEnd >= 0) - Debug.e("Rr2Point.randomStart(: randomizing a polygon with its extrude or valve ending set."); return newStart(rangen.nextInt(size())); } @@ -618,8 +642,7 @@ { if(!isClosed()) Debug.e("RrPolygon.newStart(i): reordering an open polygon!"); - if(extrudeEnd >= 0 || valveEnd >= 0) - Debug.e("Rr2Point.newStart(i): reordering a polygon with its extrude or valve ending set."); + if(i < 0 || i >= size()) { Debug.e("RrPolygon.newStart(i): dud index: " + i); @@ -635,7 +658,9 @@ if(i >= size()) i = 0; } - + result.setExtrudeEnd(extrudeEnd, extrudeEndDistance2); + result.setValveEnd(valveEnd, valveEndDistance2); + result.updateExtrudeValveEnd(); return result; } @@ -646,8 +671,6 @@ { if(size() == 0 || lc.getModelLayer() < 0) return this; - if(extrudeEnd >= 0 || valveEnd >= 0) - Debug.e("Rr2Point.incrementedStart(): incrementing a polygon with its extrude or valve ending set."); int i = lc.getModelLayer() % size(); return newStart(i); } @@ -690,8 +713,7 @@ { if(!p.isClosed()) Debug.e("RrPolygon.nearestVertexReorder(): called for non-closed polygon."); - if(extrudeEnd >= 0 || p.extrudeEnd >= 0 || valveEnd >= 0 || p.valveEnd >= 0) - Debug.e("Rr2Point.nearestVertexReorderMerge(): merging polygons with a extrude or valve ending set."); + double d = Double.POSITIVE_INFINITY; int myPoint = -1; int itsPoint = -1; @@ -711,6 +733,7 @@ RrPolygon ro = p.newStart(itsPoint); ro.add(0, point(myPoint)); add(myPoint, ro); + updateExtrudeValveEnd(); return true; } else return false; @@ -809,7 +832,7 @@ /** * Backtrack a given distance, inserting a new point there and set extrudeEnd to it. - * If drawEnd is already set, backtrack from that. + * If extrudeEnd is already set, backtrack from that. * @param distance to backtrack * @return index of the inserted point */ @@ -822,9 +845,15 @@ int start, last; if(extrudeEnd >= 0) + { start = extrudeEnd; - else - start = size() - 1; + extrudeEndDistance2 = Math.sqrt(extrudeEndDistance2) + d; + extrudeEndDistance2 *= extrudeEndDistance2; + } else + { + start = size() - 1; + extrudeEndDistance2 = d*d; + } if(!isClosed() && extrudeEnd < 0) start--; @@ -872,7 +901,7 @@ /** * Backtrack a given distance, inserting a new point there and set valveEnd to it. - * If drawEnd is already set, backtrack from that. + * If valveEnd is already set, backtrack from that. * @param distance to backtrack * @return index of the inserted point */ @@ -885,9 +914,15 @@ int start, last; if(valveEnd >= 0) + { start = valveEnd; - else - start = size() - 1; + valveEndDistance2 = Math.sqrt(valveEndDistance2) + d; + valveEndDistance2 *= valveEndDistance2; + } else + { + start = size() - 1; + valveEndDistance2 = d*d; + } if(!isClosed() && valveEnd < 0) start--; Modified: trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java 2011-05-09 08:46:20 UTC (rev 4127) +++ trunk/software/host/src/org/reprap/geometry/polygons/RrPolygonList.java 2011-05-11 10:07:53 UTC (rev 4128) @@ -703,7 +703,7 @@ * This is a heuristic - it does not do a full travelling salesman... * This deals with both open and closed polygons, but it only allows closed ones to * be re-ordered if reOrder is true. If any point on a closed polygon is closer to - * any point on any other than linkUp, the two polygons are merged at their closest + * any point on any other than sqrt(linkUp), the two polygons are merged at their closest * points. This is suppressed by setting linkUp negative. * * @param startNearHere @@ -841,6 +841,174 @@ } /** + * Take all the polygons in a list, both open and closed, and reorder them such that + * accessible points on any that have a squared distance less than linkUp to accessible + * points on any others are joined to form single polygons. + * + * For an open polygon the accessible points are just its ends. For a closed polygon + * all its points are accessible. + * + * This is a fairly radical remove in-air movement strategy. + * + * All the polygons in the list must be plotted with the same physical extruder (otherwise + * it would be nonsense to join them). It is the calling function's responsibility to + * make sure this is the case. + * + * @param linkUp + */ + public void radicalReOrder(double linkUp) + { + if(size() < 2) + return; + + // First check that we all have the same physical extruder + + int physicalExtruder = polygon(0).getAttributes().getExtruder().getPhysicalExtruderNumber(); + for(int i = 1; i < size(); i++) + if(polygon(i).getAttributes().getExtruder().getPhysicalExtruderNumber() != physicalExtruder) + { + Debug.e("RrPolygonList.radicalReOrder(): more than one physical extruder needed by the list!"); + return; + } + + // Now go through the polygons pairwise + + for(int i = 0; i < size() - 1; i++) + { + RrPolygon myPolygon = polygon(i); + for(int j = i+1; j < size(); j++) + { + double d = Double.POSITIVE_INFINITY; + double d2; + int myPoint = -1; + int itsPoint = -1; + int myTempPoint, itsTempPoint; + boolean reverseMe, reverseIt; + RrPolygon itsPolygon = polygon(j); + + // Swap the odd half of the asymmetric cases so they're all the same + + if(!myPolygon.isClosed() && itsPolygon.isClosed()) + { + polygons.set(i, itsPolygon); + polygons.set(j, myPolygon); + myPolygon = polygon(i); + itsPolygon = polygon(j); + } + + // Three possibilities ... + + if(!myPolygon.isClosed() && !itsPolygon.isClosed()) + { + // ... both open + // Just compare the four ends + + reverseMe = true; + reverseIt = false; + d = Rr2Point.dSquared(myPolygon.point(0), itsPolygon.point(0)); + + d2 = Rr2Point.dSquared(myPolygon.point(myPolygon.size() - 1), itsPolygon.point(0)); + if(d2 < d) + { + reverseMe = false; + reverseIt = false; + d = d2; + } + + d2 = Rr2Point.dSquared(myPolygon.point(0), itsPolygon.point(itsPolygon.size() - 1)); + if(d2 < d) + { + reverseMe = true; + reverseIt = true; + d = d2; + } + + d2 = Rr2Point.dSquared(myPolygon.point(myPolygon.size() - 1), itsPolygon.point(itsPolygon.size() - 1)); + if(d2 < d) + { + reverseMe = false; + reverseIt = true; + d = d2; + } + + if(d < linkUp) + { + if(reverseMe) + myPolygon = myPolygon.negate(); + if(reverseIt) + itsPolygon = itsPolygon.negate(); + myPolygon.add(itsPolygon); + polygons.set(i, myPolygon); + polygons.remove(j); + } + + } else if(myPolygon.isClosed() && !itsPolygon.isClosed()) + { + // ... I'm closed; it's open + // Compare all my points with its two ends + + reverseIt = false; + myPoint = myPolygon.nearestVertex(itsPolygon.point(0)); + d = Rr2Point.dSquared(myPolygon.point(myPoint), itsPolygon.point(0)); + myTempPoint = myPolygon.nearestVertex(itsPolygon.point(itsPolygon.size() - 1)); + d2 = Rr2Point.dSquared(myPolygon.point(myTempPoint), itsPolygon.point(itsPolygon.size() -1 )); + if(d2 < d) + { + myPoint = myTempPoint; + reverseIt = true; + d = d2; + } + + if(d < linkUp) + { + myPolygon = myPolygon.newStart(myPoint); + myPolygon.add(myPolygon.point(0)); // Make sure the first half really is closed + if(reverseIt) + itsPolygon = itsPolygon.negate(); + myPolygon.add(itsPolygon); + myPolygon.setOpen(); // We were closed, but we must now be open + polygons.set(i, myPolygon); + polygons.remove(j); + } + + } else if(myPolygon.isClosed() && itsPolygon.isClosed()) + { + // ... both closed + // Compare all my points with all its points + + for(int k = 0; k < itsPolygon.size(); k++) + { + myTempPoint = myPolygon.nearestVertex(itsPolygon.point(k)); + d2 = Rr2Point.dSquared(myPolygon.point(myTempPoint), itsPolygon.point(k)); + if(d2 < d) + { + myPoint = myTempPoint; + itsPoint = k; + d = d2; + } + } + + if(d < linkUp) + { + myPolygon = myPolygon.newStart(myPoint); + myPolygon.add(myPolygon.point(0)); // Make sure we come back to the start + itsPolygon = itsPolygon.newStart(itsPoint); + myPolygon.add(itsPolygon); + myPolygon.setOpen(); // We were closed, but we must now be open + polygons.set(i, myPolygon); + polygons.remove(j); + } + + } else + { + // ... Horrible impossibility + Debug.e("RrPolygonList.radicalReOrder(): Polygons are neither closed nor open!"); + } + } + } + } + + /** * Remove polygon pol from the list, replacing it with two polygons, the * first being pol's vertices from 0 to st inclusive, and the second being * pol's vertices from en to its end inclusive. It is permissible for @@ -884,11 +1052,13 @@ * Search a polygon list to find the nearest point on all the polygons within it * to the point p. If omit is non-negative, ignore that polygon in the search. * + * Only polygons with the same physical extruder are compared. + * * @param p * @param omit * @return */ - private PolPoint ppSearch(Rr2Point p, int omit) + private PolPoint ppSearch(Rr2Point p, int omit, int physicalExtruder) { double d = Double.POSITIVE_INFINITY; PolPoint result = null; @@ -901,28 +1071,31 @@ if(i != omit) { RrPolygon pgon = polygon(i); - int n = pgon.nearestVertex(p); - double d2 = Rr2Point.dSquared(p, pgon.point(n)); - if(d2 < d) + if(physicalExtruder == pgon.getAttributes().getExtruder().getPhysicalExtruderNumber()) { - if(result == null) - result = new PolPoint(n, i, pgon, d2); - else - result.set(n, i, pgon, d2); - d = d2; + int n = pgon.nearestVertex(p); + double d2 = Rr2Point.dSquared(p, pgon.point(n)); + if(d2 < d) + { + if(result == null) + result = new PolPoint(n, i, pgon, d2); + else + result.set(n, i, pgon, d2); + d = d2; + } } } } if(result == null) - Debug.e("RrPolygonList.ppSearch(): no point found!"); + Debug.d("RrPolygonList.ppSearch(): no point found!"); return result; } /** - * This assumes that the RrPolygonList for which it is called is all the outline + * This assumes that the RrPolygonList for which it is called is all the closed outline * polygons, and that hatching is their infill hatch. It goes through the outlines * and the hatch modifying both so that that outlines actually start and end half-way * along a hatch line (that half of the hatch line being deleted). When the outlines @@ -931,6 +1104,8 @@ * The outline polygons are re-ordered before the start so that their first point is * the most extreme one in the current hatch direction. * + * Only hatches and outlines whose physical extruders match are altered. + * * @param hatching * @param lc */ @@ -948,7 +1123,7 @@ outline = outline.newStart(outline.maximalVertex(l)); Rr2Point start = outline.point(0); - PolPoint pp = hatching.ppSearch(start, -1); + PolPoint pp = hatching.ppSearch(start, -1, outline.getAttributes().getExtruder().getPhysicalExtruderNumber()); boolean failed = true; if(pp != null) { @@ -972,7 +1147,7 @@ if(slice.membership(pq1) & slice.membership(pq2) & slice.membership(pq3)) { outline.add(start); - outline.setExtrudeEnd(outline.size() - 1); + outline.setExtrudeEnd(-1, 0); if(en >= st) { Modified: trunk/software/host/src/org/reprap/machines/GCodeRepRap.java =================================================================== --- trunk/software/host/src/org/reprap/machines/GCodeRepRap.java 2011-05-09 08:46:20 UTC (rev 4127) +++ trunk/software/host/src/org/reprap/machines/GCodeRepRap.java 2011-05-11 10:07:53 UTC (rev 4128) @@ -95,7 +95,7 @@ if(xyFeedrate < feedrate) { - Debug.e("GCodeRepRap().qXYMove: feedrate (" + feedrate + ") exceeds maximum (" + xyFeedrate + ")."); + Debug.d("GCodeRepRap().qXYMove: feedrate (" + feedrate + ") exceeds maximum (" + xyFeedrate + ")."); feedrate = xyFeedrate; } @@ -150,7 +150,7 @@ if(zFeedrate < feedrate) { - Debug.e("GCodeRepRap().qZMove: feedrate (" + feedrate + ") exceeds maximum (" + zFeedrate + ")."); + Debug.d("GCodeRepRap().qZMove: feedrate (" + feedrate + ") exceeds maximum (" + zFeedrate + ")."); feedrate = zFeedrate; } @@ -218,7 +218,7 @@ boolean xyMove = dx!= 0 || dy != 0; if(zMove && xyMove) - Debug.e("GcodeRepRap.moveTo(): attempt to move in X|Y and Z simultaneously: (x, y, z) = (" + x + ", " + y + ", " + z + ")"); + Debug.d("GcodeRepRap.moveTo(): attempt to move in X|Y and Z simultaneously: (x, y, z) = (" + x + ", " + y + ", " + z + ")"); double zFeedrate = round(getMaxFeedrateZ(), 1); @@ -232,12 +232,20 @@ qFeedrate(feedrate); } - if(xyMove) - qXYMove(x, y, feedrate); + if(dz > 0) + { + if(zMove) + qZMove(z, feedrate); + if(xyMove) + qXYMove(x, y, feedrate); + } else + { + if(xyMove) + qXYMove(x, y, feedrate); + if(zMove) + qZMove(z, feedrate); + } - if(zMove) - qZMove(z, feedrate); - if(endUp && !startUp) { qZMove(liftedZ, zFeedrate); @@ -273,7 +281,7 @@ boolean xyMove = dx != 0 || dy != 0; if(zMove && xyMove) - Debug.e("GcodeRepRap.singleMove(): attempt to move in X|Y and Z simultaneously: (x, y, z) = (" + x + ", " + y + ", " + z + ")"); + Debug.d("GcodeRepRap.singleMove(): attempt to move in X|Y and Z simultaneously: (x, y, z) = (" + x + ", " + y + ", " + z + ")"); try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-09 08:46:26
|
Revision: 4127 http://reprap.svn.sourceforge.net/reprap/?rev=4127&view=rev Author: adrian-bowyer Date: 2011-05-09 08:46:20 +0000 (Mon, 09 May 2011) Log Message: ----------- Latest properties file. Modified Paths: -------------- trunk/software/host/lib/reprap.properties.dist Modified: trunk/software/host/lib/reprap.properties.dist =================================================================== --- trunk/software/host/lib/reprap.properties.dist 2011-05-09 04:37:10 UTC (rev 4126) +++ trunk/software/host/lib/reprap.properties.dist 2011-05-09 08:46:20 UTC (rev 4127) @@ -1,205 +1,205 @@ +#Fri Apr 29 10:43:50 BST 2011 #RepRap machine parameters. See http://objects.reprap.org/wiki/Java_Software_Preferences_File -#Fri Apr 29 10:43:50 BST 2011 -Extruder0_ExtrusionLastFoundationWidth(mm)=2 -Extruder2_InfillSpeed(0..1)=1 -Extruder1_FastXYFeedrate(mm/minute)=2500.0 -Extruder2_CoolingPeriod(s)=-1 -Extruder2_ExtrudeRatio(0..)=1 -Extruder0_OffsetX(mm)=0 -Extruder1_ColourB(0..1)=0.3 -Extruder3_OutlineSpeed(0..1)=0.9 -Extruder1_OffsetY(mm)=0 -Extruder2_MaterialType(name)=PLA-infill -Extruder2_OffsetZ(mm)=0 -Extruder2_Reverse(ms)=1200 -Extruder3_SlowXYFeedrate(mm/minute)=1500.0 +BaudRate=57600 +BedTemperature(C)=65 +CommsDebug=false Debug=false -Extruder0_ValveDelayForLayer(ms)=200 -Extruder3_CoolingPeriod(s)=0.1 -Extruder2_ArcCompensationFactor(0..)=8 -Extruder1_ExtrusionPWM(0..1)=-1 -Extruder0_ExtrusionBroadWidth(mm)=-1 -SlowZFeedrate(mm/minute)=50.0 -MaximumFeedrateX(mm/minute)=2500 -WorkingY(mm)=300 -Extruder3_ExtrusionOverRun(mm)=0 -Extruder0_InfillSpeed(0..1)=1 -Extruder2_MaxAcceleration(mm/minute/minute)=1200000.0 -Extruder3_ValvePulseTime(ms)=500 +DumpX(mm)=143 +DumpY(mm)=5 +Extruder0_Address=0 Extruder0_ArcCompensationFactor(0..)=8 -Extruder3_ValveDelayForLayer(ms)=200 -DumpX(mm)=143 -Extruder3_SupportMaterialType(name)=null -Extruder1_ExtrusionLastFoundationWidth(mm)=1 -Extruder0_ExtrusionSpeed(mm/minute)=2500 -Extruder1_Address=0 -Extruder2_FastEFeedrate(mm/minute)=18000.0 -Extruder2_ExtrusionSize(mm)=0.5 -Extruder3_MiddleStart=true -Extruder3_MaterialType(name)=PCB-pen -Extruder3_ExtrusionHeight(mm)=0.25 -Extruder2_InFillMaterialType(name)=PLA-infill -Extruder2_ColourG(0..1)=0.8 -Extruder2_ExtrusionDelayForLayer(ms)=500 +Extruder0_ArcShortSides(0..)=1 +Extruder0_ColourB(0..1)=0.6 +Extruder0_ColourG(0..1)=0.3 +Extruder0_ColourR(0..1)=0.3 +Extruder0_CoolingPeriod(s)=-1 +Extruder0_EvenHatchDirection(degrees)=45 Extruder0_ExtrudeRatio(0..)=1 -Extruder2_ExtrusionOverRun(mm)=0 -Extruder2_OddHatchDirection(degrees)=-45 -Extruder1_SlowXYFeedrate(mm/minute)=1500.0 -Extruder2_ExtrusionPWM(0..1)=-1 -Extruder1_MaxAcceleration(mm/minute/minute)=1200000.0 -Extruder1_ExtrusionBroadWidth(mm)=2.5 -Extruder2_ExtrusionHeight(mm)=0.25 -Extruder1_ValveDelayForPolygon(ms)=200 -Extruder2_ExtrusionInfillWidth(mm)=1.5 -Extruder3_ExtrusionDelayForPolygon(ms)=500 +Extruder0_ExtrusionBroadWidth(mm)=-1 Extruder0_ExtrusionDelayForLayer(ms)=500 -Extruder1_SupportMaterialType(name)=null -Extruder0_OddHatchDirection(degrees)=-45 -Port(name)=/dev/ttyUSB0 -Extruder2_ExtrusionDelayForPolygon(ms)=50 -BaudRate=57600 -Extruder3_NumberOfShells(0..N)=1 -Extruder1_OffsetX(mm)=0 -Extruder0_ColourR(0..1)=0.3 -Extruder2_OffsetY(mm)=0 -Extruder1_ExtrusionDelayForPolygon(ms)=50 -Extruder2_ColourB(0..1)=0.3 -Extruder3_OffsetZ(mm)=0 -Extruder1_ExtrusionHeight(mm)=0.25 -Extruder3_ColourR(0..1)=0.3 -Extruder0_MiddleStart=true -Extruder3_Reverse(ms)=400 -Extruder2_InfillOverlap(mm)=0.2 -Extruder0_ArcShortSides(0..)=1 -Extruder0_ExtrusionSize(mm)=0.5 -Extruder2_FastXYFeedrate(mm/minute)=2500.0 -Shield=false Extruder0_ExtrusionDelayForPolygon(ms)=50 -Extruder1_ExtrusionOverRun(mm)=3 -FoundationLayers=0 -Extruder2_ExtrusionLastFoundationWidth(mm)=2 -Extruder3_InfillSpeed(0..1)=0.9 -Extruder0_Reverse(ms)=1200 -WorkingX(mm)=300 +Extruder0_ExtrusionFoundationWidth(mm)=2 Extruder0_ExtrusionHeight(mm)=0.25 +Extruder0_ExtrusionInfillWidth(mm)=0.5 +Extruder0_ExtrusionLastFoundationWidth(mm)=2 +Extruder0_ExtrusionOverRun(mm)=-1 +Extruder0_ExtrusionPWM(0..1)=-1 +Extruder0_ExtrusionSize(mm)=0.5 +Extruder0_ExtrusionSpeed(mm/minute)=2500 +Extruder0_ExtrusionTemp(C)=205 +Extruder0_FastEFeedrate(mm/minute)=18000.0 +Extruder0_FastXYFeedrate(mm/minute)=2500.0 +Extruder0_InFillMaterialType(name)=PLA-infill +Extruder0_InfillOverlap(mm)=0.2 +Extruder0_InfillSpeed(0..1)=1 +Extruder0_Lift(mm)=0 +Extruder0_MaterialType(name)=PLA Extruder0_MaxAcceleration(mm/minute/minute)=1200000.0 -Extruder3_ExtrusionSpeed(mm/minute)=2500 -Extruder1_ValveDelayForLayer(ms)=200 -Extruder2_NumberOfShells(0..N)=1 -Extruder3_ExtrusionPWM(0..1)=-1 -Extruder2_ExtrusionBroadWidth(mm)=6 +Extruder0_MiddleStart=true +Extruder0_NumberOfShells(0..N)=2 +Extruder0_OddHatchDirection(degrees)=-45 +Extruder0_OffsetX(mm)=0 +Extruder0_OffsetY(mm)=0 Extruder0_OffsetZ(mm)=0 -Extruder0_InfillOverlap(mm)=0.2 -Extruder0_ExtrusionTemp(C)=205 -Extruder0_ExtrusionOverRun(mm)=-1 -Extruder3_ExtrusionLastFoundationWidth(mm)=2 -Extruder3_ExtrudeRatio(0..)=1 -MaximumFeedrateY(mm/minute)=2500 Extruder0_OutlineSpeed(0..1)=0.9 -Extruder1_InfillSpeed(0..1)=1 -NumberOfExtruders=4 -Extruder0_ColourG(0..1)=0.3 -Extruder2_Address=0 -MaxXYAcceleration(mm/mininute/minute)=1200000 -Extruder2_ValveDelayForPolygon(ms)=200 -Extruder0_FastEFeedrate(mm/minute)=18000.0 -Extruder3_ColourG(0..1)=0.3 -Extruder3_FastEFeedrate(mm/minute)=8000.0 -Extruder0_InFillMaterialType(name)=PLA-infill -Extruder1_ExtrusionTemp(C)=205 -Extruder1_NumberOfShells(0..N)=0 -Extruder3_ArcCompensationFactor(0..)=8 -Extruder0_FastXYFeedrate(mm/minute)=2500.0 -Extruder3_InFillMaterialType(name)=null -FiveD=true -BedTemperature(C)=65 -FinishY(mm)=190 +Extruder0_Purge(ms)=30000 +Extruder0_Reverse(ms)=1200 +Extruder0_SlowXYFeedrate(mm/minute)=1500.0 +Extruder0_SupportMaterialType(name)=null +Extruder0_ValveDelayForLayer(ms)=200 +Extruder0_ValveDelayForPolygon(ms)=200 +Extruder0_ValveOverRun(mm)=-1 Extruder0_ValvePulseTime(ms)=-500 +Extruder1_Address=0 Extruder1_ArcCompensationFactor(0..)=8 -Extruder0_ExtrusionInfillWidth(mm)=0.5 Extruder1_ArcShortSides(0..)=1 -Extruder2_OffsetX(mm)=0 -Extruder2_SlowXYFeedrate(mm/minute)=1500.0 -Extruder3_ExtrusionSize(mm)=0.3 -Extruder3_ExtrusionBroadWidth(mm)=6 -Extruder3_ExtrusionInfillWidth(mm)=1.5 -Extruder3_OffsetY(mm)=0 +Extruder1_ColourB(0..1)=0.3 +Extruder1_ColourG(0..1)=0.6 +Extruder1_ColourR(0..1)=0.9 +Extruder1_CoolingPeriod(s)=-1 +Extruder1_EvenHatchDirection(degrees)=45 +Extruder1_ExtrudeRatio(0..)=1 +Extruder1_ExtrusionBroadWidth(mm)=2.5 +Extruder1_ExtrusionDelayForLayer(ms)=500 +Extruder1_ExtrusionDelayForPolygon(ms)=50 +Extruder1_ExtrusionFoundationWidth(mm)=2 +Extruder1_ExtrusionHeight(mm)=0.25 +Extruder1_ExtrusionInfillWidth(mm)=2 +Extruder1_ExtrusionLastFoundationWidth(mm)=1 +Extruder1_ExtrusionOverRun(mm)=3 +Extruder1_ExtrusionPWM(0..1)=-1 +Extruder1_ExtrusionSize(mm)=0.5 Extruder1_ExtrusionSpeed(mm/minute)=2500 -Extruder0_ColourB(0..1)=0.6 -Extruder1_ExtrudeRatio(0..)=1 -Extruder1_ColourR(0..1)=0.9 +Extruder1_ExtrusionTemp(C)=205 +Extruder1_FastEFeedrate(mm/minute)=18000.0 +Extruder1_FastXYFeedrate(mm/minute)=2500.0 +Extruder1_InFillMaterialType(name)=PLA-support +Extruder1_InfillOverlap(mm)=0 +Extruder1_InfillSpeed(0..1)=1 +Extruder1_Lift(mm)=0 +Extruder1_MaterialType(name)=PLA-support +Extruder1_MaxAcceleration(mm/minute/minute)=1200000.0 Extruder1_MiddleStart=true -Extruder3_ColourB(0..1)=0.3 -Extruder0_ValveOverRun(mm)=-1 -Extruder0_Lift(mm)=0 -Extruder0_NumberOfShells(0..N)=2 -Extruder3_EvenHatchDirection(degrees)=45 +Extruder1_NumberOfShells(0..N)=0 +Extruder1_OddHatchDirection(degrees)=45 +Extruder1_OffsetX(mm)=0 +Extruder1_OffsetY(mm)=0 +Extruder1_OffsetZ(mm)=0 Extruder1_OutlineSpeed(0..1)=0.9 -Extruder0_Purge(ms)=30000 -Extruder0_MaterialType(name)=PLA -Extruder3_ExtrusionDelayForLayer(ms)=600 -Extruder2_ExtrusionTemp(C)=205 -Extruder3_OddHatchDirection(degrees)=-45 +Extruder1_Purge(ms)=30000 +Extruder1_Reverse(ms)=1200 +Extruder1_SlowXYFeedrate(mm/minute)=1500.0 +Extruder1_SupportMaterialType(name)=null +Extruder1_ValveDelayForLayer(ms)=200 +Extruder1_ValveDelayForPolygon(ms)=200 Extruder1_ValveOverRun(mm)=2 -Extruder2_SupportMaterialType(name)=null -PathOptimise=true -Extruder0_OffsetY(mm)=0 -Extruder1_OffsetZ(mm)=0 -Extruder1_Reverse(ms)=1200 -Extruder1_ExtrusionDelayForLayer(ms)=500 -Extruder1_Lift(mm)=0 -InterLayerCooling=true -Extruder0_CoolingPeriod(s)=-1 Extruder1_ValvePulseTime(ms)=-500 -Extruder1_OddHatchDirection(degrees)=45 +Extruder2_Address=0 +Extruder2_ArcCompensationFactor(0..)=8 +Extruder2_ArcShortSides(0..)=1 +Extruder2_ColourB(0..1)=0.3 +Extruder2_ColourG(0..1)=0.8 +Extruder2_ColourR(0..1)=0.3 +Extruder2_CoolingPeriod(s)=-1 Extruder2_EvenHatchDirection(degrees)=45 -SlowXYFeedrate(mm/minute)=1500.0 -Extruder1_Purge(ms)=30000 -Extruder1_EvenHatchDirection(degrees)=45 +Extruder2_ExtrudeRatio(0..)=1 +Extruder2_ExtrusionBroadWidth(mm)=6 +Extruder2_ExtrusionDelayForLayer(ms)=500 +Extruder2_ExtrusionDelayForPolygon(ms)=50 +Extruder2_ExtrusionFoundationWidth(mm)=2 +Extruder2_ExtrusionHeight(mm)=0.25 +Extruder2_ExtrusionInfillWidth(mm)=1.5 +Extruder2_ExtrusionLastFoundationWidth(mm)=2 +Extruder2_ExtrusionOverRun(mm)=0 +Extruder2_ExtrusionPWM(0..1)=-1 +Extruder2_ExtrusionSize(mm)=0.5 +Extruder2_ExtrusionSpeed(mm/minute)=2500 +Extruder2_ExtrusionTemp(C)=205 +Extruder2_FastEFeedrate(mm/minute)=18000.0 +Extruder2_FastXYFeedrate(mm/minute)=2500.0 +Extruder2_InFillMaterialType(name)=PLA-infill +Extruder2_InfillOverlap(mm)=0.2 +Extruder2_InfillSpeed(0..1)=1 +Extruder2_Lift(mm)=0 +Extruder2_MaterialType(name)=PLA-infill +Extruder2_MaxAcceleration(mm/minute/minute)=1200000.0 +Extruder2_MiddleStart=true +Extruder2_NumberOfShells(0..N)=1 +Extruder2_OddHatchDirection(degrees)=-45 +Extruder2_OffsetX(mm)=0 +Extruder2_OffsetY(mm)=0 +Extruder2_OffsetZ(mm)=0 +Extruder2_OutlineSpeed(0..1)=0.9 +Extruder2_Purge(ms)=30000 +Extruder2_Reverse(ms)=1200 +Extruder2_SeparationOutlineSpeed(0..1)=1 +Extruder2_SlowXYFeedrate(mm/minute)=1500.0 +Extruder2_SupportMaterialType(name)=null +Extruder2_ValveDelayForLayer(ms)=200 +Extruder2_ValveDelayForPolygon(ms)=200 +Extruder2_ValveOverRun(mm)=2 +Extruder2_ValvePulseTime(ms)=-500 Extruder3_Address=1 +Extruder3_ArcCompensationFactor(0..)=8 +Extruder3_ArcShortSides(0..)=1 +Extruder3_ColourB(0..1)=0.3 +Extruder3_ColourG(0..1)=0.3 +Extruder3_ColourR(0..1)=0.3 +Extruder3_CoolingPeriod(s)=0.1 +Extruder3_EvenHatchDirection(degrees)=45 +Extruder3_ExtrudeRatio(0..)=1 +Extruder3_ExtrusionBroadWidth(mm)=6 +Extruder3_ExtrusionDelayForLayer(ms)=600 +Extruder3_ExtrusionDelayForPolygon(ms)=500 +Extruder3_ExtrusionFoundationWidth(mm)=2 +Extruder3_ExtrusionHeight(mm)=0.25 +Extruder3_ExtrusionInfillWidth(mm)=1.5 +Extruder3_ExtrusionLastFoundationWidth(mm)=2 +Extruder3_ExtrusionOverRun(mm)=0 +Extruder3_ExtrusionPWM(0..1)=-1 +Extruder3_ExtrusionSize(mm)=0.3 +Extruder3_ExtrusionSpeed(mm/minute)=2500 Extruder3_ExtrusionTemp(C)=0 -Extruder2_ValveDelayForLayer(ms)=200 -Extruder0_EvenHatchDirection(degrees)=45 -Extruder2_ArcShortSides(0..)=1 +Extruder3_FastEFeedrate(mm/minute)=8000.0 Extruder3_FastXYFeedrate(mm/minute)=2500.0 -Extruder2_ValveOverRun(mm)=2 -Extruder0_SlowXYFeedrate(mm/minute)=1500.0 +Extruder3_InFillMaterialType(name)=null Extruder3_InfillOverlap(mm)=0.2 -WorkingZ(mm)=300 -Extruder1_ExtrusionSize(mm)=0.5 -CommsDebug=false -Extruder1_CoolingPeriod(s)=-1 -Extruder0_Address=0 -Extruder2_Lift(mm)=0 -Extruder2_OutlineSpeed(0..1)=0.9 -DumpY(mm)=5 -Extruder1_FastEFeedrate(mm/minute)=18000.0 +Extruder3_InfillSpeed(0..1)=0.9 +Extruder3_Lift(mm)=0 +Extruder3_MaterialType(name)=PCB-pen +Extruder3_MaxAcceleration(mm/minute/minute)=1200000.0 +Extruder3_MiddleStart=true +Extruder3_NumberOfShells(0..N)=1 +Extruder3_OddHatchDirection(degrees)=-45 +Extruder3_OffsetX(mm)=0 +Extruder3_OffsetY(mm)=0 +Extruder3_OffsetZ(mm)=0 +Extruder3_OutlineSpeed(0..1)=0.9 +Extruder3_Purge(ms)=10000 +Extruder3_Reverse(ms)=400 +Extruder3_SeparationOutlineSpeed(0..1)=1 +Extruder3_SlowXYFeedrate(mm/minute)=1500.0 +Extruder3_SupportMaterialType(name)=null +Extruder3_ValveDelayForLayer(ms)=200 Extruder3_ValveDelayForPolygon(ms)=200 -Extruder2_Purge(ms)=30000 -Extruder1_MaterialType(name)=PLA-support +Extruder3_ValveOverRun(mm)=2 +Extruder3_ValvePulseTime(ms)=500 FinishX(mm)=10 -Extruder3_ExtrusionFoundationWidth(mm)=2 -Extruder1_InFillMaterialType(name)=PLA-support -Extruder2_ExtrusionFoundationWidth(mm)=2 -Extruder3_OffsetX(mm)=0 +FinishY(mm)=190 +FiveD=true +FoundationLayers=0 +InterLayerCooling=true +MaxXYAcceleration(mm/mininute/minute)=1200000 +MaxZAcceleration(mm/mininute/minute)=3000 +MaximumFeedrateX(mm/minute)=2500 +MaximumFeedrateY(mm/minute)=2500 MaximumFeedrateZ(mm/minute)=50 -Extruder0_ExtrusionPWM(0..1)=-1 -Extruder1_ColourG(0..1)=0.6 -Extruder1_ExtrusionFoundationWidth(mm)=2 -Extruder2_MiddleStart=true -MaxZAcceleration(mm/mininute/minute)=3000 -Extruder0_ValveDelayForPolygon(ms)=200 -Extruder0_SupportMaterialType(name)=null -Extruder2_ColourR(0..1)=0.3 -Extruder1_ExtrusionInfillWidth(mm)=2 -Extruder0_ExtrusionFoundationWidth(mm)=2 -Extruder3_Lift(mm)=0 -Extruder2_ValvePulseTime(ms)=-500 -Extruder1_InfillOverlap(mm)=0 -Extruder3_SeparationOutlineSpeed(0..1)=1 -Extruder3_ValveOverRun(mm)=2 -Extruder3_ArcShortSides(0..)=1 -Extruder3_Purge(ms)=10000 -Extruder2_SeparationOutlineSpeed(0..1)=1 -Extruder2_ExtrusionSpeed(mm/minute)=2500 -Extruder3_MaxAcceleration(mm/minute/minute)=1200000.0 +NumberOfExtruders=4 +PathOptimise=true +Port(name)=/dev/ttyUSB0 +Shield=false +SlowXYFeedrate(mm/minute)=1500.0 +SlowZFeedrate(mm/minute)=50.0 +WorkingX(mm)=300 +WorkingY(mm)=300 +WorkingZ(mm)=300 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ree...@us...> - 2011-05-09 04:37:16
|
Revision: 4126 http://reprap.svn.sourceforge.net/reprap/?rev=4126&view=rev Author: reece-arnott2 Date: 2011-05-09 04:37:10 +0000 (Mon, 09 May 2011) Log Message: ----------- Carapace-Copier: Added ReadMeFirst text file to point to stand alone sourceforge project for the software. No more development under the Reprap project is expected until/unless it is integrated into the host software. Added Paths: ----------- trunk/old_files/miscellaneous/CarapaceCopier/ReadMeFirst.txt Added: trunk/old_files/miscellaneous/CarapaceCopier/ReadMeFirst.txt =================================================================== --- trunk/old_files/miscellaneous/CarapaceCopier/ReadMeFirst.txt (rev 0) +++ trunk/old_files/miscellaneous/CarapaceCopier/ReadMeFirst.txt 2011-05-09 04:37:10 UTC (rev 4126) @@ -0,0 +1 @@ +This is an old version of the Carapace-Copier software. This software now has its own Sourceforge project page: http://sourceforge.net/projects/carapace-copier/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-09 00:15:24
|
Revision: 4125 http://reprap.svn.sourceforge.net/reprap/?rev=4125&view=rev Author: adrian-bowyer Date: 2011-05-09 00:15:18 +0000 (Mon, 09 May 2011) Log Message: ----------- Axis home code protected against possible lack of endstops. Modified Paths: -------------- trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde Modified: trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde =================================================================== --- trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-05-08 17:05:16 UTC (rev 4124) +++ trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-05-09 00:15:18 UTC (rev 4125) @@ -493,7 +493,10 @@ saved_feedrate = current_feedrate; current_feedrate = 1500.0; current_to_dest(); - destination_x = -2.0*X_MAX_LENGTH; + if(X_MIN_PIN >= 0) + destination_x = -2.0*X_MAX_LENGTH; + else + destination_x = 0.0; // Best we can do setup_move(); #ifdef REPRAP_ACC linear_move(); @@ -509,7 +512,10 @@ saved_feedrate = current_feedrate; current_feedrate = 1500.0; current_to_dest(); - destination_y = -2.0*Y_MAX_LENGTH; + if(Y_MIN_PIN >= 0) + destination_y = -2.0*Y_MAX_LENGTH; + else + destination_y = 0.0; // Best we can do setup_move(); #ifdef REPRAP_ACC linear_move(); @@ -525,7 +531,10 @@ saved_feedrate = current_feedrate; current_feedrate = 100.0; current_to_dest(); - destination_z = -2.0*Z_MAX_LENGTH; + if(Z_MIN_PIN >= 0) + destination_z = -2.0*Z_MAX_LENGTH; + else + destination_z = 0.0; // Best we can do setup_move(); #ifdef REPRAP_ACC linear_move(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-08 17:05:23
|
Revision: 4124 http://reprap.svn.sourceforge.net/reprap/?rev=4124&view=rev Author: adrian-bowyer Date: 2011-05-08 17:05:16 +0000 (Sun, 08 May 2011) Log Message: ----------- Tonkip firmware wip. Modified Paths: -------------- trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde trunk/software/firmware/Tonokip_Firmware/configuration.h trunk/software/firmware/Tonokip_Firmware/pins.h Modified: trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde =================================================================== --- trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-05-05 11:21:54 UTC (rev 4123) +++ trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-05-08 17:05:16 UTC (rev 4124) @@ -116,7 +116,7 @@ float destination_x =0.0, destination_y = 0.0, destination_z = 0.0, destination_e = 0.0; float current_x = 0.0, current_y = 0.0, current_z = 0.0, current_e = 0.0; long x_interval, y_interval, z_interval, e_interval; // for speed delay -float feedrate = 1500, next_feedrate, saved_feedrate; +float feedrate = 1500, next_feedrate, saved_feedrate, current_feedrate=1500; float time_for_move; long gcode_N, gcode_LastN; bool relative_mode = false; //Determines Absolute or Relative Coordinates @@ -126,9 +126,7 @@ long long_step_delay_ratio = STEP_DELAY_RATIO * 100; #endif -float current_feedrate; - // comm variables #define MAX_CMD_SIZE 256 #define BUFSIZE 8 @@ -490,64 +488,62 @@ #endif } - - inline void home_x() { - saved_feedrate = feedrate; - feedrate = 1500; - current_to_dest(); - destination_x = -2*X_MAX_LENGTH; - setup_move(); -#ifdef REPRAP_ACC - linear_move(); -#else - linear_move(x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take); // make the move -#endif - previous_millis_cmd = millis(); - current_x = 0; - feedrate = saved_feedrate; + saved_feedrate = current_feedrate; + current_feedrate = 1500.0; + current_to_dest(); + destination_x = -2.0*X_MAX_LENGTH; + setup_move(); + #ifdef REPRAP_ACC + linear_move(); + #else + linear_move(x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take); // make the move + #endif + current_x = 0; + current_feedrate = saved_feedrate; } - + inline void home_y() { - saved_feedrate = feedrate; - feedrate = 1500; - current_to_dest(); - destination_y = -2*Y_MAX_LENGTH; - setup_move(); -#ifdef REPRAP_ACC - linear_move(); -#else - linear_move(x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take); // make the move -#endif - previous_millis_cmd = millis(); - current_y = 0; - feedrate = saved_feedrate; + saved_feedrate = current_feedrate; + current_feedrate = 1500.0; + current_to_dest(); + destination_y = -2.0*Y_MAX_LENGTH; + setup_move(); + #ifdef REPRAP_ACC + linear_move(); + #else + linear_move(x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take); // make the move + #endif + current_y = 0; + current_feedrate = saved_feedrate; } - + inline void home_z() { - saved_feedrate = feedrate; - feedrate = 50; - current_to_dest(); - destination_z = -2*Z_MAX_LENGTH; - setup_move(); -#ifdef REPRAP_ACC - linear_move(); -#else - linear_move(x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take); // make the move -#endif - previous_millis_cmd = millis(); - current_z = 0; - feedrate = saved_feedrate; -} + saved_feedrate = current_feedrate; + current_feedrate = 100.0; + current_to_dest(); + destination_z = -2.0*Z_MAX_LENGTH; + setup_move(); + #ifdef REPRAP_ACC + linear_move(); + #else + linear_move(x_steps_to_take, y_steps_to_take, z_steps_to_take, e_steps_to_take); // make the move + #endif + current_z = 0; + current_feedrate = saved_feedrate; + } + + + inline void process_commands() { unsigned long codenum; //throw away variable char *starpos=NULL; - bool done; + boolean done; if(code_seen('G')) { switch((int)code_value()) @@ -576,27 +572,28 @@ break; case 28: // Home axis or axes done = false; - if(code_seen('X')) - { - home_x(); - done = true; - } - if(code_seen('Y')) - { - home_y(); - done = true; - } - if(code_seen('Z')) - { - home_z(); - done = true; - } - if(!done) - { - home_x(); - home_y(); - home_z(); - } + if(code_seen('X')) + { + home_x(); + done = true; + } + if(code_seen('Y')) + { + home_y(); + done = true; + } + if(code_seen('Z')) + { + home_z(); + done = true; + } + if(!done) + { + home_x(); + home_y(); + home_z(); + } + previous_millis_cmd = millis(); break; case 90: // G90 relative_mode = false; @@ -780,8 +777,8 @@ if( (millis()-previous_millis_heater) > 1000 ) //Print Temp Reading every 1 second while heating up. { tt=analog2temp(current_raw); - Serial.print("T:"); - Serial.println( tt ); + //Serial.print("T:"); + //Serial.println( tt ); Serial.print("ok T:"); Serial.print( tt ); Serial.print(" B:"); @@ -850,7 +847,7 @@ Serial.print(current_z); Serial.print(" E:"); Serial.println(current_e); - break; + return; } } @@ -1232,24 +1229,36 @@ bool nullmove, real_move; bool direction_f; bool x_can_step, y_can_step, z_can_step, e_can_step, f_can_step; -unsigned long total_steps, t_scale; +long total_steps, t_scale; long dda_counter_x, dda_counter_y, dda_counter_z, dda_counter_e, dda_counter_f; long current_steps_x, current_steps_y, current_steps_z, current_steps_e, current_steps_f; long target_steps_x, target_steps_y, target_steps_z, target_steps_e, target_steps_f; long delta_steps_x, delta_steps_y, delta_steps_z, delta_steps_e, delta_steps_f; float position, target, diff, distance; -unsigned long integer_distance; -unsigned long step_time, time_increment; +long integer_distance; +long step_time, time_increment; -inline unsigned long calculate_feedrate_delay(const unsigned long& feedrate_now) -{ - // Calculate delay between steps in microseconds. Here it is in English: - // (feedrate_now is in mm/minute, distance is in mm, integer_distance is 60000000.0*distance) - // 60000000.0*distance/feedrate_now = move duration in microseconds - // move duration/total_steps = time between steps for master axis. +/* - //return integer_distance/(feedrate_now*total_steps); -return 500; +Calculate delay between steps in microseconds. Here it is in English: + +60000000.0*distance/feedrate_now = move duration in microseconds +move duration/total_steps = time between steps for master axis. + +feedrate_now is in mm/minute, +distance is in mm, +integer_distance is 3000000.0*distance + +To prevent long overflow, we work in increments of 20 microseconds; hence +the 3,000,000 rather than 60,000,000. +*/ + +#define DISTANCE_MULTIPLIER 3000000.0 +#define MICRO_RES 20 + +inline long calculate_feedrate_delay(const long& feedrate_now) +{ + return MICRO_RES*(integer_distance/(feedrate_now*total_steps)); } inline void do_x_step() @@ -1276,8 +1285,42 @@ digitalWrite(E_STEP_PIN, LOW); } +#define ALWAYS_UPDATE 1 +#define CONDITIONAL_UPDATE 2 +#define NEVER_UPDATE 3 + +inline void coord_to_steps(const float& current, const float& destination, long& current_steps, const long& steps_per_unit, + long& target_steps, long& delta_steps, bool& dir, unsigned char dist_check) +{ + position = current; + current_steps = lround(position*steps_per_unit); + target = destination; + target_steps = lround(target*steps_per_unit); + delta_steps = target_steps - current_steps; + if(delta_steps >= 0) dir = 1; + else + { + dir = 0; + delta_steps = -delta_steps; + } + switch(dist_check) + { + case CONDITIONAL_UPDATE: + if(distance > SMALL_DISTANCE2) + return; + case ALWAYS_UPDATE: + diff = target - position; + distance += diff*diff; + break; + case NEVER_UPDATE: + default: + break; + } +} + inline void setup_move() { + if(feedrate > max_feedrate) feedrate = max_feedrate; if(feedrate<10) feedrate=10; @@ -1297,86 +1340,29 @@ nullmove = false; - position = current_x; - current_steps_x = round(position*x_steps_per_unit); - target = destination_x; - target_steps_x = round(target*x_steps_per_unit); - delta_steps_x = target_steps_x - current_steps_x; - if(delta_steps_x >= 0) direction_x = 1; - else - { - direction_x = 0; - delta_steps_x = -delta_steps_x; - } - diff = target - position; - distance = diff*diff; - - position = current_y; - current_steps_y = round(position*y_steps_per_unit); - target = destination_y; - target_steps_y = round(target*y_steps_per_unit); - delta_steps_y = target_steps_y - current_steps_y; - if(delta_steps_y >= 0) direction_y = 1; - else - { - direction_y = 0; - delta_steps_y = -delta_steps_y; - } - diff = target - position; - distance += diff*diff; - - position = current_z; - current_steps_z = round(position*z_steps_per_unit); - target = destination_z; - target_steps_z = round(target*z_steps_per_unit); - delta_steps_z = target_steps_z - current_steps_z; - if(delta_steps_z >= 0) direction_z = 1; - else - { - direction_z = 0; - delta_steps_z = -delta_steps_z; - } - diff = target - position; - distance += diff*diff; - - position = current_e; - current_steps_e = round(position*e_steps_per_unit); - target = destination_e; - target_steps_e = round(target*e_steps_per_unit); - delta_steps_e = target_steps_e - current_steps_e; - if(delta_steps_e >= 0) direction_e = 1; - else - { - direction_e = 0; - delta_steps_e = -delta_steps_e; - } - if(distance < SMALL_DISTANCE2) // Only consider E if it's the only thing that's moving - { - diff = target - position; - distance += diff*diff; - } - + distance = 0.0; + + coord_to_steps(current_x, destination_x, current_steps_x, x_steps_per_unit, + target_steps_x, delta_steps_x, direction_x, ALWAYS_UPDATE); + coord_to_steps(current_y, destination_y, current_steps_y, y_steps_per_unit, + target_steps_y, delta_steps_y, direction_y, ALWAYS_UPDATE); + coord_to_steps(current_z, destination_z, current_steps_z, z_steps_per_unit, + target_steps_z, delta_steps_z, direction_z, ALWAYS_UPDATE); + coord_to_steps(current_e, destination_e, current_steps_e, e_steps_per_unit, + target_steps_e, delta_steps_e, direction_e, CONDITIONAL_UPDATE); + if(distance < SMALL_DISTANCE2) // If only F changes, do it in one shot { nullmove = true; current_feedrate = feedrate; return; } - - position = current_feedrate; - current_steps_f = round(position*f_steps_per_unit); - target = feedrate; - target_steps_f = round(target*f_steps_per_unit); - delta_steps_f = target_steps_f - current_steps_f; - if(delta_steps_f >= 0) direction_f = 1; - else - { - direction_f = 0; - delta_steps_f = -delta_steps_f; - } + coord_to_steps(current_feedrate, feedrate, current_steps_f, f_steps_per_unit, + target_steps_f, delta_steps_f, direction_f, NEVER_UPDATE); + distance = sqrt(distance); - integer_distance = round(distance*60000000.0); + integer_distance = lround(distance*DISTANCE_MULTIPLIER); total_steps = max(delta_steps_x, delta_steps_y); total_steps = max(total_steps, delta_steps_z); @@ -1392,7 +1378,7 @@ } // Rescale the feedrate so it doesn't take lots of steps to do - + t_scale = 1; if(delta_steps_f > total_steps) { @@ -1418,7 +1404,7 @@ dda_counter_f = dda_counter_x; time_increment = calculate_feedrate_delay(t_scale*current_steps_f); - + if(delta_steps_x) enable_x(); if(delta_steps_y) enable_y(); if(delta_steps_z) enable_z(); @@ -1431,39 +1417,13 @@ if (direction_z) digitalWrite(Z_DIR_PIN,!INVERT_Z_DIR); else digitalWrite(Z_DIR_PIN,INVERT_Z_DIR); if (direction_e) digitalWrite(E_DIR_PIN,!INVERT_E_DIR); - else digitalWrite(E_DIR_PIN,INVERT_E_DIR); - -#if 0 + else digitalWrite(E_DIR_PIN,INVERT_E_DIR); - Serial.print("destination_x: "); Serial.println(destination_x); - Serial.print("current_x: "); Serial.println(current_x); - Serial.print("x_steps_to_take: "); Serial.println(delta_steps_x); - Serial.print("time increment: "); Serial.println(time_increment); - Serial.print("total_steps: "); Serial.println(total_steps); - Serial.println(""); - Serial.print("destination_y: "); Serial.println(destination_y); - Serial.print("current_y: "); Serial.println(current_y); - Serial.print("y_steps_to_take: "); Serial.println(delta_steps_y); - Serial.println(""); - Serial.print("destination_z: "); Serial.println(destination_z); - Serial.print("current_z: "); Serial.println(current_z); - Serial.print("z_steps_to_take: "); Serial.println(delta_steps_z); - Serial.println(""); - Serial.print("destination_e: "); Serial.println(destination_e); - Serial.print("current_e: "); Serial.println(current_e); - Serial.print("e_steps_to_take: "); Serial.println(delta_steps_e); - Serial.println(""); - Serial.print("destination_f: "); Serial.println(feedrate); - Serial.print("current_f: "); Serial.println(current_feedrate); - Serial.print("f_steps_to_take: "); Serial.println(delta_steps_f); - Serial.println(""); -#endif - } -inline bool can_step_switch(const long& current, const long& target, bool direction, byte minstop, byte maxstop) +inline bool can_step_switch(const long& here, const long& there, bool direction, int minstop, int maxstop) { - if(current == target) + if(here == there) return false; if(direction) @@ -1479,9 +1439,9 @@ return true; } -inline bool can_step(const long& current, const long& target) +inline bool can_step(const long& here, const long& there) { - return current != target; + return here != there; } void linear_move() // make linear move with preset speeds and destinations, see G0 and G1 @@ -1493,7 +1453,7 @@ } step_time = micros(); - + do { while(step_time > micros()) @@ -1599,18 +1559,29 @@ } if(real_move) // If only F has changed, no point in delaying - step_time += time_increment; + step_time += time_increment; } while (x_can_step || y_can_step || z_can_step || e_can_step || f_can_step); + if(DISABLE_X) disable_x(); if(DISABLE_Y) disable_y(); if(DISABLE_Z) disable_z(); if(DISABLE_E) disable_e(); - current_x = destination_x; - current_y = destination_y; - current_z = destination_z; + if(digitalRead(X_MIN_PIN) != ENDSTOPS_INVERTING) + current_x = 0.0; + else + current_x = destination_x; + if(digitalRead(Y_MIN_PIN) != ENDSTOPS_INVERTING) + current_y = 0.0; + else + current_y = destination_y; + if(digitalRead(Z_MIN_PIN) != ENDSTOPS_INVERTING) + current_z = 0.0; + else + current_z = destination_z; + current_e = destination_e; current_feedrate = feedrate; Modified: trunk/software/firmware/Tonokip_Firmware/configuration.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-05-05 11:21:54 UTC (rev 4123) +++ trunk/software/firmware/Tonokip_Firmware/configuration.h 2011-05-08 17:05:16 UTC (rev 4124) @@ -72,10 +72,12 @@ float y_steps_per_unit = 91.42; float z_steps_per_unit = 5028.6; float e_steps_per_unit = 30; -float max_feedrate = 200000; //mmm, acceleration! #ifdef REPRAP_ACC float f_steps_per_unit = 1; +float max_feedrate = 4000; +#else +float max_feedrate = 200000; //mmm, acceleration! #endif //float x_steps_per_unit = 10.047; Modified: trunk/software/firmware/Tonokip_Firmware/pins.h =================================================================== --- trunk/software/firmware/Tonokip_Firmware/pins.h 2011-05-05 11:21:54 UTC (rev 4123) +++ trunk/software/firmware/Tonokip_Firmware/pins.h 2011-05-08 17:05:16 UTC (rev 4124) @@ -392,7 +392,7 @@ #define X_DIR_PIN 21 #define X_ENABLE_PIN 4 #define X_MIN_PIN 18 -#define X_MAX_PIN -2 //2 +#define X_MAX_PIN -1 //2 #define Y_STEP_PIN 22 #define Y_DIR_PIN 23 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-05 11:22:01
|
Revision: 4123 http://reprap.svn.sourceforge.net/reprap/?rev=4123&view=rev Author: adrian-bowyer Date: 2011-05-05 11:21:54 +0000 (Thu, 05 May 2011) Log Message: ----------- Tonkip firmware wip. Modified Paths: -------------- trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde Modified: trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde =================================================================== --- trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-05-04 23:58:58 UTC (rev 4122) +++ trunk/software/firmware/Tonokip_Firmware/Tonokip_Firmware.pde 2011-05-05 11:21:54 UTC (rev 4123) @@ -1229,22 +1229,20 @@ // Useful to have its square #define SMALL_DISTANCE2 (SMALL_DISTANCE*SMALL_DISTANCE) -bool nullmove, real_move, feed_change; +bool nullmove, real_move; bool direction_f; bool x_can_step, y_can_step, z_can_step, e_can_step, f_can_step; -long total_steps, t_scale; +unsigned long total_steps, t_scale; long dda_counter_x, dda_counter_y, dda_counter_z, dda_counter_e, dda_counter_f; long current_steps_x, current_steps_y, current_steps_z, current_steps_e, current_steps_f; long target_steps_x, target_steps_y, target_steps_z, target_steps_e, target_steps_f; long delta_steps_x, delta_steps_y, delta_steps_z, delta_steps_e, delta_steps_f; float position, target, diff, distance; -long integer_distance; +unsigned long integer_distance; unsigned long step_time, time_increment; -unsigned long check_heater; -inline long calculate_feedrate_delay(long feedrate_now) +inline unsigned long calculate_feedrate_delay(const unsigned long& feedrate_now) { - // Calculate delay between steps in microseconds. Here it is in English: // (feedrate_now is in mm/minute, distance is in mm, integer_distance is 60000000.0*distance) // 60000000.0*distance/feedrate_now = move duration in microseconds @@ -1300,9 +1298,9 @@ nullmove = false; position = current_x; - current_steps_x = (long)position*x_steps_per_unit; + current_steps_x = round(position*x_steps_per_unit); target = destination_x; - target_steps_x = (long)target*x_steps_per_unit; + target_steps_x = round(target*x_steps_per_unit); delta_steps_x = target_steps_x - current_steps_x; if(delta_steps_x >= 0) direction_x = 1; else @@ -1314,9 +1312,9 @@ distance = diff*diff; position = current_y; - current_steps_y = (long)position*y_steps_per_unit; + current_steps_y = round(position*y_steps_per_unit); target = destination_y; - target_steps_y = (long)target*y_steps_per_unit; + target_steps_y = round(target*y_steps_per_unit); delta_steps_y = target_steps_y - current_steps_y; if(delta_steps_y >= 0) direction_y = 1; else @@ -1328,9 +1326,9 @@ distance += diff*diff; position = current_z; - current_steps_z = (long)position*z_steps_per_unit; + current_steps_z = round(position*z_steps_per_unit); target = destination_z; - target_steps_z = (long)target*z_steps_per_unit; + target_steps_z = round(target*z_steps_per_unit); delta_steps_z = target_steps_z - current_steps_z; if(delta_steps_z >= 0) direction_z = 1; else @@ -1342,9 +1340,9 @@ distance += diff*diff; position = current_e; - current_steps_e = (long)position*e_steps_per_unit; + current_steps_e = round(position*e_steps_per_unit); target = destination_e; - target_steps_e = (long)target*e_steps_per_unit; + target_steps_e = round(target*e_steps_per_unit); delta_steps_e = target_steps_e - current_steps_e; if(delta_steps_e >= 0) direction_e = 1; else @@ -1366,9 +1364,9 @@ } position = current_feedrate; - current_steps_f = (long)position*f_steps_per_unit; + current_steps_f = round(position*f_steps_per_unit); target = feedrate; - target_steps_f = (long)target*f_steps_per_unit; + target_steps_f = round(target*f_steps_per_unit); delta_steps_f = target_steps_f - current_steps_f; if(delta_steps_f >= 0) direction_f = 1; else @@ -1386,7 +1384,7 @@ // If we're not going anywhere, flag the fact (defensive programming) - if(total_steps == 0) + if(total_steps <= 0) { nullmove = true; current_feedrate = feedrate; @@ -1434,6 +1432,32 @@ else digitalWrite(Z_DIR_PIN,INVERT_Z_DIR); if (direction_e) digitalWrite(E_DIR_PIN,!INVERT_E_DIR); else digitalWrite(E_DIR_PIN,INVERT_E_DIR); + +#if 0 + + Serial.print("destination_x: "); Serial.println(destination_x); + Serial.print("current_x: "); Serial.println(current_x); + Serial.print("x_steps_to_take: "); Serial.println(delta_steps_x); + Serial.print("time increment: "); Serial.println(time_increment); + Serial.print("total_steps: "); Serial.println(total_steps); + Serial.println(""); + Serial.print("destination_y: "); Serial.println(destination_y); + Serial.print("current_y: "); Serial.println(current_y); + Serial.print("y_steps_to_take: "); Serial.println(delta_steps_y); + Serial.println(""); + Serial.print("destination_z: "); Serial.println(destination_z); + Serial.print("current_z: "); Serial.println(current_z); + Serial.print("z_steps_to_take: "); Serial.println(delta_steps_z); + Serial.println(""); + Serial.print("destination_e: "); Serial.println(destination_e); + Serial.print("current_e: "); Serial.println(current_e); + Serial.print("e_steps_to_take: "); Serial.println(delta_steps_e); + Serial.println(""); + Serial.print("destination_f: "); Serial.println(feedrate); + Serial.print("current_f: "); Serial.println(current_feedrate); + Serial.print("f_steps_to_take: "); Serial.println(delta_steps_f); + Serial.println(""); +#endif } @@ -1457,7 +1481,7 @@ inline bool can_step(const long& current, const long& target) { - return !(current == target); + return current != target; } void linear_move() // make linear move with preset speeds and destinations, see G0 and G1 @@ -1469,16 +1493,16 @@ } step_time = micros(); - check_heater = millis() + 100; do { while(step_time > micros()) { - if(millis() > check_heater) + if((millis() - previous_millis_heater) >= 500) { manage_heater(); - check_heater = millis() + 100; + previous_millis_heater = millis(); + manage_inactivity(2); } } @@ -1489,7 +1513,6 @@ f_can_step = can_step(current_steps_f, target_steps_f); real_move = false; - feed_change = false; if (x_can_step) { @@ -1575,10 +1598,9 @@ } } + if(real_move) // If only F has changed, no point in delaying + step_time += time_increment; - step_time += time_increment; - - } while (x_can_step || y_can_step || z_can_step || e_can_step || f_can_step); if(DISABLE_X) disable_x(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-04 23:59:04
|
Revision: 4122 http://reprap.svn.sourceforge.net/reprap/?rev=4122&view=rev Author: adrian-bowyer Date: 2011-05-04 23:58:58 +0000 (Wed, 04 May 2011) Log Message: ----------- Spelling correction... Added Paths: ----------- trunk/software/firmware/Tonokip_Firmware/ Removed Paths: ------------- trunk/software/firmware/Tonkip_Firmware/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-04 21:42:34
|
Revision: 4120 http://reprap.svn.sourceforge.net/reprap/?rev=4120&view=rev Author: adrian-bowyer Date: 2011-05-04 21:42:27 +0000 (Wed, 04 May 2011) Log Message: ----------- Bug whereby requests to re-send lines sometimes dropped into an infinite loop fixed. Modified Paths: -------------- trunk/software/host/lib/reprap.properties.dist trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java Modified: trunk/software/host/lib/reprap.properties.dist =================================================================== --- trunk/software/host/lib/reprap.properties.dist 2011-05-04 15:44:33 UTC (rev 4119) +++ trunk/software/host/lib/reprap.properties.dist 2011-05-04 21:42:27 UTC (rev 4120) @@ -1,209 +1,205 @@ -#Mon Apr 04 11:22:07 BST 2011 #RepRap machine parameters. See http://objects.reprap.org/wiki/Java_Software_Preferences_File -BaudRate=57600 -BedTemperature(C)=55 -CommsDebug=false +#Fri Apr 29 10:43:50 BST 2011 +Extruder0_ExtrusionLastFoundationWidth(mm)=2 +Extruder2_InfillSpeed(0..1)=1 +Extruder1_FastXYFeedrate(mm/minute)=2500.0 +Extruder2_CoolingPeriod(s)=-1 +Extruder2_ExtrudeRatio(0..)=1 +Extruder0_OffsetX(mm)=0 +Extruder1_ColourB(0..1)=0.3 +Extruder3_OutlineSpeed(0..1)=0.9 +Extruder1_OffsetY(mm)=0 +Extruder2_MaterialType(name)=PLA-infill +Extruder2_OffsetZ(mm)=0 +Extruder2_Reverse(ms)=1200 +Extruder3_SlowXYFeedrate(mm/minute)=1500.0 Debug=false -DumpX(mm)=130 -DumpY(mm)=5 -Extruder0_Address=0 +Extruder0_ValveDelayForLayer(ms)=200 +Extruder3_CoolingPeriod(s)=0.1 +Extruder2_ArcCompensationFactor(0..)=8 +Extruder1_ExtrusionPWM(0..1)=-1 +Extruder0_ExtrusionBroadWidth(mm)=-1 +SlowZFeedrate(mm/minute)=50.0 +MaximumFeedrateX(mm/minute)=2500 +WorkingY(mm)=300 +Extruder3_ExtrusionOverRun(mm)=0 +Extruder0_InfillSpeed(0..1)=1 +Extruder2_MaxAcceleration(mm/minute/minute)=1200000.0 +Extruder3_ValvePulseTime(ms)=500 Extruder0_ArcCompensationFactor(0..)=8 -Extruder0_ArcShortSides(0..)=1 -Extruder0_ColourB(0..1)=0.6 -Extruder0_ColourG(0..1)=0.3 -Extruder0_ColourR(0..1)=0.3 -Extruder0_CoolingPeriod(s)=-1 -Extruder0_EvenHatchDirection(degrees)=45 +Extruder3_ValveDelayForLayer(ms)=200 +DumpX(mm)=143 +Extruder3_SupportMaterialType(name)=null +Extruder1_ExtrusionLastFoundationWidth(mm)=1 +Extruder0_ExtrusionSpeed(mm/minute)=2500 +Extruder1_Address=0 +Extruder2_FastEFeedrate(mm/minute)=18000.0 +Extruder2_ExtrusionSize(mm)=0.5 +Extruder3_MiddleStart=true +Extruder3_MaterialType(name)=PCB-pen +Extruder3_ExtrusionHeight(mm)=0.25 +Extruder2_InFillMaterialType(name)=PLA-infill +Extruder2_ColourG(0..1)=0.8 +Extruder2_ExtrusionDelayForLayer(ms)=500 Extruder0_ExtrudeRatio(0..)=1 -Extruder0_ExtrusionBroadWidth(mm)=-1 +Extruder2_ExtrusionOverRun(mm)=0 +Extruder2_OddHatchDirection(degrees)=-45 +Extruder1_SlowXYFeedrate(mm/minute)=1500.0 +Extruder2_ExtrusionPWM(0..1)=-1 +Extruder1_MaxAcceleration(mm/minute/minute)=1200000.0 +Extruder1_ExtrusionBroadWidth(mm)=2.5 +Extruder2_ExtrusionHeight(mm)=0.25 +Extruder1_ValveDelayForPolygon(ms)=200 +Extruder2_ExtrusionInfillWidth(mm)=1.5 +Extruder3_ExtrusionDelayForPolygon(ms)=500 Extruder0_ExtrusionDelayForLayer(ms)=500 -Extruder0_ExtrusionDelayForPolygon(ms)=0 -Extruder0_ExtrusionFoundationWidth(mm)=2 -Extruder0_ExtrusionHeight(mm)=0.3 -Extruder0_ExtrusionInfillWidth(mm)=0.7 -Extruder0_ExtrusionLastFoundationWidth(mm)=2 -Extruder0_ExtrusionOverRun(mm)=-1 -Extruder0_ExtrusionPercentInfill(0..1)=0.71 -Extruder0_ExtrusionPWM(0..1)=-1 +Extruder1_SupportMaterialType(name)=null +Extruder0_OddHatchDirection(degrees)=-45 +Port(name)=/dev/ttyUSB0 +Extruder2_ExtrusionDelayForPolygon(ms)=50 +BaudRate=57600 +Extruder3_NumberOfShells(0..N)=1 +Extruder1_OffsetX(mm)=0 +Extruder0_ColourR(0..1)=0.3 +Extruder2_OffsetY(mm)=0 +Extruder1_ExtrusionDelayForPolygon(ms)=50 +Extruder2_ColourB(0..1)=0.3 +Extruder3_OffsetZ(mm)=0 +Extruder1_ExtrusionHeight(mm)=0.25 +Extruder3_ColourR(0..1)=0.3 +Extruder0_MiddleStart=true +Extruder3_Reverse(ms)=400 +Extruder2_InfillOverlap(mm)=0.2 +Extruder0_ArcShortSides(0..)=1 Extruder0_ExtrusionSize(mm)=0.5 -Extruder0_ExtrusionSpeed(mm/minute)=3500 -Extruder0_ExtrusionTemp(C)=220 -Extruder0_FastEFeedrate(mm/minute)=18000.0 -Extruder0_FastXYFeedrate(mm/minute)=4000.0 -Extruder0_InFillMaterialType(name)=PLA-infill -Extruder0_InfillOverlap(mm)=0.2 -Extruder0_InfillSpeed(0..1)=1 -Extruder0_Lift(mm)=0 -Extruder0_MaterialType(name)=PLA +Extruder2_FastXYFeedrate(mm/minute)=2500.0 +Shield=false +Extruder0_ExtrusionDelayForPolygon(ms)=50 +Extruder1_ExtrusionOverRun(mm)=3 +FoundationLayers=0 +Extruder2_ExtrusionLastFoundationWidth(mm)=2 +Extruder3_InfillSpeed(0..1)=0.9 +Extruder0_Reverse(ms)=1200 +WorkingX(mm)=300 +Extruder0_ExtrusionHeight(mm)=0.25 Extruder0_MaxAcceleration(mm/minute/minute)=1200000.0 -Extruder0_MiddleStart=true -Extruder0_NumberOfShells(0..N)=2 -Extruder0_OddHatchDirection(degrees)=-45 -Extruder0_OffsetX(mm)=0 -Extruder0_OffsetY(mm)=0 +Extruder3_ExtrusionSpeed(mm/minute)=2500 +Extruder1_ValveDelayForLayer(ms)=200 +Extruder2_NumberOfShells(0..N)=1 +Extruder3_ExtrusionPWM(0..1)=-1 +Extruder2_ExtrusionBroadWidth(mm)=6 Extruder0_OffsetZ(mm)=0 +Extruder0_InfillOverlap(mm)=0.2 +Extruder0_ExtrusionTemp(C)=205 +Extruder0_ExtrusionOverRun(mm)=-1 +Extruder3_ExtrusionLastFoundationWidth(mm)=2 +Extruder3_ExtrudeRatio(0..)=1 +MaximumFeedrateY(mm/minute)=2500 Extruder0_OutlineSpeed(0..1)=0.9 -Extruder0_Purge(ms)=30000 -Extruder0_Reverse(ms)=1200 -Extruder0_SlowXYFeedrate(mm/minute)=1500.0 -Extruder0_SupportMaterialType(name)=null -Extruder0_ValveDelayForLayer(ms)=200 -Extruder0_ValveDelayForPolygon(ms)=200 -Extruder0_ValveOverRun(mm)=-1 +Extruder1_InfillSpeed(0..1)=1 +NumberOfExtruders=4 +Extruder0_ColourG(0..1)=0.3 +Extruder2_Address=0 +MaxXYAcceleration(mm/mininute/minute)=1200000 +Extruder2_ValveDelayForPolygon(ms)=200 +Extruder0_FastEFeedrate(mm/minute)=18000.0 +Extruder3_ColourG(0..1)=0.3 +Extruder3_FastEFeedrate(mm/minute)=8000.0 +Extruder0_InFillMaterialType(name)=PLA-infill +Extruder1_ExtrusionTemp(C)=205 +Extruder1_NumberOfShells(0..N)=0 +Extruder3_ArcCompensationFactor(0..)=8 +Extruder0_FastXYFeedrate(mm/minute)=2500.0 +Extruder3_InFillMaterialType(name)=null +FiveD=true +BedTemperature(C)=65 +FinishY(mm)=190 Extruder0_ValvePulseTime(ms)=-500 -Extruder1_Address=0 Extruder1_ArcCompensationFactor(0..)=8 +Extruder0_ExtrusionInfillWidth(mm)=0.5 Extruder1_ArcShortSides(0..)=1 -Extruder1_ColourB(0..1)=0.3 -Extruder1_ColourG(0..1)=0.6 -Extruder1_ColourR(0..1)=0.9 -Extruder1_CoolingPeriod(s)=-1 -Extruder1_EvenHatchDirection(degrees)=45 +Extruder2_OffsetX(mm)=0 +Extruder2_SlowXYFeedrate(mm/minute)=1500.0 +Extruder3_ExtrusionSize(mm)=0.3 +Extruder3_ExtrusionBroadWidth(mm)=6 +Extruder3_ExtrusionInfillWidth(mm)=1.5 +Extruder3_OffsetY(mm)=0 +Extruder1_ExtrusionSpeed(mm/minute)=2500 +Extruder0_ColourB(0..1)=0.6 Extruder1_ExtrudeRatio(0..)=1 -Extruder1_ExtrusionBroadWidth(mm)=2.5 -Extruder1_ExtrusionDelayForLayer(ms)=500 -Extruder1_ExtrusionDelayForPolygon(ms)=0 -Extruder1_ExtrusionFoundationWidth(mm)=2 -Extruder1_ExtrusionHeight(mm)=0.3 -Extruder1_ExtrusionInfillWidth(mm)=2.5 -Extruder1_ExtrusionLastFoundationWidth(mm)=1 -Extruder1_ExtrusionOverRun(mm)=3 -Extruder1_ExtrusionPWM(0..1)=-1 -Extruder1_ExtrusionSize(mm)=0.5 -Extruder1_ExtrusionSpeed(mm/minute)=3500 -Extruder1_ExtrusionTemp(C)=220 -Extruder1_FastEFeedrate(mm/minute)=18000.0 -Extruder1_FastXYFeedrate(mm/minute)=4000.0 -Extruder1_InFillMaterialType(name)=PLA-support -Extruder1_InfillOverlap(mm)=0 -Extruder1_InfillSpeed(0..1)=1 -Extruder1_Lift(mm)=0 -Extruder1_MaterialType(name)=PLA-support -Extruder1_MaxAcceleration(mm/minute/minute)=1200000.0 +Extruder1_ColourR(0..1)=0.9 Extruder1_MiddleStart=true -Extruder1_NumberOfShells(0..N)=0 -Extruder1_OddHatchDirection(degrees)=45 -Extruder1_OffsetX(mm)=0 -Extruder1_OffsetY(mm)=0 -Extruder1_OffsetZ(mm)=0 +Extruder3_ColourB(0..1)=0.3 +Extruder0_ValveOverRun(mm)=-1 +Extruder0_Lift(mm)=0 +Extruder0_NumberOfShells(0..N)=2 +Extruder3_EvenHatchDirection(degrees)=45 Extruder1_OutlineSpeed(0..1)=0.9 -Extruder1_ExtrusionPercentInfill(0..1)=0.20 -Extruder1_Purge(ms)=30000 -Extruder1_Reverse(ms)=1200 -Extruder1_SlowXYFeedrate(mm/minute)=1500.0 -Extruder1_SupportMaterialType(name)=null -Extruder1_ValveDelayForLayer(ms)=200 -Extruder1_ValveDelayForPolygon(ms)=200 +Extruder0_Purge(ms)=30000 +Extruder0_MaterialType(name)=PLA +Extruder3_ExtrusionDelayForLayer(ms)=600 +Extruder2_ExtrusionTemp(C)=205 +Extruder3_OddHatchDirection(degrees)=-45 Extruder1_ValveOverRun(mm)=2 +Extruder2_SupportMaterialType(name)=null +PathOptimise=true +Extruder0_OffsetY(mm)=0 +Extruder1_OffsetZ(mm)=0 +Extruder1_Reverse(ms)=1200 +Extruder1_ExtrusionDelayForLayer(ms)=500 +Extruder1_Lift(mm)=0 +InterLayerCooling=true +Extruder0_CoolingPeriod(s)=-1 Extruder1_ValvePulseTime(ms)=-500 -Extruder2_Address=0 -Extruder2_ArcCompensationFactor(0..)=8 -Extruder2_ArcShortSides(0..)=1 -Extruder2_ColourB(0..1)=0.3 -Extruder2_ColourG(0..1)=0.8 -Extruder2_ColourR(0..1)=0.3 -Extruder2_CoolingPeriod(s)=-1 +Extruder1_OddHatchDirection(degrees)=45 Extruder2_EvenHatchDirection(degrees)=45 -Extruder2_ExtrudeRatio(0..)=1 -Extruder2_ExtrusionBroadWidth(mm)=6 -Extruder2_ExtrusionDelayForLayer(ms)=500 -Extruder2_ExtrusionDelayForPolygon(ms)=0 -Extruder2_ExtrusionFoundationWidth(mm)=2 -Extruder2_ExtrusionHeight(mm)=0.3 -Extruder2_ExtrusionInfillWidth(mm)=1.5 -Extruder2_ExtrusionLastFoundationWidth(mm)=2 -Extruder2_ExtrusionOverRun(mm)=0 -Extruder2_ExtrusionPercentInfill(0..1)=0.33 -Extruder2_ExtrusionPWM(0..1)=-1 -Extruder2_ExtrusionSize(mm)=0.5 -Extruder2_ExtrusionSpeed(mm/minute)=3500 -Extruder2_ExtrusionTemp(C)=220 -Extruder2_FastEFeedrate(mm/minute)=18000.0 -Extruder2_FastXYFeedrate(mm/minute)=4000.0 -Extruder2_InFillMaterialType(name)=PLA-infill -Extruder2_InfillOverlap(mm)=0.2 -Extruder2_InfillSpeed(0..1)=1 +SlowXYFeedrate(mm/minute)=1500.0 +Extruder1_Purge(ms)=30000 +Extruder1_EvenHatchDirection(degrees)=45 +Extruder3_Address=1 +Extruder3_ExtrusionTemp(C)=0 +Extruder2_ValveDelayForLayer(ms)=200 +Extruder0_EvenHatchDirection(degrees)=45 +Extruder2_ArcShortSides(0..)=1 +Extruder3_FastXYFeedrate(mm/minute)=2500.0 +Extruder2_ValveOverRun(mm)=2 +Extruder0_SlowXYFeedrate(mm/minute)=1500.0 +Extruder3_InfillOverlap(mm)=0.2 +WorkingZ(mm)=300 +Extruder1_ExtrusionSize(mm)=0.5 +CommsDebug=false +Extruder1_CoolingPeriod(s)=-1 +Extruder0_Address=0 Extruder2_Lift(mm)=0 -Extruder2_MaterialType(name)=PLA-infill -Extruder2_MaxAcceleration(mm/minute/minute)=1200000.0 -Extruder2_MiddleStart=true -Extruder2_NumberOfShells(0..N)=1 -Extruder2_OddHatchDirection(degrees)=-45 -Extruder2_OffsetX(mm)=0 -Extruder2_OffsetY(mm)=0 -Extruder2_OffsetZ(mm)=0 Extruder2_OutlineSpeed(0..1)=0.9 +DumpY(mm)=5 +Extruder1_FastEFeedrate(mm/minute)=18000.0 +Extruder3_ValveDelayForPolygon(ms)=200 Extruder2_Purge(ms)=30000 -Extruder2_Reverse(ms)=1200 -Extruder2_SeparationOutlineSpeed(0..1)=1 -Extruder2_SlowXYFeedrate(mm/minute)=1500.0 -Extruder2_SupportMaterialType(name)=null -Extruder2_ValveDelayForLayer(ms)=200 -Extruder2_ValveDelayForPolygon(ms)=200 -Extruder2_ValveOverRun(mm)=2 -Extruder2_ValvePulseTime(ms)=-500 -Extruder3_Address=1 -Extruder3_ArcCompensationFactor(0..)=8 -Extruder3_ArcShortSides(0..)=1 -Extruder3_ColourB(0..1)=0.3 -Extruder3_ColourG(0..1)=0.3 -Extruder3_ColourR(0..1)=0.3 -Extruder3_CoolingPeriod(s)=0.1 -Extruder3_EvenHatchDirection(degrees)=45 -Extruder3_ExtrudeRatio(0..)=1 -Extruder3_ExtrusionBroadWidth(mm)=6 -Extruder3_ExtrusionDelayForLayer(ms)=600 -Extruder3_ExtrusionDelayForPolygon(ms)=500 +Extruder1_MaterialType(name)=PLA-support +FinishX(mm)=10 Extruder3_ExtrusionFoundationWidth(mm)=2 -Extruder3_ExtrusionHeight(mm)=0.3 -Extruder3_ExtrusionInfillWidth(mm)=1.5 -Extruder3_ExtrusionLastFoundationWidth(mm)=2 -Extruder3_ExtrusionOverRun(mm)=0 -Extruder3_ExtrusionPercentInfill(0..1)=0.20 -Extruder3_ExtrusionPWM(0..1)=-1 -Extruder3_ExtrusionSize(mm)=0.3 -Extruder3_ExtrusionSpeed(mm/minute)=3000 -Extruder3_ExtrusionTemp(C)=0 -Extruder3_FastEFeedrate(mm/minute)=8000.0 -Extruder3_FastXYFeedrate(mm/minute)=3000.0 -Extruder3_InFillMaterialType(name)=null -Extruder3_InfillOverlap(mm)=0.2 -Extruder3_InfillSpeed(0..1)=0.9 -Extruder3_Lift(mm)=1 -Extruder3_MaterialType(name)=PCB-pen -Extruder3_MaxAcceleration(mm/minute/minute)=1200000.0 -Extruder3_MiddleStart=true -Extruder3_NumberOfShells(0..N)=1 -Extruder3_OddHatchDirection(degrees)=-45 +Extruder1_InFillMaterialType(name)=PLA-support +Extruder2_ExtrusionFoundationWidth(mm)=2 Extruder3_OffsetX(mm)=0 -Extruder3_OffsetY(mm)=0 -Extruder3_OffsetZ(mm)=0 -Extruder3_OutlineSpeed(0..1)=0.9 -Extruder3_Purge(ms)=10000 -Extruder3_Reverse(ms)=400 +MaximumFeedrateZ(mm/minute)=50 +Extruder0_ExtrusionPWM(0..1)=-1 +Extruder1_ColourG(0..1)=0.6 +Extruder1_ExtrusionFoundationWidth(mm)=2 +Extruder2_MiddleStart=true +MaxZAcceleration(mm/mininute/minute)=3000 +Extruder0_ValveDelayForPolygon(ms)=200 +Extruder0_SupportMaterialType(name)=null +Extruder2_ColourR(0..1)=0.3 +Extruder1_ExtrusionInfillWidth(mm)=2 +Extruder0_ExtrusionFoundationWidth(mm)=2 +Extruder3_Lift(mm)=0 +Extruder2_ValvePulseTime(ms)=-500 +Extruder1_InfillOverlap(mm)=0 Extruder3_SeparationOutlineSpeed(0..1)=1 -Extruder3_SlowXYFeedrate(mm/minute)=1500.0 -Extruder3_SupportMaterialType(name)=null -Extruder3_ValveDelayForLayer(ms)=200 -Extruder3_ValveDelayForPolygon(ms)=200 Extruder3_ValveOverRun(mm)=2 -Extruder3_ValvePulseTime(ms)=500 -FinishX(mm)=10 -FinishY(mm)=190 -FiveD=true -FoundationLayers=0 -InterLayerCooling=true -MaxXYAcceleration(mm/mininute/minute)=1200000 -MaxZAcceleration(mm/mininute/minute)=3000 -MaximumFeedrateX(mm/minute)=3500 -MaximumFeedrateY(mm/minute)=3500 -MaximumFeedrateZ(mm/minute)=50 -NumberOfExtruders=4 -PathOptimise=true -Port(name)=/dev/ttyUSB0 -Shield=true -SlowXYFeedrate(mm/minute)=1500.0 -SlowZFeedrate(mm/minute)=50.0 -WorkingX(mm)=200 -WorkingY(mm)=200 -WorkingZ(mm)=150 +Extruder3_ArcShortSides(0..)=1 +Extruder3_Purge(ms)=10000 +Extruder2_SeparationOutlineSpeed(0..1)=1 +Extruder2_ExtrusionSpeed(mm/minute)=2500 +Extruder3_MaxAcceleration(mm/minute/minute)=1200000.0 Modified: trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java =================================================================== --- trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java 2011-05-04 15:44:33 UTC (rev 4119) +++ trunk/software/host/src/org/reprap/comms/GCodeReaderAndWriter.java 2011-05-04 21:42:27 UTC (rev 4120) @@ -325,7 +325,7 @@ { while ((line = fileInStream.readLine()) != null) { - bufferQueue(line, 0); + bufferQueue(line); bytes += line.length(); fractionDone = (double)bytes/(double)fileInStreamLength; setFractionDone(fractionDone, -1, -1); @@ -507,8 +507,8 @@ /** * Queue a command. */ - private void bufferQueue(String cmd, int retries) throws Exception - { + private void bufferQueue(String cmd) throws Exception + { if(simulationPlot != null) simulationPlot.add(cmd); @@ -517,11 +517,8 @@ nonRunningWarning("queue: \"" + cmd + "\" to"); return; } - if(retries > 3) - { - Debug.e("bufferQueue(): too many retries (" + retries + ") sending " + cmd); - return; - } + + if(sendLine(cmd)) { long resp = waitForResponse(); @@ -531,6 +528,7 @@ } else if (resp == allSentOK) { lineNumber++; + return; } else // Must be a re-send line number { long gotTo = lineNumber; @@ -539,10 +537,18 @@ while(lineNumber <= gotTo && !rCmd.contentEquals("")) { rCmd = ringGet(lineNumber); - bufferQueue(rCmd, retries+1); // Is recursion clever; or stupid? + if(sendLine(rCmd)) + { + resp = waitForResponse(); + if (resp == allSentOK) + return; + if(resp == shutDown) + throw new Exception("The RepRap machine has flagged a hard error!"); + } } } } + Debug.e("bufferQueue(): failed to send " + cmd); } private void resetReceived() @@ -588,7 +594,7 @@ } if(eTemp == Double.NEGATIVE_INFINITY) { - Debug.e("GCodeReaderAndWriter.getETemp() - no value stored!"); + Debug.d("GCodeReaderAndWriter.getETemp() - no value stored!"); return 0; } return eTemp; @@ -607,7 +613,7 @@ } if(bTemp == Double.NEGATIVE_INFINITY) { - Debug.e("GCodeReaderAndWriter.getBTemp() - no value stored!"); + Debug.d("GCodeReaderAndWriter.getBTemp() - no value stored!"); return 0; } return bTemp; @@ -823,7 +829,7 @@ fileOutStream.println(cmd); Debug.c("G-code: " + cmd + " written to file"); } else - bufferQueue(cmd, 0); + bufferQueue(cmd); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-04 15:44:40
|
Revision: 4119 http://reprap.svn.sourceforge.net/reprap/?rev=4119&view=rev Author: adrian-bowyer Date: 2011-05-04 15:44:33 +0000 (Wed, 04 May 2011) Log Message: ----------- Increased the size of the BooleanGrid floodcopy stack. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java Modified: trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java 2011-05-03 10:57:46 UTC (rev 4118) +++ trunk/software/host/src/org/reprap/geometry/polygons/BooleanGrid.java 2011-05-04 15:44:33 UTC (rev 4119) @@ -1760,7 +1760,7 @@ // We implement our own floodfill stack, rather than using recursion to // avoid having to specify a big Java stack just for this one function. - int top = 100000; + int top = 200000; iPoint[] stack = new iPoint[top]; int sp = 0; stack[sp] = p; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <adr...@us...> - 2011-05-03 10:57:52
|
Revision: 4118 http://reprap.svn.sourceforge.net/reprap/?rev=4118&view=rev Author: adrian-bowyer Date: 2011-05-03 10:57:46 +0000 (Tue, 03 May 2011) Log Message: ----------- Bug whereby some bridge lands did not get infilled fixed. Modified Paths: -------------- trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java Modified: trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java =================================================================== --- trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java 2011-04-30 10:56:28 UTC (rev 4117) +++ trunk/software/host/src/org/reprap/geometry/polygons/AllSTLsToBuild.java 2011-05-03 10:57:46 UTC (rev 4118) @@ -32,6 +32,35 @@ public class AllSTLsToBuild { /** + * Class to hold infill patterns + * @author ensab + * + */ + class InFillPatterns + { + BooleanGridList bridges; + BooleanGridList insides; + BooleanGridList surfaces; + RrPolygonList hatchedPolygons; + + InFillPatterns() + { + bridges = new BooleanGridList(); + insides = new BooleanGridList(); + surfaces = new BooleanGridList(); + hatchedPolygons = new RrPolygonList(); + } + + InFillPatterns(InFillPatterns ifp) + { + bridges = ifp.bridges; + insides = ifp.insides; + surfaces = ifp.surfaces; + hatchedPolygons = ifp.hatchedPolygons; + } + } + + /** * 3D bounding box * @author ensab * @@ -753,16 +782,20 @@ // } // } + /** * Compute the bridge infill for unsupported polygons for a slice. This is very heuristic... - * @param unSupported - * @param slice + * + * @param infill + * @param lands * @param layerConditions * @return + * */ - public RrPolygonList bridgeHatch(BooleanGridList unSupported, BooleanGridList lands, LayerRules layerConditions) + public InFillPatterns bridgeHatch(InFillPatterns infill, BooleanGridList lands, LayerRules layerConditions) { - RrPolygonList result = new RrPolygonList(); + InFillPatterns result = new InFillPatterns(infill); + BooleanGridList b; for(int i = 0; i < lands.size(); i++) { @@ -779,8 +812,6 @@ // Wipe this land from the land pattern - //land1.offset(0.5); // Slight hack... - landPattern = BooleanGrid.difference(landPattern, land1); if(cen1 == null) @@ -791,13 +822,13 @@ // Find the bridge that goes with the land - int bridgesIndex = findBridges(unSupported, cen1); + int bridgesIndex = findBridges(result.bridges, cen1); if(bridgesIndex < 0) { - Debug.d("AllSTLsToBuild.bridges(): Land found with no corresponding bridge!"); + Debug.d("AllSTLsToBuild.bridges(): Land found with no corresponding bridge."); continue; } - BooleanGrid bridges = unSupported.get(bridgesIndex); + BooleanGrid bridges = result.bridges.get(bridgesIndex); // The bridge must cover the land too @@ -816,20 +847,24 @@ Rr2Point cen2 = land2.findCentroid(); if(cen2 == null) { - Debug.d("AllSTLsToBuild.bridges(): Second land found with no centroid!"); + Debug.d("AllSTLsToBuild.bridges(): Second land found with no centroid."); // No second land implies a ring of support - just infill it. - result.add(bridge.hatch(layerConditions.getHatchDirection(bridge.attribute().getExtruder()), + result.hatchedPolygons.add(bridge.hatch(layerConditions.getHatchDirection(bridge.attribute().getExtruder()), bridge.attribute().getExtruder().getExtrusionInfillWidth(), bridge.attribute())); + + // Remove this bridge (in fact, just its lands) from the other infill patterns. + + b = new BooleanGridList(); + b.add(bridge); + result.insides = BooleanGridList.differences(result.insides, b); + result.surfaces = BooleanGridList.differences(result.surfaces, b); } else { - // Wipe this land from the land pattern - //land2.offset(0.5); // Slight hack... - landPattern = BooleanGrid.difference(landPattern, land2); // (Roughly) what direction does the bridge go in? @@ -845,44 +880,43 @@ for(int pol = 0; pol < bridgeOutline.size(); pol++) { RrPolygon polygon = bridgeOutline.polygon(i); - //double tooSmall = polygon.meanEdge(); + for(int vertex1 = 0; vertex1 < polygon.size(); vertex1++) { int vertex2 = vertex1+1; if(vertex2 >= polygon.size()) // We know the polygon must be closed... vertex2 = 0; Rr2Point edge = Rr2Point.sub(polygon.point(vertex2), polygon.point(vertex1)); - //if(edge.mod() > tooSmall) - //{ - if((sp = Math.abs(Rr2Point.mul(edge, centroidDirection))) > spMax) - { - spMax = sp; - bridgeDirection = edge; - } - //} + + if((sp = Math.abs(Rr2Point.mul(edge, centroidDirection))) > spMax) + { + spMax = sp; + bridgeDirection = edge; + } + } } // Build the bridge - result.add(bridge.hatch(new RrHalfPlane(new Rr2Point(0,0), bridgeDirection), + result.hatchedPolygons.add(bridge.hatch(new RrHalfPlane(new Rr2Point(0,0), bridgeDirection), bridge.attribute().getExtruder().getExtrusionInfillWidth(), bridge.attribute())); - + // Remove this bridge (in fact, just its lands) from the other infill patterns. + + b = new BooleanGridList(); + b.add(bridge); + result.insides = BooleanGridList.differences(result.insides, b); + result.surfaces = BooleanGridList.differences(result.surfaces, b); } // remove the bridge from the bridge patterns. - BooleanGridList b = new BooleanGridList(); + b = new BooleanGridList(); b.add(bridge); - unSupported = BooleanGridList.differences(unSupported, b); + result.bridges = BooleanGridList.differences(result.bridges, b); } } -// PolygonAttributes pa = new PolygonAttributes(); -// pa.setBridgeThin(0.5); // Test value - needs to be an extruder parameter -// for(int i = 0; i < result.size(); i++) -// result.polygon(i).setPolygonAttribute(pa); - return result; } @@ -897,7 +931,7 @@ { // Where the result will be stored. - RrPolygonList hatchedPolygons; + InFillPatterns infill = new InFillPatterns(); // No more additions or movements, please @@ -913,8 +947,8 @@ if(layerConditions.getModelLayer() < 2 || layerConditions.getModelLayer() > layerConditions.getModelLayerMax() - 3) { slice = slice.offset(layerConditions, false, -1); - hatchedPolygons = slice.hatch(layerConditions, true, null); - return hatchedPolygons; + infill.hatchedPolygons = slice.hatch(layerConditions, true, null); + return infill.hatchedPolygons; } // If we are solid but the slices above or below us weren't, we need some fine infill as @@ -937,20 +971,16 @@ // ...as does the bit with nothing below. BooleanGridList nothingbelow = BooleanGridList.differences(slice, below); - -// // Remove regions common to both - we don't want to infill them twice. -// -// nothingabove = BooleanGridList.differences(nothingabove, nothingbelow); // Find the region that is not surface. - BooleanGridList insides = BooleanGridList.differences(slice, nothingbelow); - insides = BooleanGridList.differences(insides, nothingabove); + infill.insides = BooleanGridList.differences(slice, nothingbelow); + infill.insides = BooleanGridList.differences(infill.insides, nothingabove); // Parts with nothing under them that have no support material // need to have bridges constructed to do the best for in-air infill. - BooleanGridList bridges = nothingbelow.cullNonNull(); + infill.bridges = nothingbelow.cullNonNull(); // The remainder with nothing under them will be supported by support material // and so needs no special treatment. @@ -959,54 +989,50 @@ // All the parts of this slice that need surface infill - BooleanGridList surfaces = BooleanGridList.unions(nothingbelow, nothingabove); + infill.surfaces = BooleanGridList.unions(nothingbelow, nothingabove); // Make the bridges fatter, then crop them to the slice. // This will make them interpenetrate at their ends/sides to give // bridge landing areas. - bridges = bridges.offset(layerConditions, false, 2); - bridges = BooleanGridList.intersections(bridges, slice); + infill.bridges = infill.bridges.offset(layerConditions, false, 2); + infill.bridges = BooleanGridList.intersections(infill.bridges, slice); // Find the landing areas as a separate set of shapes that go with the bridges. - BooleanGridList lands = BooleanGridList.intersections(bridges, BooleanGridList.unions(insides,surfaces)); + BooleanGridList lands = BooleanGridList.intersections(infill.bridges, BooleanGridList.unions(infill.insides,infill.surfaces)); - // The landing areas will be infilled by the bridge-filling function along with the bridges, - // so remove them from the other areas. - - insides = BooleanGridList.differences(insides, lands); - surfaces = BooleanGridList.differences(surfaces, lands); - // Shapes will be outlined, and so need to be shrunk to allow for that. But they // must not also shrink from each other internally. So initially expand them so they overlap // (The 0.75 is a bit of a hack, but it seems to work)... - bridges = bridges.offset(layerConditions, false, 0.75); - insides = insides.offset(layerConditions, false, 0.75); - surfaces = surfaces.offset(layerConditions, false, 0.75); + infill.bridges = infill.bridges.offset(layerConditions, false, 0.75); + infill.insides = infill.insides.offset(layerConditions, false, 0.75); + infill.surfaces = infill.surfaces.offset(layerConditions, false, 0.75); // Now intersect them with the slice so the outer edges are back where they should be. - bridges = BooleanGridList.intersections(bridges, slice); - insides = BooleanGridList.intersections(insides, slice); - surfaces = BooleanGridList.intersections(surfaces, slice); + infill.bridges = BooleanGridList.intersections(infill.bridges, slice); + infill.insides = BooleanGridList.intersections(infill.insides, slice); + infill.surfaces = BooleanGridList.intersections(infill.surfaces, slice); // Now shrink them so the edges are in a bit to allow the outlines to // be put round the outside. The inner joins should now shrink back to be // adjacent to each other as they should be. - bridges = bridges.offset(layerConditions, false, -1); - insides = insides.offset(layerConditions, false, -1); - surfaces = surfaces.offset(layerConditions, false, -1); + infill.bridges = infill.bridges.offset(layerConditions, false, -1); + infill.insides = infill.insides.offset(layerConditions, false, -1); + infill.surfaces = infill.surfaces.offset(layerConditions, false, -1); - // Generate the infill patterns. + // Generate the infill patterns. We do the bridges first, as each bridge subtracts its + // lands from the other two sets of shapes. We want that, so they don't get infilled twice. - hatchedPolygons = insides.hatch(layerConditions, false, null); - hatchedPolygons.add(surfaces.hatch(layerConditions, true, null)); - hatchedPolygons.add(bridgeHatch(bridges, lands, layerConditions)); + infill = bridgeHatch(infill, lands, layerConditions); + infill.hatchedPolygons.add(infill.insides.hatch(layerConditions, false, null)); + infill.hatchedPolygons.add(infill.surfaces.hatch(layerConditions, true, null)); + - return hatchedPolygons; + return infill.hatchedPolygons; /* BooleanGridList adjacentSlices = slice(stl, layer+1, layerConditions); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |