Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trajectory lines not visible #35

Open
7h0mas-R opened this issue Jan 15, 2024 · 8 comments
Open

Trajectory lines not visible #35

7h0mas-R opened this issue Jan 15, 2024 · 8 comments
Assignees

Comments

@7h0mas-R
Copy link

7h0mas-R commented Jan 15, 2024

Setup:
System: Macbook Pro 14", 2021, M1 Pro, 16GB

OS: macOS 12.6.7
Word size of FreeCAD: 64-bit
Version: 0.21.1.33694 (Git)
Build type: Release
Branch: (HEAD detached at 0.21.1)
Hash: f6708547a9bb3f71a4aaade12109f511a72c207c
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * fasteners 0.5.0
  * ExplodedAssembly
  * Help 1.0.3
  * Assembly4 0.50.6
  * Assembly3 0.12.0
  • Installed ExplodedAssembly three days ago from the Addon Manager
  • Select ExplodedAssembly → Load Example File
  • Press Play Forward, Disassemble, Play Backward, Assemble
  • Parts are moving as expected and as shown in the Youtube video, but trajectories are not visible
  • Situation is not changing, when I press the Trajectory Visibility button (even if I manually Refresh)
  • Below is a printout from the python console
  • The only remarkable thing I see is a red exclamation mark at Pocket005 and when I try to open an recompute it, I get an error (see also in the log below) - but as far as I can see, this is unrelated, because in my own drawings I observe the same thing.
# Gui.runCommand('Std_Workbench',15)
# Gui.runCommand('Std_ViewStatusBar',1)
### Begin command Std_Workbench
# Gui.activateWorkbench("ExplodedAssembly")
# App.setActiveDocument("Unnamed")
# App.ActiveDocument=App.getDocument("Unnamed")
# Gui.ActiveDocument=Gui.getDocument("Unnamed")
### End command Std_Workbench
# Gui.runCommand('Std_OrthographicCamera',1)
# Gui.runCommand('LoadExampleFile',0)
# Gui.runCommand('GoToEnd',0)
# Gui.runCommand('GoToStart',0)
# Gui.runCommand('PlayForward',0)
# Gui.runCommand('ToggleTrajectoryVisibility',0)
# Gui.runCommand('GoToStart',0)
# Gui.runCommand('GoToEnd',0)
# Gui.runCommand('Std_FreeCADUserHub',0)
# Gui.runCommand('Std_About',0)
# Gui.runCommand('Std_AddonMgr',0)
# Gui.runCommand('ToggleTrajectoryVisibility',0)
App.activeDocument().recompute(None,True,True)
# Gui.runCommand('ToggleTrajectoryVisibility',0)
App.activeDocument().recompute(None,True,True)
Gui.runCommand('ToggleTrajectoryVisibility',1)
# Gui.runCommand('Std_CloseActiveWindow',0)
App.closeDocument("example")
# Gui.runCommand('Std_OrthographicCamera',1)
# Gui.runCommand('Std_PerspectiveCamera',0)
# Gui.runCommand('Std_CloseActiveWindow',0)
App.closeDocument("Unnamed")
# App.setActiveDocument("")
# App.ActiveDocument=None
# Gui.ActiveDocument=None
# Gui.runCommand('LoadExampleFile',0)
# Gui.runCommand('PlayForward',0)
# Gui.runCommand('ToggleTrajectoryVisibility',0)
# Gui.runCommand('PlayBackward',0)
# Gui.runCommand('GoToStart',0)
# Gui.runCommand('GoToEnd',0)
# Gui.runCommand('ToggleTrajectoryVisibility',0)
# Gui.Selection.addSelection('example','Pocket005')
App.activeDocument().recompute(None,True,True)
# Gui.ActiveDocument.setEdit(App.getDocument('example').getObject('Pocket005'), 0)
# Gui.activateWorkbench('PartDesignWorkbench')
# Gui.Selection.clearSelection()
App.getDocument('example').getObject('Pocket005').Length = 5.000000
App.getDocument('example').getObject('Pocket005').Length2 = 5.000000
App.getDocument('example').getObject('Pocket005').TaperAngle = 0.000000
App.getDocument('example').getObject('Pocket005').TaperAngle2 = 0.000000
App.getDocument('example').getObject('Pocket005').UseCustomVector = 0
App.getDocument('example').getObject('Pocket005').Direction = (1, 1, 1)
App.getDocument('example').getObject('Pocket005').ReferenceAxis = None
App.getDocument('example').getObject('Pocket005').AlongSketchNormal = 1
App.getDocument('example').getObject('Pocket005').Type = 0
App.getDocument('example').getObject('Pocket005').UpToFace = None
App.getDocument('example').getObject('Pocket005').Reversed = 0
App.getDocument('example').getObject('Pocket005').Midplane = 0
App.getDocument('example').getObject('Pocket005').Offset = 0
App.getDocument('example').recompute()
App.getDocument('example').recompute()
# Gui.getDocument('example').resetEdit()
# Gui.activateWorkbench('ExplodedAssembly')
import PartDesignGui
20:51:13  Recompute failed!
20:51:37  Recompute failed!
20:53:29  Recompute failed!
20:53:29  Exploded Assembly workbench loaded

image

@dannystaple
Copy link

I do not see the errors about recompute, but I am also unable to see any trajectory lines.
I too am on macOS 12.6.8:

OS: macOS 12.6.8
Word size of FreeCAD: 64-bit
Version: 0.21.1.33694 (Git)
Build type: Release
Branch: (HEAD detached at 0.21.1)
Hash: f6708547a9bb3f71a4aaade12109f511a72c207c
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: C/Default (C)
Installed mods: 
  * A2plus 0.4.61
  * Manipulator 1.5.6
  * ExplodedAssembly
  * Help 1.0.3
  * Assembly3 0.12.0

@dannystaple
Copy link

This looks like a recent change to the code:
https://github.com/JMG1/ExplodedAssembly/blob/a7f000c9573d8d4786260bdebbb2bbde97a3ebaf/ExplodedAssembly.py#L597C1-L599C11

I wonder if I can force FreeCAD to use a version before that change?

@dannystaple
Copy link

My plan:
Go to /Library/Application Support/FreeCAD/Mod/ExplodedAssembly in a terminal. Then do a checkout to the version prior to this change. This is a risky attempt to work around until it's fixed, and may damage your files! Probably only something to try if comfortable with Git and have a backup of your project files.

This got lines back, but they were not where I expected them to be, which may be the reason they have been disabled.

@7h0mas-R
Copy link
Author

Thanks for the quick confirmation. Though familiar with GIT I am currently not urgently requiring it, so I won't start developing.
Saw the the workbench used by a colleague in windows and wanted to test its capabilities.
Even without the trajectories amazing.
I'll probably just wait for a fix...

@dannystaple
Copy link

I've only started using this workbench this week, but I am also thrilled with the results it's getting me!

@JMG1 JMG1 self-assigned this Feb 24, 2024
@JMG1
Copy link
Owner

JMG1 commented Feb 24, 2024

Added a exception handler to line generation with commit 781a3ff
This feature should be reworked for complicated groups, but lines are showing for the test cases I have.

@cfunseth
Copy link

@JMG1 Would you mind sharing what needs re-working or what your comment about "no longer accurate and needs conversion to new placement" means?

I was starting to dig into this thinking that maybe a Draft Wire would be a more appropriate object to use than a Part Line, as it would allow for more complex trajectories. I just want to be sure I understand your concerns with the current implementation before I go messing with a potentially new solution.

Have you started work on something yourself, or do you plan to?

Thanks!

@furgo16
Copy link

furgo16 commented Mar 2, 2024

@JMG1 I was very glad to see this update, thanks! However, at least in the FreeCAD dev version (0.22), updating the workbench via the Addon Manager does not work for this particular update. When pressing install update, it hangs while downloading it, whereas updating any other workbench/macro/etc. does work. Could this be related to #33?

The workaround was to remove and reinstall the workbench.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants