1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AddAngleConstraint trouble

Discussion in 'Alibre Script' started by NateLiqGrav, Apr 4, 2019.

  1. NateLiqGrav

    NateLiqGrav 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")
     

    Attached Files:

  2. idslk

    idslk Senior Member

    Hello Nate,

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

    Regards
    Stefan
     
  3. NateLiqGrav

    NateLiqGrav Alibre Super User

    Ok, thanks for confirming. I'll submit to support.
     
  4. ajayre

    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
     
    idslk likes this.
  5. NateLiqGrav

    NateLiqGrav Alibre Super User

    Ok, I'll try.
     

Share This Page