Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   IT / Communications (http://www.chiefdelphi.com/forums/forumdisplay.php?f=85)
-   -   Team 254 Open-Source Release: Cheesy Parts (http://www.chiefdelphi.com/forums/showthread.php?t=117806)

ejSabathia 23-07-2013 16:35

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by Pat Fairbank (Post 1284089)
One issue we have is Cheesy Parts getting out of sync with the CAD because some people are too lazy to create entries in it before saving their parts to PDM (cough EJ cough), so being able to query PDM and automagically create Cheesy Parts entries in that case would be nice.

In my defense, I was supposed to have an assistant for that...

tim-tim 23-07-2013 16:41

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by ejSabathia (Post 1284103)
In my defense, I was supposed to have an assistant for that...

You never gave me your login info...

DampRobot 23-07-2013 17:37

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by Zach O (Post 1284091)
Just curious - has anyone tried setting this up locally yet?

Yes, although unsuccessfully so far. I'm trying to set it up in windows 7.

tickspe15 23-07-2013 17:38

Re: Team 254 Open-Source Release: Cheesy Parts
 
is the PDM software part of the package?

tim-tim 23-07-2013 17:48

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by tickspe15 (Post 1284126)
is the PDM software part of the package?

I don't think so. I'm fairly confident the PDM software they use id available from SolidWorks. As of now, there is no direct integration between Cheesy Parts and the PDM. They are not linked.

protoserge 23-07-2013 18:15

Re: Team 254 Open-Source Release: Cheesy Parts
 
Has anyone tried this out yet? http://www.openplm.org/trac This might be a more interesting example: http://www.openplm.org/example3D/mendelmax2.html


I love how clean and intuitive Cheesy Parts is. Great work!

brennonbrimhall 24-07-2013 08:45

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by Pat Fairbank (Post 1284089)
Yeah, PDM integration is something I'd like to add if possible. One issue we have is Cheesy Parts getting out of sync with the CAD because some people are too lazy to create entries in it before saving their parts to PDM (cough EJ cough), so being able to query PDM and automagically create Cheesy Parts entries in that case would be nice. It's not going to be a walk in the cake, though, since the only way I've heard of to integrate with PDM is through some .NET DLL.

Forgive me – as I'm a programmer first and foremost, and know next to nothing about Solidworks (we use Autodesk) – but couldn't you do something with git? It might be easier than interfacing with PDM – as there are plenty of projects like Github, Gitorious, Gitlab, etc. which could be used as a reference point. You could even update the status of each part by a prefix in the commit message or something. Just a thought.

DampRobot 24-07-2013 11:28

Re: Team 254 Open-Source Release: Cheesy Parts
 
I got it working late last night!



The main workaround that it required on windows was adding Spork to the gemfile. I tried a lot of fixes (for gems not loading, rake related errors, etc.), and I'm not 100% sure which ones ended up contributing to it actually working. Hopefully, I'll install it on our windows PDM server in the next few weeks, as well as better document the process for beginners.

Thanks again to Pat Fairbank! His support and help was extremely valuable to me.

DampRobot 24-07-2013 12:27

Re: Team 254 Open-Source Release: Cheesy Parts
 
Here's the process I used to get it working on my Windows 7 laptop.

First, download and install the programs listed on the CP README. I installed Ruby 1.9.3 using Ruby windows installer (or something like that). You're going to need an Oracle account to install MySQL, just do it even though creating new accounts is a hassle. I used default installation settings for both, and installed Ruby in C:\\Ruby193.

After installing Ruby, open up a Ruby command line. You're going to be doing a fair amount of work in this window. I believe now you have to type in "gem install bundler" to install bundler.

Then download the .zip of CP. I unzipped it and put it under C:\\Users\Damp. Then, open the folder "config" in the CP main folder, and double click on the eviornment.rb file to edit it. I just edited it in Wordpad, you'll have to tell Windows which program to edit in. Then, chose a port between 8000 and 10000 and enter it in the quotation marks for port (I used 8010). I put the DB_HOST as "localhost", and put in root and 1234 for the user and password I had set up earlier when installing MySQL. I don't think URL, Gmail and Gmail pass are neccesary, I just put down my Gmail anyway. I deleted anything in the WORDPRESS_AUTH_URL, to leave only two quotation marks, like this "". Save the file and continue.

I had to add a gem later to the gemfile, but I think you can do it now. This is to supplement a gem that only works on Linux and OSX with one that works on Windows. Open the gemfile in CP main (not the .LOCK one), and add this line:

gem 'spork', '~> 0.9.0'

Then, save the file and continue.

Next, you're going to have to change the directory you're working in, to the CP main folder. Do this using the cd command. I entered cd C:\\Users\Damp\cheesy-parts-main in the Ruby command line and hit enter. Then, per the README, I entered bundle install and hit enter. This should download the various gems that CP depends on. Next, type in bundle exec rake db:migrate, which at first brought up some rake errors. I believe I eventually solved them by forcing bundler to install diferent versions of the rake gem by editing the gemfile. Make sure that you don't have multiple instances of rake in the gemfile, this will mess things up. The version of the gemfile that finally worked didn't have any other rake gems besides the rake which was there in the first place, but the fix working might have depended on the rakes that I forcibly installed earlier. Go figure.

Then, run ruby parts_server_control.rb run. If everything went as planned, you should see some message about pressing CTL-C to stop the server if everything went as it should have.

At this point, go to your trusty web browser, and enter http://localhost:[port]. I entered http://localhost:8010. Hit enter, and the CP login page should pop up. At this point, you can login with the user and pass on the CP README, and create other users.

At this point, when I try to create a new part, I get MySQL errors. This might be me, or it might be the CP software. Pat says he's working on it.

This thing required about 8 hours of debugging for me, someone who has zero experience with ruby and MySQL. If I got an error, I'd google the important part of the message, and see what others had done. Sometimes, these fixes would work and sometimes they wouldn't. Again, I couldn't have done this without Pat's gracious help.

Jon Jack 24-07-2013 13:05

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by brennonbrimhall (Post 1284214)
Forgive me – as I'm a programmer first and foremost, and know next to nothing about Solidworks (we use Autodesk) – but couldn't you do something with git? It might be easier than interfacing with PDM – as there are plenty of projects like Github, Gitorious, Gitlab, etc. which could be used as a reference point. You could even update the status of each part by a prefix in the commit message or something. Just a thought.

If you were interested in just checking in and out files, then yes you could use Git. However, Git is intended to be used with text files, not binary files like the ones created by SolidWorks.

In SolidWorks different files are associated with each other. For example, an Assembly will have many parts associated with it. Git has no way of recognizing these types of relationships. So if I'm using Git and I wanted to check out an assembly and all the parts associated with it, then I'd have to manually check out each part. If I wanted to do this in PDM then all I'd have to do is check out the assembly and check a box that checks out all associated files.

Pat Fairbank 24-07-2013 15:40

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by Jon Jack (Post 1284278)
If you were interested in just checking in and out files, then yes you could use Git. However, Git is intended to be used with text files, not binary files like the ones created by SolidWorks.

In SolidWorks different files are associated with each other. For example, an Assembly will have many parts associated with it. Git has no way of recognizing these types of relationships. So if I'm using Git and I wanted to check out an assembly and all the parts associated with it, then I'd have to manually check out each part. If I wanted to do this in PDM then all I'd have to do is check out the assembly and check a box that checks out all associated files.

Plus Git's distributed nature makes it particularly ill-suited to storing CAD files (compared to SVN, for example). When you clone a Git repo, you're not only copying all the binary part/assembly files it contains, you're also downloading all their previous revisions in their entirety, since binary files don't diff well. This is probably measured in the tens of GB by the time a robot design nears completion.

brennonbrimhall 24-07-2013 17:05

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by Jon Jack (Post 1284278)
If you were interested in just checking in and out files, then yes you could use Git. However, Git is intended to be used with text files, not binary files like the ones created by SolidWorks.

In SolidWorks different files are associated with each other. For example, an Assembly will have many parts associated with it. Git has no way of recognizing these types of relationships. So if I'm using Git and I wanted to check out an assembly and all the parts associated with it, then I'd have to manually check out each part. If I wanted to do this in PDM then all I'd have to do is check out the assembly and check a box that checks out all associated files.

Quote:

Originally Posted by Pat Fairbank (Post 1284324)
Plus Git's distributed nature makes it particularly ill-suited to storing CAD files (compared to SVN, for example). When you clone a Git repo, you're not only copying all the binary part/assembly files it contains, you're also downloading all their previous revisions in their entirety, since binary files don't diff well. This is probably measured in the tens of GB by the time a robot design nears completion.

Gotcha -- thanks for the feedback and explanation.

Zach O 25-07-2013 12:55

Re: Team 254 Open-Source Release: Cheesy Parts
 
Just got it running. Thanks Pat - this looks awesome.

Quick support question: When I try restarting/stopping/starting (after the first time) it using the parts_server_control script, I get an error

https://gist.github.com/ZachOrr/6081673

Suggestions?

DampRobot 25-07-2013 13:01

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by Zach O (Post 1284466)
Just got it running. Thanks Pat - this looks awesome.

Quick support question: When I try restarting/stopping/starting (after the first time) it using the parts_server_control script, I get an error

https://gist.github.com/ZachOrr/6081673

Suggestions?

Did you try making a new part/assembly? When I tried, it gave me a MySQL error.

Zach O 25-07-2013 13:08

Re: Team 254 Open-Source Release: Cheesy Parts
 
Quote:

Originally Posted by DampRobot (Post 1284467)
Did you try making a new part/assembly? When I tried, it gave me a MySQL error.

Works fine for me. Is it a permissions problem with your MySQL database?

A quick bare-bones for setting up a MySQL server on Ubuntu https://gist.github.com/ZachOrr/6081773

(try the last command on that)


All times are GMT -5. The time now is 15:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi