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

How to use constraint "align", "mate", "orient"... to assemble components #80

Open
G-dab opened this issue Nov 1, 2023 · 0 comments
Open

Comments

@G-dab
Copy link

G-dab commented Nov 1, 2023

  • Creo version: 10.0
  • Creopyson version: 0.7.6
  • Creoson version: 2.8.0
  • Python version: 3.8.10
  • Operating System: Windows 10

Description

I try to use c.file_assemble() to assemble components, and use constraints "csys" "fix" successfully. But fail when using constraints "mate", "align",....

I think the problem is with the constraint settings but have no idea what to do

What I Did

this is my code

constraint1 = [
    {
        "type": "csys",
        "asmref": "GAN_REF",
        "asmref": "GAN_REF",
        "compref": "TOU_REF",

    }
]
constraint2 = [
    {
        "type": "align",
        "asmref": "G_TOP",
        "compref": "T_TOP",
    }
]
    
c.file_assemble(file_="边杆零件.prt", into_asm="杆子装配试验.asm", constraints=constraint1)
c.file_assemble(file_="公接头.prt", into_asm="杆子装配试验.asm", 
                ref_model="边杆零件.prt",
                constraints=constraint3)

this is the error

RuntimeError: A Pro/TOOLKIT error has occurred: General Error.  Check your model/drawing for accuracy.

"G_TOP" and "T_TOP" are existing surface, so I don't know where the error occurs

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

1 participant