Code Contributions to the software

thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: Code Contributions to the software

Post 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.
Image
I'm fine with whatever but management resource you want to use. I just hope others are willing to help fix the bugs.

Reza
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: Code Contributions to the software

Post by thereza »

mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Code Contributions to the software

Post 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
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Code Contributions to the software

Post 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
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: Code Contributions to the software

Post 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.
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Code Contributions to the software

Post 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.
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: Code Contributions to the software

Post 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.
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Code Contributions to the software

Post 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!
thereza
Posts: 138
Joined: Fri Feb 13, 2015 11:49 pm

Re: Code Contributions to the software

Post 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
                }
            }
        }
mrandt
Posts: 407
Joined: Mon Apr 27, 2015 10:56 am
Location: Stuttgart, Germany

Re: Code Contributions to the software

Post 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
Post Reply