Unable to use the align to edge tool
Opened this issue · 1 comments
dannystaple commented
The tool help suggests that I select the edge of an object to align, then an edge as a reference. So I select an edge from part 1, and holding command (MacOS) select an edge from part 2.
I then click the "Align to Edge" button in Exploded Assembly
The edges were both straight edges on the parts.
What I expected to happen
The two edges would be mated, perhaps without changing the orientation of the parts, since I saw no way to specify the orientation for this.
What actually happens
- No objects move.
- Nothing is created in the "ExplodedAssembly" object in the tree.
- The following error appears:
'Part.Line' object has no attribute 'EndPoint'Running the Python command 'AlignToEdge' failed:
Traceback (most recent call last):
File "/Users/danielstaple/Library/Application Support/FreeCAD/Mod/ExplodedAssembly/EAInit.py", line 386, in Activated
va = (edgeA.Curve.EndPoint - edgeA.Curve.StartPoint).normalize()
Console output:
>>> # Gui.Selection.addSelection('fitting_distance_sensor','Body','Pocket003.Edge40',-22.5046,-97.5,3)
>>> # Gui.Selection.addSelection('fitting_distance_sensor','Part','Body001.Pocket001.Edge13',-10.6663,-89.25,35)
>>> # Gui.runCommand('AlignToEdge',0)
About my FreeCAD
I am running v0.21.1:
[code]
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.60k
* ExplodedAssembly
[/code]
JMG1 commented
This could happen that one of the edges is not a line. As for the function of this tool, it makes the edges face the same orientation but does not place them together.