Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

expressions in constraints

Status
Not open for further replies.

skanskan

Civil/Environmental
Jul 29, 2007
278
Hi

How can I make constraints depend on an expression instead of being fixed?
For example to create a Rubik cube, where a piece can be forced to be on a plane or on contact with other except if some other pieces are moved.

I know how to link expressions to the dimensions of a body but I don't know how to use them with constraints.
I'm looking at least for some "remove constraint by expression"
 
Replies continue below

Recommended for you

John..do you have the assembly file :)

Nx 7.5.5.4

Teamcenter 8
 
Yes.
Can I get this without programming with NX Open?
 
The animation was done using Assembly Sequencing. However, before anyone makes any assumptions, I did NOT use NX to actually 'solve' the Rubix Cube. Rather, I simply created a fully constrained Assembly using Angular Constraints for each rotating 'set' of blocks and then using Assembly Sequencing I applied the proper set of 'moves' that, when completed, would 'solve' the 'cube' (BTW, I found a website which allows you to enter an initial state of a Rubix Cube and it would then provide step-by-step instructions for the most efficient solution).

Attached below is an NX 7.5 version of the assembly. To see it 'play', open the assembly (to see the proper colors you will need to toggle OFF the 'Use Lightweight Representations' Load Option) and then go to...

Assemblies -> Sequence...

...set the 'Playback Speed' to '10' and then hit the 'Play Forward' VCR control.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
 http://files.engineering.com/getfile.aspx?folder=d8521e84-05e7-495b-b3ca-13a2c78beef5&file=Rubix_Cube.zip
John,

Nice to see the motion, but I have not seen any constraints in this file.
As you quote "I simply created a fully constrained Assembly using Angular Constraints for each rotating 'set' of blocks"
Please let us know how you apply constraints.

Raj
NX 7.5
 
I was going to say almost the same.
 
Sorry, my mistake, the assembly was not constrained, but that had NO impact on creating the Sequence. In fact, more often than not, previously defined Assembly Constraints may not always be compatible with the motions that one is trying to define in a Sequence, which is why there's an option to IGNORE all Constraints and just 'honor' the explicit Sequence motions. Of course, if one has been careful to leave enough degrees-of-freedom in the Assembly Constraint scheme so as to allow the assembly to move as a single 'mechanism', then you would WANT the Sequence to 'honor' those Constraints which means that you may need to define the motion of only a single Component and then let the Constraints force the movement of the rest of the 'mechanism'.

Anyway, sorry for the confusion, it had been awhile since I had messed with that model ;-)

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Hi JohnRBraker, but I'm much more interested in the constraints than in the sequence
 
The truth is that it would be very difficult, if not outright impossible, to create a set of Assembly Constraints for a 'Rubix Cube' which could then be parametrically edited to simulate the movements of anything more than a single 'slice' made up of the nine cubes forming one of the faces of the overall 'cube'.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
If just we could use expressions in constraints we could use conditionals and get it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor