cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to set orientation of CSYS via relations, to match another CSYS that was measured?

dcokin
13-Aquamarine

How to set orientation of CSYS via relations, to match another CSYS that was measured?

Suppose I've got an "ORIGIN" csys, and a "TARGET" csys.  The "TARGET" has datum points placed on it 1" along each axis, which can be measured and saved as parameters.

I now want to add a "SEEKER" csys.  It should lay right on top of the "TARGET", but reference only the "ORIGIN" and the measurements to the "TARGET"; it can't reference the target directly.  (I.e. must be controlled by the 6 dimensions used to position one csys relative to another.)

Setting the origin of the SEEKER is no problem, but getting the orientation to match is pretty tricky!

There is a great old discussion here with sample files on computing euler angles between csys's, that seems like it'd points the way towards the answer, but I still can't seem to close the loop and figure out how apply such calculations to a new csys.

My intended use case:
I'm trying to make it easier to place a flexible electrical bond jumper into an assembly in the right shape & position.

This is a 6" length of wire, with a terminal lug on either end.  We use lots & lots of these; the part number is always the same, but the shape changes with every use.  I don't want to create a unique model for each use obviously, so I created a "flexible" model, which can adapt.  But, using it has always been a bear.

It sure would be swell if I could place this assembly by just selecting a pair of holes to mount the lugs, and directions for them to point...   But, I can't even imagine a way to do that with Creo.  So, best I was ever able to come up with is assembling one of the terminals onto one of the holes, with the desired direction, and then using 6 flexible dimensions to adjust where the far end ought to be, relative to the near end.  But, coming up with those 6 parameters and making adjustments to them isn't really quick, easy & intuitive.  (And if you enter some dimensions the 6" fixed length of wire can't reach, it doesn't give you a graceful error; it just doesn't make the change, and you have to notice that and try again.)

So... my goal now is to make a UDF that will make placing these sorts of jumper assemblies easier.  User would start by creating properly oriented coordinate systems at the top of either hole.  Then you just place the UDF, and it prompts you for those two coordinate systems, and bam, the jumper wire is added between them.  To do this, the UDF would place the jumper assembly on the first CSYS, measure the relative position of the second, do some math, and input the results into associated parameters setup for those 6 flexible dimensions that actually control the position of the far end.

I need help for which measurements are needed, and the "do some math" step to convert these to the "About X", "About Y", and "About Z" angles.

 

Thank you!

 

EDIT:  FIGURED IT OUT!  Looks like the "About X", "About Y" and "About Z" angles I was looking for are the "euler angles".  But the code to calculate these, which I had copied from discussion linked above, had a mistake.  Included a bunch of *180/pi() terms, to convert degrees to radians.  Got rid of all those, and the numbers started making sense.  Perhaps my system is configured to convert units automatically, and this was developed on one that didn't?  Whatever, I think I have a path forward.

1 ACCEPTED SOLUTION

Accepted Solutions
dcokin
13-Aquamarine
(To:dcokin)

I tried to delete this whole post, but that doesn't seem to be an option.  Seemed poor form to edit the post to make it blank w/o deleting it...  So, here is a follow up post to be marked as the solution, and close this out.

View solution in original post

4 REPLIES 4
TomD.inPDX
17-Peridot
(To:dcokin)

....you can mark your own answer as correct 🙂

Dale_Rosema
23-Emerald III
(To:TomD.inPDX)

Take the "Eidt: Figured it out" and post it as a separate post and then mark it as correct.

dcokin
13-Aquamarine
(To:dcokin)

I tried to delete this whole post, but that doesn't seem to be an option.  Seemed poor form to edit the post to make it blank w/o deleting it...  So, here is a follow up post to be marked as the solution, and close this out.

TomD.inPDX
17-Peridot
(To:dcokin)

We certainly wouldn't want you to delete the post for the information is useful.

 

However, for the last post, simply paste the relevant portion of the original post in the accepted post and flag it as the solution.

 

And we do appreciate your participation.  There really are no dumb questions on this board.

Top Tags