Assembly3 preview
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Assembly3 preview
I am not sure if this is the correct forum to be posting but I have been
having a problem with rescaling TechDraw pages. I had thought it was
something to do with some of my code, but then checked it with the
original main stream version I had written it the code for, 21777 , and everything
works. Downloading 22846 and it works, but certainly with recent
A3_Preview versions it doesn't seem to be working. I have attached the simplest
demo file I can show the problem on. Select Page and change the page scale.
On main stream the page automatically updates, on the Link Branch the
scale changes the view doesn't update, even selecting recompute/redraw .
Have I set something which causes a different action with this branch? Or
missed something fundamentally different between the versions
[NB It shows the same behaviour even with deleted user.cfg
Many Thanks for any help
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2020.10.26.22739 +2702 (Git)
Build type: Release
Branch: LinkStage3
Hash: 82b5884f33de464254b9e116e66ef0e30d5ffe38
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
having a problem with rescaling TechDraw pages. I had thought it was
something to do with some of my code, but then checked it with the
original main stream version I had written it the code for, 21777 , and everything
works. Downloading 22846 and it works, but certainly with recent
A3_Preview versions it doesn't seem to be working. I have attached the simplest
demo file I can show the problem on. Select Page and change the page scale.
On main stream the page automatically updates, on the Link Branch the
scale changes the view doesn't update, even selecting recompute/redraw .
Have I set something which causes a different action with this branch? Or
missed something fundamentally different between the versions
[NB It shows the same behaviour even with deleted user.cfg
Many Thanks for any help
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2020.10.26.22739 +2702 (Git)
Build type: Release
Branch: LinkStage3
Hash: 82b5884f33de464254b9e116e66ef0e30d5ffe38
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
- Attachments
-
- simple_scale_demo.FCStd
- (16.92 KiB) Downloaded 59 times
Re: Assembly3 preview
Not sure if that helps, but in 22611 Linux scaling works after selecting recompute. It does not update automatically, though, but that does not strike me as odd - it might have been like that in the last versions.
Re: Assembly3 preview
Thank you for the reply, I have now dug out a number of
past versions of the Assembly 3 branch to test and rescaling etc
seems to be working normally
in the release on 20200512 (05.12), but is not working on the
20200602 (06.02), next version I have.
Did anything change between these versions relating to the
redraw in TechDraw?
Many Thanks
past versions of the Assembly 3 branch to test and rescaling etc
seems to be working normally
in the release on 20200512 (05.12), but is not working on the
20200602 (06.02), next version I have.
Did anything change between these versions relating to the
redraw in TechDraw?
Many Thanks
Re: Assembly3 preview
OS: Linux Mint 20 (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2020.10.26.22739 +2702 (Git) AppImage
Build type: Release
Branch: LinkStage3
Hash: 82b5884f33de464254b9e116e66ef0e30d5ffe38
Python version: 3.8.6
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
If I have an assembly which does solve but which gives the report:
<asm3.sys> sys_slvs.py(63): redundant constraints
<asm3.sys> sys_slvs.py(68): dof remaining: 0
How would I go about working out which are the redundant constraints so I can remove them?
I'm trying to animate an assembly using a python script and it works however it is really really slow, perhaps 1 second per update. I am wondering if it is being slow because of this "redundant constraints" warning.
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2020.10.26.22739 +2702 (Git) AppImage
Build type: Release
Branch: LinkStage3
Hash: 82b5884f33de464254b9e116e66ef0e30d5ffe38
Python version: 3.8.6
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
If I have an assembly which does solve but which gives the report:
<asm3.sys> sys_slvs.py(63): redundant constraints
<asm3.sys> sys_slvs.py(68): dof remaining: 0
How would I go about working out which are the redundant constraints so I can remove them?
I'm trying to animate an assembly using a python script and it works however it is really really slow, perhaps 1 second per update. I am wondering if it is being slow because of this "redundant constraints" warning.
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Assembly3 preview
This is a bug in TechDraw, because of my changes in document recomputation. I have already fixed it. Will make a new release soon.
If you click the 'Solve' button, it should list the involved constraints, but that information is still too coarse to be of much help, but unfortunately that's all I get from the solver.EskiBrew wrote: ↑Sun Nov 01, 2020 1:53 pm If I have an assembly which does solve but which gives the report:
<asm3.sys> sys_slvs.py(63): redundant constraints
<asm3.sys> sys_slvs.py(68): dof remaining: 0
How would I go about working out which are the redundant constraints so I can remove them?
I'm trying to animate an assembly using a python script and it works however it is really really slow, perhaps 1 second per update. I am wondering if it is being slow because of this "redundant constraints" warning.
There are two solve buttons. Doing a 'Quick solve' is much faster than the full 'Solve', especially when there is redundancy. If you want faster animation, do only quick solve. For even faster animation, you can use two passes. The first pass record each parts placement after calling solve in each time step, and then playback in the second pass by simply assign the parts placement without calling solve, and with auto recompute disabled.
Re: Assembly3 preview
Thanks - It doesn't seem to work that way for me...realthunder wrote: ↑Sun Nov 01, 2020 9:49 pm There are two solve buttons. Doing a 'Quick solve' is much faster than the full 'Solve', especially when there is redundancy. If you want faster animation, do only quick solve. For even faster animation, you can use two passes. The first pass record each parts placement after calling solve in each time step, and then playback in the second pass by simply assign the parts placement without calling solve, and with auto recompute disabled.
If I click "Solve Constraints" or "Quick Solve" in the workbench gui, I get no response in the report view - i.e. it seems to work fine. If however I enter my python in to the python console (or run it as a macro) to do a loop animation - see python code here for a single move:
Code: Select all
import math
document = FreeCAD.activeDocument()
flywheel = document.getObject("Part__Feature019")
flywheel.Placement.Rotation.Angle = math.radians(120)
FreeCADGui.runCommand('asm3CmdQuickSolve',0)
<asm3.sys> sys_slvs.py(63): redundant constraints
<asm3.sys> sys_slvs.py(68): dof remaining: 0
Re: Assembly3 preview
realthunder wrote
problems with TechDraw scripts which used to work. Hoping this might be to solution to them, and frustration level decreasing. .
Thank you for all your work on this branch, exciting and impressive progress
.
Best Wishes
Very many thanks for the note. I am lookforward to the bug fix, recently I seem to have been trying to track down a whole series ofThis is a bug in TechDraw, because of my changes in document recomputation. I have already fixed it. Will make a new release soon.
problems with TechDraw scripts which used to work. Hoping this might be to solution to them, and frustration level decreasing. .
Thank you for all your work on this branch, exciting and impressive progress
.
Best Wishes
Re: Assembly3 preview
Hey everybody,
I'm currently working on an assembly where I've mainly used PlaneCoicident to constrain the assembly. Now I've discovered, that all constraints which I'd used changed to Locked!
The last backup which still mainly has the PlaneCoicident constraint is from 2020-08-03. I've continued to work on this project at the end of October. The file from 2020-10-28 has the Locked constraint only (expect for the constraints which are belonging to two parts I've added at the end of October - that's the change regarding the assembly which I've made).
Unfortunately, I'm not able to reproduce this at the moment.
I tend to use the up to date 0.19_pre version (or close to up to date). This is the version I'm currently using:
OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git) AppImage
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Did this happen to anybody else? Do you have an idea what could have happened?
Thank you!
I'm currently working on an assembly where I've mainly used PlaneCoicident to constrain the assembly. Now I've discovered, that all constraints which I'd used changed to Locked!
The last backup which still mainly has the PlaneCoicident constraint is from 2020-08-03. I've continued to work on this project at the end of October. The file from 2020-10-28 has the Locked constraint only (expect for the constraints which are belonging to two parts I've added at the end of October - that's the change regarding the assembly which I've made).
Unfortunately, I'm not able to reproduce this at the moment.
I tend to use the up to date 0.19_pre version (or close to up to date). This is the version I'm currently using:
OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22846 (Git) AppImage
Build type: Release
Branch: master
Hash: 1f46b72491a0008384a6db4f2615a656249f6f08
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Did this happen to anybody else? Do you have an idea what could have happened?
Thank you!
Regards / Viele Grüße
Max
Max
Re: Assembly3 preview
Assembly3 is really shaping well!
I have an issue though, and maybe it's me, or maybe it's something that needs to be added. In my workflow, I often have to put cylinders through holes (either shafts or screws) and the first part is easy, add an AxialAlignment restriction. This removes 4 degrees of freedom (X, Y, Pitch and Yaw) . However, to finish placing them, I need to constrain Z though, but PlaneCoincident won't do it, since the holes are rarely at the centre of the face. Here's a very simple example: Also, all parts here were made within FreeCad, but often the parts come in STEP format from different manufacturers (screws, motors, etc).
I've tried other constraints, but none seem to do what I want: I need a constraint similar to PointDistance, that takes 2 faces, and constraints only the distance from closest point to closest point, that is, that removes only one DoF. That is, unless there's another better way that I'm not seeing.
This was done in the latest appimage
I have an issue though, and maybe it's me, or maybe it's something that needs to be added. In my workflow, I often have to put cylinders through holes (either shafts or screws) and the first part is easy, add an AxialAlignment restriction. This removes 4 degrees of freedom (X, Y, Pitch and Yaw) . However, to finish placing them, I need to constrain Z though, but PlaneCoincident won't do it, since the holes are rarely at the centre of the face. Here's a very simple example: Also, all parts here were made within FreeCad, but often the parts come in STEP format from different manufacturers (screws, motors, etc).
I've tried other constraints, but none seem to do what I want: I need a constraint similar to PointDistance, that takes 2 faces, and constraints only the distance from closest point to closest point, that is, that removes only one DoF. That is, unless there's another better way that I'm not seeing.
This was done in the latest appimage
Code: Select all
OS: Ubuntu 18.04.5 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22894 (Git) AppImage
Build type: Release
Branch: master
Hash: 9eb080488d970d313c538473e7272117ea0a7cd1
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: Spanish/Spain (es_ES)
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Assembly3 preview
The 'Solve' / 'Quick Solve' button only does a solve if there is any changes to your assembly. The 'Quick solve' command will only print the warning, while 'Solve' command will print out detail constraints.EskiBrew wrote: ↑Sun Nov 01, 2020 11:00 pm Thanks - It doesn't seem to work that way for me...
If I click "Solve Constraints" or "Quick Solve" in the workbench gui, I get no response in the report view - i.e. it seems to work fine. If however I enter my python in to the python console (or run it as a macro) to do a loop animation - see python code here for a single move:
Removing the redundancy will improve speed. But if you really want smooth animation, you'll need a preprocessing stage, where you perform the solve and record all part's placement. See the following code for a rough example. Remember to disable 'Auto recompute'.
Code: Select all
import math
document = FreeCAD.activeDocument()
flywheel = document.getObject("Part__Feature019")
placements = []
assembly = document.getObject('Assembly').Proxy
for i in range(1, 100)
flywheel.Placement.Rotation.Angle = math.radians(120 + i * 5)
FreeCADGui.runCommand('asm3CmdQuickSolve',0)
pla = []
for part in assembly.getPartGroup().Group:
pla.append(part.Placement)
placement.append(pla)
Code: Select all
import time
for pla in placements:
for p,obj in zip(pla, assembly.getPartGroup().Group):
obj.Placement = p
time.sleep(0.1)