G Roques Log

From Open Source Ecology
Revision as of 00:04, 5 March 2020 by Groques (talk | contribs) (Add entry for March 4 2020)
Jump to navigation Jump to search

Time Log

Wed, March 4 2020

Tue, March 3, 2020

Mon, March 2, 2020

Thu, Feb 27, 2020

Wed, Feb 26, 2020

Mon, Feb 24, 2020

Thu, Feb 20, 2020

Tue, Feb 18, 2020

Mon, Feb 17, 2020

Sat, Feb 15, 2020

Wed, Feb 12, 2020

Tue, Feb 11, 2020

Mon, Feb 10, 2020


Sun, Feb 9, 2020

  • Added beginning of automated test suite for ose 3d printer workbench
  • Added CI with Travis CI and Coverage reports with Coveralls
    • These are reflected by the new Build Status and Coverage Status at the top of the README respectively
  • See https://github.com/gbroques/ose-3d-printer-workbench for details

Sat, Feb 8, 2020

  • Did proof-of-concept (POC) for python unit tests with FreeCAD 0.16 and Docker:
  • Explored getting unit tests for the workbench
    • Can run embedded FreeCAD 18 (installed with Ubuntu snap) with the following command modifying the LD_LIBRARY_PATH environment variable: LD_LIBRARY_PATH=/snap/freecad/8/opt/local/FreeCAD-0.18/lib:/snap/freecad/8/usr/lib/x86_64-linux-gnu:/snap/freecad/8/opt/local/FreeCAD-0.18/Mod /snap/freecad/8/usr/bin/python2.7 test.py
    • Where test.py contains an import FreeCAD statement
    • Tried extracting FreeCAD 16 AppImage to get to lib folders and run embedded
      • However it's missing different static shared libraries (.so files)
    • Unable to install FreeCAD 0.16 (legacy) from PPA as they don't have a version for Bionic (18.04) and Xenial libs were incompatible with Bionic libs
    • Tried compiling version 16 of FreeCAD from source, but it's way too much trouble
    • Discovered it's relatively easy to add a test to the TestWorkbench. See the following forum thread:
    • FreeCAD's python 2.7 is missing the mock package for mocking objects
      • Making unit tests with FreeCAD even more difficult
    • Conclusion: Try adding unit tests later when we upgrade to a later version of FreeCAD. It'll be a lot easier than messing with legacy FreeCAD.

Thu, Feb 6, 2020

Wed, Feb 5, 2020

Mon, Feb 3, 2020

Sat, Feb 1, 2020

Fri, Jan 31, 2020

Thu, Jan 30, 2020

Tue, Jan 28, 2020

Mon, Jan 27, 2020

  • Add Button for heated bed to 3d printer workbench
  • Add carriage box to universal axis model
  • Refactor command registry for greater clarity
  • Start working on attaching axis to frame

Sun, Jan 26, 2020

  • Mainly worked on refactoring 3d printer workbench
    • Created single package for workbench to avoid pollution FreeCAD namespace
    • Got rid of "registry" pattern for main toolbar in favor of a "command collection" pattern
  • Had some email exchange with Marcin on direction of the project.

Sat, Jan 25, 2020

Fri, Jan 24, 2020

  • Got initial 3d printer workbench repository setup locally
    • Need to push to GitHub
  • Learned there's a "new" and "old" style pattern for creating workbenches
    • "new" pattern doesn't work in FreeCAD 16
    • Need to research the drawbacks and limitations of old pattern further

Tue, Jan 21, 2020

Worked on Universal Axis macro:

  • Add screenshot to README
  • Add chamfered motor to universal axis object
  • Display rod diameter as read-only property defaulted to 8 mm
  • Add separate dimensions for motor side box as opposed to using the same dimensions for motor and idler side boxes

Mon, Jan 20, 2020

  • Playing around with creating a Universal Axis object from existing FCStd file
    • Beginning to think we should generate these objects programmatically in Python code
    • Will play around with this idea as well
  • Created Universal Axis Macro repository on GitHub
    • Has a Length property
    • Had to re-create basic shapes like boxes and cylinders
      • 2 boxes: 1 for motor side and 1 for idler side
      • 2 rods connecting the 2 boxes

Sun, Jan 19, 2020

Sat, Jan 18, 2020

  • Continue working on draft proposal
  • Read Scripted Object on FreeCAD wiki
  • Read FeaturePython objects on FreeCAD wiki
    • Includes short tutorial
  • Started working on Universal Axis object macro in FreeCAD
    • Goal is to be able to change the length in a single parameter
    • Importing existing FCstd files into a document is not trivial
      • Assembly 2 gives error when importing simple Universal X axis
      • Loos like skaiser struggled with this in the D3D printer workbench. See commit.
      • A2plus can do it. See below code snippet:
>>> import a2p_importpart
>>> a2p_importpart.importPartFromFile(App.ActiveDocument, '/home/g/Projects/ose-3d-printer-workbench/UniversalAxis.FCStd')
>>> from PySide import QtGui
>>> mw = FreeCADGui.getMainWindow()
>>> mdi = mw.findChild(QtGui.QMdiArea)
>>> sub = mdi.activeSubWindow()
>>> if sub != None:
...     sub.showMaximized()
  • Need to determine if a path forward
    • Figuring out how to import existing FCStd files while maintaining their geometries or
    • Re-create geometries for each part (rods, carriage, motor, idler, etc.) programmatically in Python using FreeCAD building blocks like Sketcher and Part Design workbench APIs

Fri, Jan 17, 2020

Thu, Jan 16, 2020

Researched D3D Printer and OSE FreeCAD workbenches.

Relevant OSE Wiki links:

Workbenches

OSE Developer Test Video

-

Q: How many hours did each part of the test take to complete?

  1. Installing Linux ~ 2 hours
  2. Learning FreeCAD ~ 16 hours
  3. Documenting my work ~ 2 hours

Q: Which section was most difficult?

A: 2. FreeCAD

Q: Add any other feedback you have on the FreeCAD Test or the Developer Test in general.

A: See OSE Developer Test Thoughts section.


Q: Score yourself 0-100 based on the percentage of the Test points that you have completed successfully - and include that score in your work log comments.

A: I believe I completed everything so 100?

OSE Developer Video Cover Letter

FreeCAD Learning Resources


OSE Developer Test Thoughts

OSE Linux Thoughts

  • Creating the Live USB from ISO is easy and straight forward
    • Had a unused 8 GB USB laying around
    • Used Startup Disk Creator on Ubuntu 18.04
    • Had some difficulty finding the correct download link for the latest version of ISO
  • Had difficulties booting from USB even after changing boot order
   grub> ls
   (hd0) ...
   grub> ls (hd0)
   device hd0: ... device information used to obtain uuid for next command
   grub> search --fs-uuid --set=root 2017-10-28-08-56-20-00
   grub> chainloader /EFI/BOOT/grubx64.efi


  • Selecing Wi-Fi network and entering in password each boot is annoying
  • No pre-installed Chrome extensions makes a lot tasks difficult
    • No password manager makes logging into various critical websites difficult:
      • YouTube to listen to music while I work
      • The Open Source Ecology Wiki
        • To jot down notes or save files
      • GitHub
        • To save work
        • To contribute to or debug open source projects like FreeCAD workbenches
  • No SSH key created so I can't easily authenticate and work out of GitHub
  • No code editor setup how I like
    • Visual Studio Code
      • Various extensions like Python support
      • Preferred theme and font
  • Severely out of date software
    • Chromium has banner that says "We've detected you're using an older version of Chrome. Reinstall to stay secure"
      • Gmail - This version of Chrome is no longer supported. Please upgrade to a supported browser.
    • FreeCAD 16 (released April 2016 - 3 and a half years ago at the time of writing)
      • Out of date workbenches
      • No AddOn Manager
      • Assembly 2 workbench is no longer maintained since 2016 and may have issues with FreeCAD 0.17 and above
        • Why spend time to learn something that won't be around in the future?
  • No file persistence is a big down side
  • Installed necessary software for OSE Developer Test manually on Ubuntu 18.04
    • Mostly straight-forward
    • Had difficulties installing FreeCAD
    • Some issue with installing FreeCAD from Software Center in Ubuntu 18.04
    • Installing FreeCAD from PPA didn't work either
      • See here for person with similar issue. Error message is along the lines of "The following packages have unmet dependencies: "x" : Depends: "y" but it is not going to be installed ... Unable to correct problems, you have held broken packages."
    • Uninstalling and re-installing FreeCAD in Software Center fixed "No module named WebGui" error

FreeCAD Thoughts

  • Initially very difficult even for the most basic tasks like moving and rotating objects
  • Frustration led to searching for OSE Developer Test solutions on YouTube
    • Found one solution where the person pastes commands into the Python Interpreter to arrange the cube
    • This seemed a lot easier than messing with the GUI and appealed to my background as a developer
    • Decided to create a FreeCAD macro for the OSE Developer Test
      • Wanted access to GitHub and preferred code editor setup how I like
      • Frustrations with using older FreeCAD 16 when help online referenced latest FreeCAD 18 features
  • Spent a lot of time trying to get auto-completion for FreeCAD API in Visual Studio Code
  • Had difficulty attaching bolt to hole programmatically in Python using the Fasteners workbench
    • Created issue on GitHub repository
    • Spent some time debugging Fasteners workbench
  • Discovered FreeCAD 19 will come out sometime this year (2020) and I'm very excited:
    • GUI looks a lot prettier and there's a dark theme
    • Migrating from Python 2.x to Python 3.x
  • After spending some time completing the OSE Developer Test I feel a lot more comfortable in FreeCAD and see the power in it

Skills

  • Aligned with vision of ending artificial scarcity; civilization construction from scratch
  • Design - web, logo, graphic.
  • Speaking, Dancing Rabbit, NVC
  • Programming