more explanation , tools used, screenshot ...
thanks
mario
more explanation , tools used, screenshot ...
Code: Select all
C:\Users\Mario\AppData\Roaming\FreeCAD\Mod\WorkFeature\
Code: Select all
"C:\Your FreeCAD name\bin\FreeCAD.exe" "C:\Users\UserName\AppData\Roaming\FreeCAD\Mod\WorkFeature\start_WF.FCMacro"
Thanks Mario, my install of freecad was not pointing to the correct directory for the macro, and yes I was expecting it to be a workbench. I have found it and able to launch, haven't yet tried to use the fuctions of workfeatures yet. What is the difference between WF.FCMacro and start_WF.py ?mario52 wrote: ↑Fri Dec 06, 2019 11:06 am hi
"workfeature-macro" is a macro and not a workbench (contrary to "workfeature") you must run the macro "start_WF.py" (or start_WF.FCMacro) in :
or if the macro in helpfull fot you (as my) you must modify the property of the FreeCAD shortcut as this command line:Code: Select all
C:\Users\Mario\AppData\Roaming\FreeCAD\Mod\WorkFeature\
(correct the path if the macro is installed in other directory)Code: Select all
"C:\Your FreeCAD name\bin\FreeCAD.exe" "C:\Users\UserName\AppData\Roaming\FreeCAD\Mod\WorkFeature\start_WF.FCMacro"
try this and report please
PS: the new "workfeature" workbench (same feature of the macro in the future) is still in development by rentlau_64 but personally i prefer the macro she is always available and not the workbench
mario
for the code any difference same code
Code: Select all
import start_WF
from importlib import reload
reload(start_WF)
Cheers Mario, thank you, I now understand.mario52 wrote: ↑Sat Dec 07, 2019 4:30 pm hi
good
for the code any difference same code
start_WF.FCMacro run as a macro FreeCAD
and start_WF.py with the interpreter Python
enjoyCode: Select all
import start_WF from importlib import reload reload(start_WF)
mario
(split)rentlaw_64 wrote:ping
Code: Select all
SelObj = Gui.Selection.getSelectionEx()
tolerance = 1e-10
NormalA = SelObj[0].SubObjects[0].normalAt(0,0)
VAB = (SelObj[1].SubObjects[0].CenterOfMass-SelObj[0].SubObjects[0].CenterOfMass).normalize()
if NormalA.dot(VAB) == 0.0:
FreeCAD.Console.PrintMessage("\nCoplanar faces\n")
else:
FreeCAD.Console.PrintMessage("\nNon coplanar faces\n")