I had a problem when I restarted the system and the last command inverted the Z homing so when I homed it broke my needle - so now it issues the commands to turn off probing on startup.
I made the change to the job table to make it a combobox and after finding the right settings I got the behavior I wanted working - allowing you to select multiple boxes and change them at once.
I'm fine with whatever but management resource you want to use. I just hope others are willing to help fix the bugs.
Error 1 Metadata file 'C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\Release\AForge.Video.DirectShow.dll' could not be found C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\CSC LitePlacer
Once I copied the DLL from C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\bin\Release to that directory as well, I got further but then had another error:
Error 1 The type or namespace name 'VideoProcAmpFlags' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\Video\VideoCapture.cs 261 44 LitePlacer
Error 2 The name 'VideoProcAmpFlags' does not exist in the current context C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\Video\VideoCapture.cs 261 70 LitePlacer
Suppose missing files or updated files not commited. Could you double-check please?
Error 1 Metadata file 'C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\Release\AForge.Video.DirectShow.dll' could not be found C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\CSC LitePlacer
Once I copied the DLL from C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\bin\Release to that directory as well, I got further but then had another error:
Error 1 The type or namespace name 'VideoProcAmpFlags' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\Video\VideoCapture.cs 261 44 LitePlacer
Error 2 The name 'VideoProcAmpFlags' does not exist in the current context C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\Video\VideoCapture.cs 261 70 LitePlacer
Suppose missing files or updated files not commited. Could you double-check please?
Thanks.
Malte
Remove the dll. If you build the solution it should work. Or right click on the Video.DirectShow project and build that first. Was that dll in SVN? if so it should be removed.
Added right click context menus to the component list. Click on designator. Helps clean up the ui. Will use that approach more moving forward. Placement tracking added and error making with the ability to skip failed company's and still continue.
I agree that it looks cleaner with less buttons - but also requires additional right clicks. I am not sure how I feel about that yet... Will try and let you know.
public void TakePhotosOfAllComponents() {
var dir = Global.BaseDirectory + @"\images\";
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
foreach (var t in tapeObjs) {
if (t.TemplateFilename == null) {
var size = t.GetComponentSize();
if (size == null) continue;
var s = new PartLocation(size.Width, size.Height); //assumes 0 degree rotation
s = (1.25*s)/MainForm.cameraView.downVideoProcessing.mmPerPixel; //convert to pixels and ad extra 25%
s.Rotate(t.PartAngle * Math.PI / 180d); //and rotate to final position
GoToNextComponent(t);
MainForm.cameraView.DownCameraReset();
Global.DoBackgroundWork(); //let new images be processed\
var filter = new Crop(
new Rectangle( MainForm.cameraView.downVideoProcessing.FrameCenter.ToPoint(),
new Size((int)Math.Abs(s.X), (int)Math.Abs(s.Y))) //note rotation can result in negative valuse so we use abs
);
using (var image = MainForm.cameraView.downVideoProcessing.GetMeasurementFrame()) {
using (var cropped = filter.Apply(image)) {
var filename = dir + t.ID.Replace(" ", "_") + ".jpg";
cropped.Save(filename, ImageFormat.Jpeg);
t.TemplateFilename = filename;
}
}
SaveAll(); //save as we go along
}
}
}
checked out and tried to build Release 17 but it does not compile - version 16 also has errors.
There is a typo in MainForm.cs, line 292 - a missing colon (;), easily fixed.
Still, the following errors persist:
Error 1 'bool LitePlacer.FormMain.manualLocationEntry_Click(object, System.EventArgs)' has the wrong return type C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\MainForm.Designer.cs 487 40 LitePlacer
Error 2 'bool LitePlacer.FormMain.manualLocationEntry_Click(object, System.EventArgs)' has the wrong return type C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\MainForm.Designer.cs 502 40 LitePlacer
Error 3 'bool LitePlacer.FormMain.manualLocationEntry_Click(object, System.EventArgs)' has the wrong return type C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\MainForm.Designer.cs 527 40 LitePlacer
Error 4 'bool LitePlacer.FormMain.manualLocationEntry_Click(object, System.EventArgs)' has the wrong return type C:\Users\Malte\Documents\svn\liteplacerrmod\trunk\LitePlacer\MainForm.Designer.cs 552 40 LitePlacer
Not sure what is happening there. Could you have a look?