Permalink
Browse files

STL preview now is the actual build volumes configured in machines.xml.

In response to issue makerbot#94 by Lenbok. Before it was fixed to 100x100x100mm.
Now it reads the values from the machines.xml files and updates when a
different machine is selected. The BuildVolumes object currently contains
a very simple model of the machine's volume (a 3D block), but there's room
for adding cutouts and keep-out zones (e.g. nozzle cleaning brushes)
that can also be displayed.

http://github.com/makerbot/ReplicatorG/issues#issue/94
  • Loading branch information...
Erik de Bruijn
Erik de Bruijn committed Oct 21, 2010
1 parent 9b9da12 commit a49de32b98b410aa885d1fb3af38e9ac2ac202bb
View
@@ -2,6 +2,7 @@
Contributions:
* justjoheinz: turn off control panel and build menu options when disconnected
* Erik: added 5D driver for RepRap's and compatible firmwares (Ultimaker)
* Erik: STL preview now is the actual build volumes configured in machines.xml
0020 ReplicatorG
Removed:
View
@@ -4,9 +4,9 @@
<machine>
<name>3-Axis Simulator</name>
<geometry type="cartesian">
<axis id="x" length="300" maxfeedrate="1000" scale="11.4485"/>
<axis id="y" length="300" maxfeedrate="1000" scale="11.4485"/>
<axis id="z" length="300" maxfeedrate="100" scale="320"/>
<axis id="x" length="100" maxfeedrate="1000" scale="11.4485"/>
<axis id="y" length="100" maxfeedrate="1000" scale="11.4485"/>
<axis id="z" length="100" maxfeedrate="100" scale="320"/>
</geometry>
<tools>
<tool name="Pinch Wheel Extruder v1.1" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" collet="false" heater="true"/>
@@ -21,9 +21,9 @@
<name>Cupcake CNC</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="5000" scale="11.767463"/>
<axis id="y" length="300" maxfeedrate="5000" scale="11.767463"/>
<axis id="z" length="300" maxfeedrate="150" scale="320"/>
<axis id="x" length="100" maxfeedrate="5000" scale="11.767463"/>
<axis id="y" length="100" maxfeedrate="5000" scale="11.767463"/>
<axis id="z" length="100" maxfeedrate="150" scale="320"/>
</geometry>
<tools>
<tool name="Pinch Wheel Extruder v1.1" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" collet="false" heater="true"/>
@@ -50,9 +50,9 @@ M18
<name>Cupcake CNC w/ heated build platform</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="5000" scale="11.767463"/>
<axis id="y" length="300" maxfeedrate="5000" scale="11.767463"/>
<axis id="z" length="300" maxfeedrate="150" scale="320"/>
<axis id="x" length="100" maxfeedrate="5000" scale="11.767463"/>
<axis id="y" length="100" maxfeedrate="5000" scale="11.767463"/>
<axis id="z" length="96" maxfeedrate="150" scale="320"/>
</geometry>
<tools>
<tool name="Pinch Wheel Extruder v1.1a" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" heatedplatform="true" collet="false" heater="true"/>
@@ -79,9 +79,9 @@ M18
<!-- This configuration is for cupcakes outfitted with a frostruder. -->
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="5000" scale="11.767463"/>
<axis id="y" length="300" maxfeedrate="5000" scale="11.767463"/>
<axis id="z" length="300" maxfeedrate="150" scale="320"/>
<axis id="x" length="100" maxfeedrate="5000" scale="11.767463"/>
<axis id="y" length="100" maxfeedrate="5000" scale="11.767463"/>
<axis id="z" length="100" maxfeedrate="150" scale="320"/>
</geometry>
<tools>
<tool name="Frostruder v1.0" type="extruder" material="abs" motor="false" floodcoolant="false" mistcoolant="false" fan="true" valve="true" collet="false" heater="false">
@@ -111,9 +111,9 @@ M18
<name>EXPERIMENTAL - Cupcake CNC (with SMD v2.4)</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="5000" scale="47.069852"/> <!-- eighth-step driver -->
<axis id="y" length="300" maxfeedrate="5000" scale="47.0698523"/> <!-- eighth-step driver -->
<axis id="z" length="300" maxfeedrate="150" scale="160"/> <!-- full-step driver -->
<axis id="x" length="100" maxfeedrate="5000" scale="47.069852"/> <!-- eighth-step driver -->
<axis id="y" length="100" maxfeedrate="5000" scale="47.0698523"/> <!-- eighth-step driver -->
<axis id="z" length="100" maxfeedrate="150" scale="160"/> <!-- full-step driver -->
</geometry>
<tools>
<tool name="Pinch Wheel Extruder v1.1" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" collet="false" heater="true"/>
@@ -139,9 +139,9 @@ M18
<name>EXPERIMENTAL - Cupcake CNC (Driver 3.0 and Acme threads)</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="5000" scale="47.069852"/> <!-- eighth-step driver -->
<axis id="y" length="300" maxfeedrate="5000" scale="47.0698523"/> <!-- eighth-step driver -->
<axis id="z" length="300" maxfeedrate="200" scale="1308"/> <!-- eighth-step driver -->
<axis id="x" length="100" maxfeedrate="5000" scale="47.069852"/> <!-- eighth-step driver -->
<axis id="y" length="100" maxfeedrate="5000" scale="47.0698523"/> <!-- eighth-step driver -->
<axis id="z" length="100" maxfeedrate="200" scale="1308"/> <!-- eighth-step driver -->
</geometry>
<tools>
<tool name="Pinch Wheel Extruder v1.1" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" collet="false" heater="true"/>
@@ -167,9 +167,9 @@ M18
<name>EXPERIMENTAL - Thingomatic - Gen 4</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="4000" scale="47.069852"/> <!-- Pulley dia: 10.82mm / 1/8 step = 1/(10.82 * pi / 1600) -->
<axis id="y" length="300" maxfeedrate="4000" scale="47.069852"/> <!-- Pulley dia: 10.82mm / 1/8 step = 1/(10.82 * pi / 1600) -->
<axis id="z" length="300" maxfeedrate="1000" scale="200"/> <!-- TR-8x8 Z axis = 1/(8/1600) -->
<axis id="x" length="96" maxfeedrate="4000" scale="47.069852"/> <!-- Pulley dia: 10.82mm / 1/8 step = 1/(10.82 * pi / 1600) -->
<axis id="y" length="108" maxfeedrate="4000" scale="47.069852"/> <!-- Pulley dia: 10.82mm / 1/8 step = 1/(10.82 * pi / 1600) -->
<axis id="z" length="100" maxfeedrate="1000" scale="200"/> <!-- TR-8x8 Z axis = 1/(8/1600) -->
</geometry>
<tools>
<tool name="Plastruder MK5" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" heatedplatform="true" collet="false" heater="true"/>
@@ -195,9 +195,9 @@ M18
<name>EXPERIMENTAL - Thingomatic - Candy</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="4000" scale="13.2629119"/> <!-- Pulley dia: 9.60mm / 1/8 step = 1/(9.60 * pi / 400) -->
<axis id="y" length="300" maxfeedrate="4000" scale="13.2629119"/> <!-- Pulley dia: 9.60mm / 1/8 step = 1/(9.60 * pi / 400) -->
<axis id="z" length="300" maxfeedrate="1000" scale="50"/> <!-- TR-8x8 Z axis = 1/(8/400) -->
<axis id="x" length="96" maxfeedrate="4000" scale="13.2629119"/> <!-- Pulley dia: 9.60mm / 1/8 step = 1/(9.60 * pi / 400) -->
<axis id="y" length="108" maxfeedrate="4000" scale="13.2629119"/> <!-- Pulley dia: 9.60mm / 1/8 step = 1/(9.60 * pi / 400) -->
<axis id="z" length="100" maxfeedrate="1000" scale="50"/> <!-- TR-8x8 Z axis = 1/(8/400) -->
</geometry>
<tools>
<tool name="Plastruder MK5" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" heatedplatform="true" collet="false" heater="true"/>
@@ -223,9 +223,9 @@ M18
<name>EXPERIMENTAL - Thingomatic Halfstep</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="4000" scale="11.767463"/> <!-- Pulley dia: 10.82mm / 1/4 step = 1/(10.82 * pi / 400) -->
<axis id="y" length="300" maxfeedrate="4000" scale="11.767463"/> <!-- Pulley dia: 10.82mm / 1/4 step = 1/(10.82 * pi / 400) -->
<axis id="z" length="300" maxfeedrate="1000" scale="50"/> <!-- TR-8x8 Z axis = 1/(8/400) -->
<axis id="x" length="96" maxfeedrate="4000" scale="11.767463"/> <!-- Pulley dia: 10.82mm / 1/4 step = 1/(10.82 * pi / 400) -->
<axis id="y" length="108" maxfeedrate="4000" scale="11.767463"/> <!-- Pulley dia: 10.82mm / 1/4 step = 1/(10.82 * pi / 400) -->
<axis id="z" length="100" maxfeedrate="1000" scale="50"/> <!-- TR-8x8 Z axis = 1/(8/400) -->
</geometry>
<tools>
<tool name="Plastruder MK5" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" heatedplatform="true" collet="false" heater="true"/>
@@ -251,9 +251,9 @@ M18
<name>Mendel with (5D firmware at 57600 baud)</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="5000" scale="47.069852"/> <!-- 16th-step driver -->
<axis id="y" length="300" maxfeedrate="5000" scale="47.0698523"/> <!-- 16th-step driver -->
<axis id="z" length="300" maxfeedrate="150" scale="160"/> <!-- quarter-step driver -->
<axis id="x" length="200" maxfeedrate="5000" scale="47.069852"/> <!-- 16th-step driver -->
<axis id="y" length="200" maxfeedrate="5000" scale="47.0698523"/> <!-- 16th-step driver -->
<axis id="z" length="140" maxfeedrate="150" scale="160"/> <!-- quarter-step driver -->
</geometry>
<tools>
<tool name="Stepper-based extruder" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" collet="false" heater="true" motor_steps="200" heatedplatform="true" />
@@ -279,9 +279,9 @@ M108 S0
<name>Ultimaker v1.0 (5D firmware)</name>
<geometry type="cartesian">
<!-- different pulleys on X and Y axii -->
<axis id="x" length="300" maxfeedrate="5000" scale="47.069852"/> <!-- 16th-step driver -->
<axis id="y" length="300" maxfeedrate="5000" scale="47.0698523"/> <!-- 16th-step driver -->
<axis id="z" length="300" maxfeedrate="150" scale="160"/> <!-- quarter-step driver -->
<axis id="x" length="210" maxfeedrate="5000" scale="47.069852"/> <!-- 16th-step driver -->
<axis id="y" length="210" maxfeedrate="5000" scale="47.0698523"/> <!-- 16th-step driver -->
<axis id="z" length="210" maxfeedrate="150" scale="160"/> <!-- quarter-step driver -->
</geometry>
<tools>
<tool name="Stepper-based pinch extruder" type="extruder" material="abs" motor="true" floodcoolant="false" mistcoolant="false" fan="true" valve="false" collet="false" heater="true" heatedplatform="true" motor_steps="200" />
@@ -2371,11 +2371,27 @@ protected void setMachine(MachineController machine) {
machine.addMachineStateListener(buttons);
}
machineStatusPanel.setMachine(this.machine);
// TODO: PreviewPanel: update with new machine
}
public MachineController getMachine(){
return this.machine;
}
public void loadMachine(String name) {
setMachine(Base.loadMachine(name));
reloadSerialMenu();
if(previewPanel instanceof PreviewPanel)
{
/* FIXME: This is probably not the best place to do the reload. We need
* the BuildVolume information (through MachineModel) which apparently
* isn't initialized yet when this is called...
*/
Base.logger.info("RELOADING the machine... removing previewPanel...");
getPreviewPanel().rebuildScene();
updateBuild();
}
if (machine.driver instanceof UsesSerial) {
UsesSerial us = (UsesSerial)machine.driver;
if (Base.preferences.getBoolean("serial.use_machines",true) &&
@@ -133,7 +133,7 @@ private BranchGroup makeShape(BuildModel model) {
return wrapper;
}
BuildModel getBuildModel() { return model; }
public BuildModel getBuildModel() { return model; }
public BranchGroup getGroup() {
if (group == null) {
Oops, something went wrong.

0 comments on commit a49de32

Please sign in to comment.