Page 7 of 9
Re: Code Contributions to the software
Posted: Fri Jul 10, 2015 7:57 pm
by thereza
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.
Reza
Re: Code Contributions to the software
Posted: Fri Jul 10, 2015 11:03 pm
by thereza
Re: Code Contributions to the software
Posted: Sat Jul 11, 2015 1:27 pm
by mrandt
Hi Reza,
the code base in SVN is broken again
When trying to build in VS, I ge the following Error:
Code: Select all
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:
Code: Select all
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
Re: Code Contributions to the software
Posted: Sat Jul 11, 2015 6:02 pm
by mrandt
Juha created a repository on GitHub so there is now a place to record and track issues - which may be bugs or feature / enhancement requests.
I started to create some and will continue tomorrow.
Please find the list here:
https://github.com/jkuusama/LitePlacer-ver2/issues
Juha, can you add labels for bugs and features accordingly?
All others, please feel free to comment on my entries.
Thanks and regards
Malte
Re: Code Contributions to the software
Posted: Sat Jul 11, 2015 8:11 pm
by thereza
mrandt wrote:Hi Reza,
the code base in SVN is broken again
When trying to build in VS, I ge the following Error:
Code: Select all
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:
Code: Select all
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.
Re: Code Contributions to the software
Posted: Sat Jul 11, 2015 9:07 pm
by mrandt
Thanks - solved it. I had to manually start the build of Video.DirectShow first.
Once that was complete, building the solution worked.
I saw your comments on some of the issues. I will run more tests with the latest version tomorrow and add issues as I encounter them.
Re: Code Contributions to the software
Posted: Sun Jul 12, 2015 1:23 am
by thereza
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.
Check out latest version.
Re: Code Contributions to the software
Posted: Sun Jul 12, 2015 11:34 am
by mrandt
I will take latest version for a test.
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.
By the way, have you seen my UI mockups and discussion there?
http://liteplacer.com/phpBB/viewtopic.php?f=11&t=93
Thanks!
Re: Code Contributions to the software
Posted: Tue Jul 14, 2015 7:04 am
by thereza
Added this function - moving towards video detection of parts
Code: Select all
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
}
}
}
Re: Code Contributions to the software
Posted: Wed Jul 15, 2015 6:07 pm
by mrandt
Hi Reza,
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?
Thanks
Malte