Add axis to coordinate system

Programming and macros
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Add axis to coordinate system

Unread post by berg_lauritz »

So I do have a coordinate system that is defined totally random. Sometimes with 1 or 2 edges/axis - another time with nothing but a vertex a third time with faces...

How do i add an actual axis to this coordinate system with a macro? I'd like to add all three of them. Can I somehow use the ICoordinateSystemFeatureData Interface Members to do that? Any ideas?
by Eddy Alleman » Tue Oct 12, 2021 12:13 pm
berg_lauritz wrote: Mon Oct 04, 2021 5:25 pm I just cannot believe that you cannot access this somehow. The vector has to exist somewhere so that SolidWorks can use it. Every single triad uses the information from the standard origin - and the other coordinate system is just a transformed one. I need an SPR for that. SWX 2022 SP5 could have it. ;; ;; ;;
Hi @berg_lauritz

You will most certainly like SolidWorks 2022 with new tools for Coordinate systems (from the what's new):
cs2022.png
Go to full post
User avatar
DennisD
Posts: 706
Joined: Fri Mar 12, 2021 10:04 am
Answers: 1
Location: Near Jacksonville, FL
x 1031
x 1467

Re: Add axis to coordinate system

Unread post by DennisD »

I have made part templates with X, Y, and Z axes so they are in there at the start. They are made from the intersections of the planes or the origin and perpendicular to a plane.

I'm not a macro person, but. . . Could your macro be based on picking a vertex, running the macro and it make axes through that point and perpendicular to the primary planes? Is that what you are trying to achieve?
Brick walls are there for a reason. The brick walls aren't there to keep us out. The brick walls are there to show us how badly we want things.
- - -Randy Pausch
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

Yes. But in this case I do not have the planes. I only have a loosely defined coordinate system.
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

I don't have anything useful to add, but I cannot pass up an opportunity to complain about solidworks pathetic excuse for a coordinate system.

A coordinate system should be 3 planes, 3 axis and an origin.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
Frederick_Law
Posts: 1947
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1638
x 1470

Re: Add axis to coordinate system

Unread post by Frederick_Law »

First, all axis start at: origin.
One more point and you got first axis.
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

Frederick_Law wrote: Wed Sep 29, 2021 4:31 pm First, all axis start at: origin.
One more point and you got first axis.
Ah, that helps.
So adding a coordinate system to a point only moves the origin to a different point.

Now I have a better idea at least. It would mean though to analyze how the coordinate system is aligned and use those same selections to make axes from that.

This was supposed to be easy, Dassault!
grumph
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

After using NX, I am baffled that all Cad systems don't understand the value of a true and powerful coordinate system.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
Frederick_Law
Posts: 1947
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1638
x 1470

Re: Add axis to coordinate system

Unread post by Frederick_Law »

Coordinate system: Origin and 3 vectors
Don't ask me how to transform or translate one to another.
Look it up in text book or Google :mrgreen:
User avatar
Eddy Alleman
Posts: 50
Joined: Thu Apr 01, 2021 10:32 am
Answers: 8
Location: Belgium
x 80
x 89
Contact:

Re: Add axis to coordinate system

Unread post by Eddy Alleman »

berg_lauritz wrote: Wed Sep 29, 2021 10:36 am How do i add an actual axis to this coordinate system with a macro? I'd like to add all three of them. Can I somehow use the ICoordinateSystemFeatureData Interface Members to do that? Any ideas?
Hi Lauritz,

ICoordinateSystemFeatureData can be used to get the points, faces ,edges the CS was build upon.
Because you can have multiple ways of defining things, it can be challenging to filter out the right information. But if you restrict yourself to selecting only points for instance, you could get those and combined with the origin, you could create an axis with 2 points.

Can I ask for what use case you need those axes? Is it for mating components? In that case if you mate a component origin to a CS all axes are aligned accordingly. An origin is just a special CS (that can't be deleted)

Eddy
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

Eddy Alleman wrote: Sat Oct 02, 2021 2:37 am Hi Lauritz,

ICoordinateSystemFeatureData can be used to get the points, faces ,edges the CS was build upon.
Because you can have multiple ways of defining things, it can be challenging to filter out the right information. But if you restrict yourself to selecting only points for instance, you could get those and combined with the origin, you could create an axis with 2 points.

Can I ask for what use case you need those axes? Is it for mating components? In that case if you mate a component origin to a CS all axes are aligned accordingly. An origin is just a special CS (that can't be deleted)

Eddy
I was looking into an easy 'all in one' solution:
We have to set a coordinate system for many parts for our CNC.
The grain direction is the X-Axis of the new coordinate system.
And if we place it properly, we can also want to use the planes from this coordinate system.
I was hoping to only change the position of the coordinate system to also move 3 planes, 3 axes with it & use this reference geometry additionally to the standard ref. geometry.

This would lead automatically to using more ref. geometry when mating/using features etc.
And changing it should be as easy as only changing the orientation of one coordinate system, but....it seems that this is not possible in an easy way. What a shame this is...
User avatar
Eddy Alleman
Posts: 50
Joined: Thu Apr 01, 2021 10:32 am
Answers: 8
Location: Belgium
x 80
x 89
Contact:

Re: Add axis to coordinate system

Unread post by Eddy Alleman »

Hi @berg_lauritz

I'm thinking about a workaround.

Do you need the CS for your CNC (in other words : can your CNC import the CS?)
or do you only need a point, 3 axes and 3 planes in you CNC environment for easy selecting, aligning?

If the latter you could create a dummy part with a point, 3 axis, 3 workplanes ? Or just a 3Dsketch with 3 lines.

Or even better make that a macro feature.

Another thought: if you place your CS. You could create a macro that positions your part by moving all the geometry(move body) as if the CS becomes the origin. (The CS has a transformation matrix with the needed translations, rotations)

Depends a lot on which entities your CNC environment can import.

Hope this helps,

Eddy
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

Back when I was trying to get SW to work the way NX did, I created a "Part" that was nothing but a coordinate system. It is essentially my part template, which has the 3 axis included. Instead of inserting what solidworks calls a coordinate system, I would insert this part. Maybe you could write a macro to place a copy of the part at each instance of a coordinate system?
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

Eddy Alleman wrote: Mon Oct 04, 2021 9:25 am Hi @berg_lauritz

I'm thinking about a workaround.

Do you need the CS for your CNC (in other words : can your CNC import the CS?)
or do you only need a point, 3 axes and 3 planes in you CNC environment for easy selecting, aligning?

If the latter you could create a dummy part with a point, 3 axis, 3 workplanes ? Or just a 3Dsketch with 3 lines.

Or even better make that a macro feature.

Another thought: if you place your CS. You could create a macro that positions your part by moving all the geometry(move body) as if the CS becomes the origin. (The CS has a transformation matrix with the needed translations, rotations)

Depends a lot on which entities your CNC environment can import.

Hope this helps,

Eddy
We have to place the coordinate system on probably 60% of our parts - so only placing this would be the preferred method.
Yes, we 'only' need 3 planes, 3 axes and the coordinate system point in there.
I thought about a macro but this coordinate system can easily change (regularly: flip Z-Axis or change X-Axis/Y-Axis or change coordinate system point) and since I cannot really link everything it will imho get too unstable (i.e. person A changes this with the macro, yay - person b changes anything (planes, axes, coordinate system) not with a macro & nothing changes with it (yikes!)).
Soooo... I'll delay this one for now. Maybe at a later stage.

I still cannot believe, that this is not integrated into SolidWorks. <()>
User avatar
mike miller
Posts: 878
Joined: Fri Mar 12, 2021 3:38 pm
Answers: 7
Location: Michigan
x 1070
x 1231
Contact:

Re: Add axis to coordinate system

Unread post by mike miller »

SPerman wrote: Thu Sep 30, 2021 8:06 am After using NX, I am baffled that all Cad systems don't understand the value of a true and powerful coordinate system.
@SPerman, can you elaborate on this? I've never gotten into coordinate systems very deep, maybe that's why I don't see a huge benefit......
He that finds his life will lose it, and he who loses his life for [Christ's] sake will find it. Matt. 10:39
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

SPerman wrote: Mon Oct 04, 2021 9:36 am Back when I was trying to get SW to work the way NX did, I created a "Part" that was nothing but a coordinate system. It is essentially my part template, which has the 3 axis included. Instead of inserting what solidworks calls a coordinate system, I would insert this part. Maybe you could write a macro to place a copy of the part at each instance of a coordinate system?
that's a funny workaround. But I don't want external references in so many parts... or did you break the link all the time?
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

I gave up because it was easier to change to the "solidworks way" than it was to try and make SW do something it didn't want to.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

mike miller wrote: Mon Oct 04, 2021 9:56 am @SPerman, can you elaborate on this? I've never gotten into coordinate systems very deep, maybe that's why I don't see a huge benefit......
We used coordinate systems the way IV users use skeleton sketches.

Our top level vehicle was nothing but a collection of coordinate systems. The chassis was locked to the chassis coordinate system, the body to the body, engine, etc. The body assembly would be built the same way. Here's a coordinate system for the front glass, one for the roof, one for the hood, etc.

We made carbon fiber tubing ducts that pulled air out of the quarter window and fed the brakes, or rear gear cooler. Those had to route around the roll cage as well as stay out of the drivers view and not run into any other obstacles. Coordinate systems were used to create the path for the tube to follow. Add fillets and every intersection and do sweep. If you need to make an adjustment, just change a dimension for the appropriate coordinate system and everything related to that CS updates (including other CS.)

You can use CS to define the geometry of your part. So once again, you move a CS and everything related to it follows.

They also had polar coordinate systems, if you are into that kind of thing. :)

image.png
image.png (91.59 KiB) Viewed 4105 times
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

SPerman wrote: Mon Oct 04, 2021 4:47 pm I gave up because it was easier to change to the "solidworks way" than it was to try and make SW do something it didn't want to.
I just cannot believe that you cannot access this somehow. The vector has to exist somewhere so that SolidWorks can use it. Every single triad uses the information from the standard origin - and the other coordinate system is just a transformed one. I need an SPR for that. SWX 2022 SP5 could have it. ;; ;; ;;
User avatar
Eddy Alleman
Posts: 50
Joined: Thu Apr 01, 2021 10:32 am
Answers: 8
Location: Belgium
x 80
x 89
Contact:

Re: Add axis to coordinate system

Unread post by Eddy Alleman »

berg_lauritz wrote: Mon Oct 04, 2021 5:25 pm I just cannot believe that you cannot access this somehow. The vector has to exist somewhere so that SolidWorks can use it. Every single triad uses the information from the standard origin - and the other coordinate system is just a transformed one. I need an SPR for that. SWX 2022 SP5 could have it. ;; ;; ;;
Hi @berg_lauritz

You will most certainly like SolidWorks 2022 with new tools for Coordinate systems (from the what's new):
cs2022.png
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

Eddy Alleman wrote: Tue Oct 12, 2021 12:13 pm Hi @berg_lauritz

You will most certainly like SolidWorks 2022 with new tools for Coordinate systems (from the what's new):
cs2022.png
No way! So my sarcasm will actually be the truth? Can you believe it? I should talk more in sarcasm so the features get implemented!

Thank you @Eddy Alleman .
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

That is exciting news. I might have to renew my subscription for that.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
mike miller
Posts: 878
Joined: Fri Mar 12, 2021 3:38 pm
Answers: 7
Location: Michigan
x 1070
x 1231
Contact:

Re: Add axis to coordinate system

Unread post by mike miller »

Eddy Alleman wrote: Tue Oct 12, 2021 12:13 pm Hi @berg_lauritz

You will most certainly like SolidWorks 2022 with new tools for Coordinate systems (from the what's new):
cs2022.png
Hmm.....I never really noticed how deficient the current SWX coordinate systems command is.

FWIW, this is Solid Edge 2021:
2021-10-12 13_59_19.jpg
2021-10-12 14_01_45.jpg
He that finds his life will lose it, and he who loses his life for [Christ's] sake will find it. Matt. 10:39
User avatar
DanPihlaja
Posts: 849
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 812
x 979

Re: Add axis to coordinate system

Unread post by DanPihlaja »

Eddy Alleman wrote: Tue Oct 12, 2021 12:13 pm Hi @berg_lauritz

You will most certainly like SolidWorks 2022 with new tools for Coordinate systems (from the what's new):
cs2022.png

Holy crap! It only took them 9 years (although I suspect that people have been asking for this for far longer.....this is the time I started asking for it)
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Add axis to coordinate system

Unread post by berg_lauritz »

mike miller wrote: Tue Oct 12, 2021 2:02 pm Hmm.....I never really noticed how deficient the current SWX coordinate systems command is.

FWIW, this is Solid Edge 2021:
2021-10-12 13_59_19.jpg
2021-10-12 14_01_45.jpg
Every time you show something like this I envy you. Stop that!
User avatar
mike miller
Posts: 878
Joined: Fri Mar 12, 2021 3:38 pm
Answers: 7
Location: Michigan
x 1070
x 1231
Contact:

Re: Add axis to coordinate system

Unread post by mike miller »

berg_lauritz wrote: Tue Oct 12, 2021 3:15 pm Every time you show something like this I envy you. Stop that!
So sorry. :lol:
He that finds his life will lose it, and he who loses his life for [Christ's] sake will find it. Matt. 10:39
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

mike miller wrote: Tue Oct 12, 2021 2:02 pm Hmm.....I never really noticed how deficient the current SWX coordinate systems command is.
Now you are starting to understand. :)
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: Add axis to coordinate system

Unread post by mattpeneguy »

Eddy Alleman wrote: Tue Oct 12, 2021 12:13 pm Hi @berg_lauritz

You will most certainly like SolidWorks 2022 with new tools for Coordinate systems (from the what's new):
image.png
image.png (75.88 KiB) Viewed 3979 times
Wow...Gotta give credit to DS here. I asked for this, and I'll be thankful when we get Windows 10 and I can try this functionality out. I'd even download the Beta to test it out.
This is big for SSP type workflows.
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

I've said it several times. After starting with Ideas, and then NX, I was baffled that SW didn't have a true coordinate system. As others have said, it is great that they are finally catching up to the competition here.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
DanPihlaja
Posts: 849
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 812
x 979

Re: Add axis to coordinate system

Unread post by DanPihlaja »

SPerman wrote: Tue Oct 12, 2021 4:28 pm I've said it several times. After starting with Ideas, and then NX, I was baffled that SW didn't have a true coordinate system. As others have said, it is great that they are finally catching up to the competition here.
20+ years later.....LOL
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

And only a year or two after they recognized that some people work with Z = up.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
SPerman
Posts: 2055
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2226
x 1877
Contact:

Re: Add axis to coordinate system

Unread post by SPerman »

-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Post Reply