What's new

AddAngleConstraint trouble

NateLiquidGravity

Alibre Super User
Can anyone else check something. Try getting AddAngleConstraint() to work using a parts YZPlane and a selected face. I get an error msg. The part is valid and face is valid.

Here is the line in my code.
Code:
ThisAssy.AddAngleConstraint(0, my_part, my_part.YZPlane, AlignmentFace, AlignmentFace, 0, "My_Angle")

If I change it to an orient the constraint works fine (but not what I need)
Code:
ThisAssy.AddOrientConstraint(0, my_part, my_part.YZPlane, AlignmentFace, AlignmentFace, 0, "My_Orient")
 

Attachments

  • error angle.png
    error angle.png
    42.1 KB · Views: 14

idslk

Alibre Super User
Hello Nate,

AddAngleConstraint with face and plane throws the same here.
AddAngleConstraint with face and face works fine...

Regards
Stefan
 

ajayre

Alibre Super User
This works:

Code:
Assy = CurrentAssembly()
MyPart = Assy.GetPart('New Part (1)<1>')
MyPart2 = Assy.GetPart('New Part (1)<2>')

Assy.AddAlignConstraint(0, MyPart, MyPart.YZPlane, MyPart2, MyPart2.GetFace('Face<1>'))

Fourth parameter neets to be the part that has the selected face, not the face itself.

Andy
 
Top