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

Unable to use the align to edge tool #34

Open
dannystaple opened this issue Jan 11, 2024 · 1 comment
Open

Unable to use the align to edge tool #34

dannystaple opened this issue Jan 11, 2024 · 1 comment

Comments

@dannystaple
Copy link

dannystaple commented Jan 11, 2024

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.

Screenshot 2024-01-11 at 22 49 12

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
Copy link
Owner

JMG1 commented Feb 24, 2024

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.

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

2 participants