Thanks for testing.ThierryM wrote:Rockn, I have installed your "fork" and it's working fine.
MACRO:Work Feature 2014_12
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: MACRO:Work Feature 2014_12
Formations - Assistance - Développement : https://freecad-france.com
-
- Posts: 181
- Joined: Tue Oct 21, 2014 9:47 am
- Location: Pau (France)
Re: MACRO:Work Feature 2014_12
Thank to every body who find this macro useful. I am working to add extra tools (Normal to an object point ,intersection of 2 lines, point mean of a set of points, Tangent plane, circle, ellipse)...all of this are ready but need a bit of more tests from my side
Thierry,
Cool that you fix your installation problem; Could you say to Normandc what "missing" package you installed, I guess he faced the same issue than you. Merci
If some one know how to solve this little issue , I will be very happy to implement.
Rockn,
Thank you very much for your help by creating a "fork" on Github.
I am learning how to use Github so I will be able to put next release in it.
For your info I recreate also a tool to rotate and translate objects in a more "intuitive" manner...i tried to use the standard tool for rotation but did not find it very simple. My plan is to incorporate also 2 tools for adapting (by rotation and translation) on object on another, using a edge or a plane. I guess you asked some tools like that a while ago?
Rentlau_64
Thierry,
Cool that you fix your installation problem; Could you say to Normandc what "missing" package you installed, I guess he faced the same issue than you. Merci
I already answer to Normandc concerning thie issue:Edit : There's a problem with the display, an empty tab (see the picture)
Yes because I discovered that if I open a FreeCAD file after opening my MACRO, after a while my "Work Feature" labelled tab become a "Projet" labelled tab...I fix it by letting the space to "Projet" tab with an empty tab... not very proud of that!An empty tab is created along the "Work Features" tab.
If some one know how to solve this little issue , I will be very happy to implement.
Rockn,
Thank you very much for your help by creating a "fork" on Github.
I am learning how to use Github so I will be able to put next release in it.
For your info I recreate also a tool to rotate and translate objects in a more "intuitive" manner...i tried to use the standard tool for rotation but did not find it very simple. My plan is to incorporate also 2 tools for adapting (by rotation and translation) on object on another, using a edge or a plane. I guess you asked some tools like that a while ago?
Rentlau_64
Re: MACRO:Work Feature 2014_12
You're welcome, As I said I did it mainly to keep my macro folder as clear as possible. Having all these files and folder icon in my macro folder becomes unmanageable. I hope you noticed that.rentlau_64 wrote:Rockn,
Thank you very much for your help by creating a "fork" on Github.
I am learning how to use Github so I will be able to put next release in it.
Me ? I don't remember Since it is possible to project a point on the workplane with snaps tools I have no problem during rotations.rentlau_64 wrote: For your info I recreate also a tool to rotate and translate objects in a more "intuitive" manner...i tried to use the standard tool for rotation but did not find it very simple. My plan is to incorporate also 2 tools for adapting (by rotation and translation) on object on another, using a edge or a plane. I guess you asked some tools like that a while ago?
But I'm looking forward to your tools.
Formations - Assistance - Développement : https://freecad-france.com
Re: MACRO:Work Feature 2014_12
Hi,
The packages that I've installed :
Regards,
Thierry
I'm not proud but in Synaptics I've found all the packages related with python-pyside and as I've Python 2 and 3, I installed them... So I don't know exactly the necessary package(s). But it's work . I tought it was the python's fault because I had the same issue messages when I tried to launch the others macros.rentlau_64 wrote: Cool that you fix your installation problem; Could you say to Normandc what "missing" package you installed, I guess he faced the same issue than you. Merci
The packages that I've installed :
Code: Select all
libpyside-py3-1.2 (1.2.1-4build1)
libshiboken-py3-1.2 (1.2.1-3build1)
python-pyface (4.1.0-1ubuntu3)
python-traits (4.1.0-1ubuntu4)
python3-pyside (1.2.1-4build1)
python3-pyside.phonon (1.2.1-4build1)
python3-pyside.qtcore (1.2.1-4build1)
python3-pyside.qtdeclarative (1.2.1-4build1)
python3-pyside.qtgui (1.2.1-4build1)
python3-pyside.qthelp (1.2.1-4build1)
python3-pyside.qtnetwork (1.2.1-4build1)
python3-pyside.qtopengl (1.2.1-4build1)
python3-pyside.qtscript (1.2.1-4build1)
python3-pyside.qtsql (1.2.1-4build1)
python3-pyside.qtsvg (1.2.1-4build1)
python3-pyside.qttest (1.2.1-4build1)
python3-pyside.qtuitools (1.2.1-4build1)
python3-pyside.qtwebkit (1.2.1-4build1)
python3-pyside.qtxml (1.2.1-4build1)
Thierry
Linux Mint 21.2, 64 bits, Freecad 0.21
Re: MACRO:Work Feature 2014_12
In fact this happen when you use a Draft command in your macro. But it will happen too if you switch language or load some workbenches. After looking at the source, i think the problem is here in gui/CombiView.cpp :rentlau_64 wrote: Yes because I discovered that if I open a FreeCAD file after opening my MACRO, after a while my "Work Feature" labelled tab become a "Projet" labelled tab...I fix it by letting the space to "Projet" tab with an empty tab... not very proud of that!
If some one know how to solve this little issue , I will be very happy to implement.
Code: Select all
void CombiView::changeEvent(QEvent *e)
{
if (e->type() == QEvent::LanguageChange) {
tabs->setTabText(0, trUtf8("Model"));
tabs->setTabText(1, trUtf8("Tasks"));
tabs->setTabText(2, trUtf8("Project")); << Remove or comment this line
}
DockWindow::changeEvent(e);
}
Code: Select all
// task panel
//projectView = new Gui::ProjectWidget(this);
//tabs->addTab(projectView, trUtf8("Project"));
I compiled the latest source with this change and it seems solve this issue. I hope someone will read this and could apply it because i don't know where and how commit something.
Sorry if i am wrong and if my english is not good ...
Re: MACRO:Work Feature 2014_12
No, I run Ubuntu 14.04 LTS. Sorry, should have included my FreeCAD info.rentlau_64 wrote:Normandc,
As Mario said as soon the zip or tar file is extracting all the files into your MACRO directory it must works....
Stange behavior that you described ? Do you run FreeCAD under Windows (I never tested under Windows)?
It didn't cross my mind.rentlau_64 wrote:Did you tested an old release to see If I made a mistake in the recent one? i.e. WF_2015_01_18.tar.gz ?
But rockn's fork worked straight away when I placed the files in my Macros folder and launched the start_WF.FCMacro script.
Thanks rockn! I also prefer this solution.rockn wrote:I made a little improvement to the macro. It's nothing but as I very don't like having all this file in my macro folders I have done this
OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4556 (Git)
Branch: master
Hash: cd5783ac2e3fdd3e0ec8f5a03aa4df1e98364e13
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1
Re: MACRO:Work Feature 2014_12
FreeCAD relies on Python2, not Python3, so all those python3-pyside packages were unnecessary. Unless you have another program which relies on them.ThierryM wrote:I've found all the packages related with python-pyside and as I've Python 2 and 3, I installed them
I have the first two packages installed (libpyside-py3-1.2 and libshiboken-py3-1.2) even though they are Python3 related thus not used by FreeCAD (they are hard dependencies of packages which are required by FreeCAD).
After testing I found that my problem was two-fold:
- python-pyface and python-traits seem to be required (the first depends on the second)
- The macro won't launch if the Macro folder contains any non-ASCII characters. My folder is named Macros_FreeCAD. I tried a space, a dash, accented letters: the original macro won't start with those.
One time out of two, I'm getting this error:
Code: Select all
Traceback (most recent call last):
File "/home/normand/Dessins/Macros_FreeCAD/start_WF.FCMacro", line 1, in <module>
import WorkFeature
<type 'exceptions.ImportError'>: No module named WorkFeature
It is quite late here and I can't think straight, I will have to continue testing in the morning.
Re: MACRO:Work Feature 2014_12
it is an error path that is why it can not find the macro
I tried "C:\tmp\home\normand\Dessins\Macros_FreeCAD" and it Works ??
mario
I tried "C:\tmp\home\normand\Dessins\Macros_FreeCAD" and it Works ??
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
-
- Posts: 181
- Joined: Tue Oct 21, 2014 9:47 am
- Location: Pau (France)
Re: MACRO:Work Feature 2014_12
Normandc,
I do not have the same issue but you could try to replace the 2 lines into start_WF.FCMacro by:
Let us know if it solve the issue in order I add this into GitHub
Merci
Rentlau_64
as Mario said it looks like an error of PYTHONPATH variableAlso, it looks like rockn's version does not work all the time.
One time out of two, I'm getting this error:
Code: Select all
Traceback (most recent call last):
File "/home/normand/Dessins/Macros_FreeCAD/start_WF.FCMacro", line 1, in <module>
import WorkFeature
<type 'exceptions.ImportError'>: No module named WorkFeature
I should mention that after each attempted launch, I delete the "WFGui_2015_01_25.pyc" that gets created after successful launch, I close FreeCAD then launch it again.
I do not have the same issue but you could try to replace the 2 lines into start_WF.FCMacro by:
Code: Select all
# -*- coding: utf-8 -*-
import sys
import os.path
try:
# try import
import WorkFeature
except:
# get the path of the current python script
m_current_path = os.path.realpath(__file__)
m_current_path = os.path.dirname(m_current_path)
# check if this path belongs to the PYTHONPATH variable and if not add it
if not sys.path.__contains__(str(m_current_path)):
sys.path.append(str(m_current_path))
# retry import now
import WorkFeature
WorkFeature.WorkFeatureTab()
Merci
Rentlau_64
-
- Posts: 181
- Joined: Tue Oct 21, 2014 9:47 am
- Location: Pau (France)
Re: MACRO:Work Feature 2014_12
Guys,
Find a new release of WORK FEATURE MACRO at
https://github.com/Rentlau/WorkFeature.git
i include a new tool to cut objects in two pieces.
Please keep me inform of issues and comments
Thank you
Rentlau_64
Find a new release of WORK FEATURE MACRO at
https://github.com/Rentlau/WorkFeature.git
i include a new tool to cut objects in two pieces.
Please keep me inform of issues and comments
Thank you
Rentlau_64