"Broken" constraints when rotating model using model states

tsteegman
Contributor
Contributor

"Broken" constraints when rotating model using model states

tsteegman
Contributor
Contributor

Hey! I'm working on a rather big model in which a crane needs to rotate to multiple angles (both around the vertical axis, as well as horizontally) to show a lifting sequence. If the difference in rotation around the vertical between two subsequent model states is close to 180 degrees, it seems the model starts to break down. Inventor will say one constraint is broken (the one inserting the boom to the main rotating body of the crane). And instead of showing it properly, it will release the boom from the hinge, and move it such that it is flying, but with the main rotating part of the crane pointing in the wrong direction as well. If I include multiple steps in between each big rotation, say 60 degrees each step, Inventor is completely fine with it, and it doesn't break the constraint anymore. This, however, is no option. The current model consists of around 15 model states, but this will be close to 100 when everything is done. With the intermediate steps this would become closer to 300, and for obvious reasons I'd like to avoid that.

As for the model itself, the crane + boom is in a flexible subassembly. I've tried setting up the constraints in multiple ways, but to no avail. Also, I've tried setting up a model state in which the crane rotates to the opposite side, but this still results in Inventor claiming the boom to crane constraint modeling the hinge is still broken.

I'd include the model, but due to NDA that's not possible. So here's a bit of a schematic side view of what is happening. The left set of boxes is the intended result, the crane is looking left, the boom is attached on the correct side. However, the result I'm getting is on the right; the crane turned right, the boom flying on the left side, with the hinge constraint being ignored. The reason it's also moving to the left is because the hook is aligned with a component hanging from it, which is fully constrained in a certain position.

tsteegman_0-1715942243378.png

 

Is there a way to make Inventor realise it's making a mistake, instead of having to implement a very time consuming sub-optimal workaround?

Also, it might be worth mentioning, I don't have the ability to fix every step manually, the main goal is making a presentation of operational sequences, for which I've built a tool.

 

Thanks in advance, if anything is unclear, let me know!

0 Likes
Reply
749 Views
17 Replies
Replies (17)

mieCREU6
Contributor
Contributor

Have you tried using Representations/position instead of model state ? 🙂

mieCREU6_0-1715946210736.png

Gives you the ability to make changes to constrains, without the need for model-state

0 Likes

tsteegman
Contributor
Contributor

Thanks for the response!

Yes I've tried this, and the results are exactly the same sadly.  And as far as I can tell (We upgraded from inventor 2021 to 2024 a few weeks back, so I'm still new to model states), I can not use positional representations, as they are not linked to model states, and I do need to change visibility of items between different positions as well.

0 Likes

BDCollett
Advisor
Advisor

Why are you using Model States for here if it is only motion you are trying to demonstrate?

If you only need to change the visibility of items between different positions, use view reps.

Model States are going to be a headache for what you are trying to achieve.

 

tsteegman
Contributor
Contributor

Thanks for the response! Haha, sadly I agree, it is indeed a headache, but with excel it's actually been quite decent to set up the model states.

Basically, the goal is to have a "set and forget" model, which can be used multiple times to make presentations of sequences, during varying design stages. Preferably by using a (home-made) tool to cycle through a list, and print an ISO/TOP/DETAIL view (to which the tool rotates the camera without touching viewreps) to a presentation, for each step in the process (total of about 100-150 steps). 
It was working decently (albeit rather slow, but then again, the model as is, is over 100mb), until the 90+ degree angle changes came into play, and Inventor keeps getting confused.

Anyways, the manipulations between steps are: Angle changes in 2 dimensions in the boom,fully defined by where the crane hook should be, , visibility/suppressing of subassemblies, suppress constraints and changing constraint dimensions.

 

It seems I might be completely misunderstanding the use case of model states here though, I'll explore the viewreps a bit more I guess. Thanks for the suggestion.

However, that does not really solve my initial/main issue though, Inventor saying constraints can not be solved, even though (if nudged correctly) Inventor also says it can be solved.

0 Likes

Frederick_Law
Mentor
Mentor

You need to change how you constrain to overcome 180 deg flap problem.

Make a small assembly and post it here.

 

Inventor Studio can create the steps and animation.

This has contact set and spring.  So only the cylinder is moving.  Other move when they're in contact.

johnsonshiue
Community Manager
Community Manager

Hi! I think the constraint failed is because the geometry participating in the constraint is no longer available in the particular part Model State. Please share the files in zip here. I would like to confirm my suspicion.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

BDCollett
Advisor
Advisor

@tsteegman wrote:

Thanks for the response! Haha, sadly I agree, it is indeed a headache, but with excel it's actually been quite decent to set up the model states.

Basically, the goal is to have a "set and forget" model, which can be used multiple times to make presentations of sequences, during varying design stages. Preferably by using a (home-made) tool to cycle through a list, and print an ISO/TOP/DETAIL view (to which the tool rotates the camera without touching viewreps) to a presentation, for each step in the process (total of about 100-150 steps). 
It was working decently (albeit rather slow, but then again, the model as is, is over 100mb), until the 90+ degree angle changes came into play, and Inventor keeps getting confused.

Anyways, the manipulations between steps are: Angle changes in 2 dimensions in the boom,fully defined by where the crane hook should be, , visibility/suppressing of subassemblies, suppress constraints and changing constraint dimensions.

 

It seems I might be completely misunderstanding the use case of model states here though, I'll explore the viewreps a bit more I guess. Thanks for the suggestion.

However, that does not really solve my initial/main issue though, Inventor saying constraints can not be solved, even though (if nudged correctly) Inventor also says it can be solved.


You just have to be careful, a model state is going to suppress and as far as Inventor is concerned, that constraint/part etc no longer exists in that model. So, you can have no reference to any of them.

 

I would move away from the Model States for this, it should make things work a lot smoother.

You could create some iLogic, and have a form that you pick the positional rep from, and have the iLogic also activate a specific View Rep to match. Some code for that here:

Solved: iLogic and Form Combination To Control View Representations and Positions - Autodesk Communi...

0 Likes

tsteegman
Contributor
Contributor

Thanks for the response!

 

The constraint itself is not wrong, I'm sure of it, as it never has a problem when changing the angle by steps smaller than 90 degrees, or when I use the same constraints, but in a way smaller assembly. Basically, it destroys/releases the insert constraint of the hinge of the boom of the crane attached to the crane itself as soon as it needs to do a big angle change in a single step. 
Maybe using contact set + plane constraint might be more stable, I'll check it out. As far as posting a small assembly goes, this behaviour is not reproducible with smaller assemblies. I.e., if I use just the crane components, create the same constraints, and rotate it in the same way, it does not have a problem.

The Inventor Studio solution might be nice as well, I'm afraid the model is too big (and my computer too old), but I'll have a look, thanks!

0 Likes

tsteegman
Contributor
Contributor

Hey @johnsonshiue, thanks for the reply!

 

Sadly I can't put the assembly here due to NDA.
As far as the constraint goes, the relevant part never gets suppressed throughout all the steps, so I highly doubt this can be it.

Inventor clearly states the constraint between crane/boom is sick, even though when I rotate it in the same way, in multiple steps, in the same model state, it does not have a problem.

The problem really only occurs when wanting to rotate it more than 90 degrees at a time (which is pretty much every step). It looks like it's solving the constraints in the wrong order, chooses the wrong side for one of the constraints, and comes to the conclusion it's unsolvable, instead of going a step back to solve the first constraint on the correct/intended side.

 

I tried reproducing the error in a clean (smaller) assembly, but it's not possible. It solves it properly with the exact same constraints and movements as the main model.

Thanks for the suggestion though, I'll switch to see if the model is more stable with view reps, as others have suggested.

0 Likes

tsteegman
Contributor
Contributor

Not having a reference to parts when they are suppressed was the intended behaviour actually.

 

I'll see if I can make it work using view representations, thanks.

 

As for the code, I'm actually building a proper plugin using VB, thanks for the suggestion though!

0 Likes

tsteegman
Contributor
Contributor

Small update, I just came to the realization that suppressing constraints in view representations implements this for all view representations. That would mean that instead of making only 100-150 model states, I'll be making 100-150 positional reps, as well as 100-150 view reps, and need to link them in my plugin. That seems way more error prone, so I guess I'll stick to using model states, unless I'm missing something here.

0 Likes

Frederick_Law
Mentor
Mentor

@tsteegman wrote:

Thanks for the response!

 

The constraint itself is not wrong, I'm sure of it


The fact that IV complains about it means something is wrong.

The software does not work the way we think.  We need to work the way the software work.

0 Likes

tsteegman
Contributor
Contributor

If that's the case, how is it possible that if I use the free rotate/free move to move the components to (almost) the right position, it snaps into place in the correct way, and the constraint (which is in a subassembly as well) is no longer broken?

 

I.e. without me changing anything on model states, views, constraints etc, the model can be both broken and unbroken at the same time, depending on the initial conditions? 

 

Inventor confuses me sometimes 🙂

0 Likes

Frederick_Law
Mentor
Mentor

Sorry can't help much without files.

 

Angle are "buggy".  It doesn't have direction and will flap to opposite side.

It might be better to use sketch instead of constrains to control movement.

Even sketch could flap.

0 Likes

tsteegman
Contributor
Contributor

Thanks for trying, I'm aware that helping without being able to see the problem firsthand is difficult.

 

As for the angles moving the other way, this is really not a problem, and in general really easy to solve by constraining the quadrant (or even octant) a point on the rotating part can move in.

0 Likes

BDCollett
Advisor
Advisor

@tsteegman wrote:

Small update, I just came to the realization that suppressing constraints in view representations implements this for all view representations. That would mean that instead of making only 100-150 model states, I'll be making 100-150 positional reps, as well as 100-150 view reps, and need to link them in my plugin. That seems way more error prone, so I guess I'll stick to using model states, unless I'm missing something here.


I understand that you are using model states to not only suppress parts, but to also suppress constraints to change the location of parts in your model. Which should be fine.

Maybe you can show us a quick video that doesn't show too much of the model to give away IP?

0 Likes

tsteegman
Contributor
Contributor

Thanks for the suggestions everyone, end result is I stuck to using model states, and to solve the issue of angles not doing well, I made intermediate steps (for the rotation) in the relevant subassembly, also using model states.

 

So sadly nothing really worked to fix the constraining issue, except for adding extra steps, and manually removing those from the output powerpoint after creating the storyboard, thanks again for the help though!

As for a picture of what was happening, when rotating a lot, this is what the crane will do, the orange and gray parts are supposed to be attached. So Inventor basically breaks the hinge constraint.

tsteegman_1-1716541856360.png


When I manually rotate (by using free rotate) the orange part to nearly the correct position (no more than 90deg offset), without changing anything else in the assembly, the result is this:

tsteegman_2-1716542338205.png

So as far as I can tell, Inventor is able to get different results, for the exact same constraints, based on the initial conditions, which is really weird to me. Again, it seems like in the first case, it's trying to solve the constraints in a set order, and as soon as it finds one that doesn't work with the previously solved constraints, it'll just break the new one, instead of trying to solve the constraints in a different order.

I'm fine for now, as it's solved by a lengthy workaround, but I'm still worried about running into this in the future, and only having a super inefficient time consuming solution.

0 Likes