I have an air cylinder that has an adjustable stop for the piston. I know how to do a regular distance mate, but is there something that will allow me to choose another surface as a stopping point instead of a dimensional distance?
it took me a second to figure out a way around this.
In the assembly, create a sketch in one of the cross-section planes. Now make a spline that goes from the end of the gold adjuster to the limiting point 3" down. End the spline so that it is a straight line with only the 2 end points defined. This will update as you move the adjuster because it was defined inside of the assembly.
Now in the piston, add a Point at the intersection of the rod and the body.
Back in the assembly you can mate the point to the spline using a simple coincident mate.
If you try to do this with a simple Line it will not limit the ends of travel (it will let it fly off to infinity in either direction). With a spline it recognizes that the point must stop at the end of the spline.
Sorry I can't show you in your model, but I'm limited to 2009 as my newest version.
It sounds like you want a limit mate (or two). Can you post an image to help explain?
The golden part is threaded and adjustable up to 1" from the stock stop position. The piston inside the air cylinder has up to 3" of travel. If your adjustment is 1" in, then you have 2" of travel. So the piston should be able to move until it hits the surface of the adjustable part. The blue line is showing the piston travel while the adjustment is in fully.
edit: I added an additional distance mate of 0" up to 3" from the bottom of the stop to the top of the piston and it over-defined my assembly and turned half of my mates yellow, but it essentially is doing what it is supposed to do. You can tell it's broken though, because with just a little bit of pushing it will break through either end and go as far as you drag it.
I would set a mate for the far end of the piston - minimum distance to the pivot end 0.000", max 4" (large enough that it never matters). Then add a mate for the end with the adjuster - minimum distance to adjuster 0.000", max 4".
This way one limit mate constrains extension, another limits contraction.
Whenever I try to add a second distance mate to the piston part it says it is over defining the assembly. Attaching the air cylinder, if you have a moment to take a look that would be great.
I think this is on the right track, but when the gold adjuster is adjusted in, the piston doesn't have 3" of travel. If my spline is 3" long, and my adjuster is all the way in ( 1" ), then I have 2" of movement on my piston, wouldn't this setup force my piston out the back when pulled all the way back in? I might be missing it, but is anything stopping the piston's backwards distance?
The one end of the spline is defined by the gold adjuster. The opposite end is defined based on the body of the cylinder (my 3" was based on adding a dimension from the inside edge on that end of the cylinder).
(along with maybe a perpendicular constraint)
Unless I'm missing something, which I probably am, then this should be up to par with what you said to do. The point is mated to the spline in the above images. It definitely constrains it to the spline and the spline will update based on the adjuster moving but like I said I'm kinda lost on the backwards movement out of the cylinder body.
Here is a zip file of my mockup. I think the problem you have is that you are defining the 3" based on the gold adjuster. That dimension should reference the end of the cylinder body itself. This way as you move the adjuster only one end of the spline moves.
Clever use of a spline! It would be nice if SolidWorks would recognize that a line actually has length and stop at the ends, but this is a really nice workaround.
I was pretty proud of myself for that one. (After initially being flabbergasted that a simple line (or even edge of a dummy part) let it go on to infinity in either direction.)
Thanks for the help, I got it working today when I came back to it. I just wasn't thinking about it correctly. Thanks again
Retrieving data ...