Feature: offset tool in sketcher

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Feature: offset tool in sketcher

Post by openBrain »

chrisb wrote: Fri Jul 23, 2021 2:13 pm I would like to see it in the AddonManager as well.
If when opening addon-manager & clicking on the "Macros" tab, you see the below message in the Report View, then you're missing GitPython module

Code: Select all

GitPython not installed! Cannot retrieve macros from git
LHC
Posts: 285
Joined: Thu Sep 17, 2020 4:21 pm
Location: Canada

Re: Feature: offset tool in sketcher

Post by LHC »

openBrain wrote: Fri Jul 23, 2021 2:34 pm
chrisb wrote: Fri Jul 23, 2021 2:13 pm I would like to see it in the AddonManager as well.
If when opening addon-manager & clicking on the "Macros" tab, you see the below message in the Report View, then you're missing GitPython module

Code: Select all

GitPython not installed! Cannot retrieve macros from git
Yup - that's what I see in the report view. So..... I have no clue about git - and it's not installed on my computer. Is it possible to install git python and not git, just to get to see the macros that are on the git repository, or is this too cumbersome for a newbie.

Thanks

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.24894 (Git)
Build type: Release
Branch: master
Hash: a378b6b66f8a5992fc1452567ff59bdb613abc80
Python version: 3.8.10
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
chrisb
Veteran
Posts: 43406
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature: offset tool in sketcher

Post by chrisb »

I have installed GitPython, but I see the message anyway.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Feature: offset tool in sketcher

Post by openBrain »

chrisb wrote: Fri Jul 23, 2021 9:24 pm I have installed GitPython, but I see the message anyway.
How did you install ? I'm not so familiar with MacOS but I guess you use .dmg files who are standalone apps (like AppImage are). In this case FreeCAD uses the Python that is bundled and you have to install GitPython there.
What if you enter this in Python Console ?

Code: Select all

from git import Repo
chrisb
Veteran
Posts: 43406
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature: offset tool in sketcher

Post by chrisb »

I installed it with pip as recommended on the website.
openBrain wrote: Sun Jul 25, 2021 5:49 pm
chrisb wrote: Fri Jul 23, 2021 9:24 pm What if you enter this in Python Console ?

Code: Select all

from git import Repo
I get this error message:

Code: Select all

>>> from git import Repo
Traceback (most recent call last):
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/git/__init__.py", line 87, in <module>
    refresh()
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/git/__init__.py", line 76, in refresh
    if not Git.refresh(path=path):
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/git/cmd.py", line 243, in refresh
    cls().version()
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/git/cmd.py", line 585, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/git/cmd.py", line 1124, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/git/cmd.py", line 928, in execute
    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git version
  stderr: 'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/git/__init__.py", line 89, in <module>
    raise ImportError('Failed to initialize: {0}'.format(exc)) from exc
ImportError: Failed to initialize: Cmd('git') failed due to: exit code(1)
  cmdline: git version
  stderr: 'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun'
>>> 
There seems to be indeed a clash between the system installation and the FreeCAD Python.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Feature: offset tool in sketcher

Post by openBrain »

Have you git installed?
chrisb
Veteran
Posts: 43406
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature: offset tool in sketcher

Post by chrisb »

Git is installed, but shows a message about missing xcrun as well. I have to investigate that.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: Feature: offset tool in sketcher

Post by Cekuhnen »

chrisb wrote: Fri Jul 23, 2021 2:13 pm I would like to see it in the AddonManager as well.
Yes agreed

---

I cannot get the macro to do anything.
I copy and pasted it into a new macro and assigned it to a new custom toolbar for the sketcher.

when I execute the macro based on my selection nothing comes in terms of an error.
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
chrisb
Veteran
Posts: 43406
Joined: Tue Mar 17, 2015 9:14 am

Re: Feature: offset tool in sketcher

Post by chrisb »

openBrain wrote: Sun Jul 25, 2021 5:49 pm
Thanks for the help. I fixed my installation and now it works (after restarting FreeCAD).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Feature: offset tool in sketcher

Post by openBrain »

chrisb wrote: Tue Jul 27, 2021 12:06 am Thanks for the help. I fixed my installation and now it works (after restarting FreeCAD).
Not sure I did something significant but glad it works for you.
Post Reply