Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Automatic Hole Centering (Relation Question)

  1. #1
    rwanttaja's Avatar
    Join Date
    Jul 2011
    Location
    Seattle
    Posts
    2,948

    Automatic Hole Centering (Relation Question)

    Okay, this is different from my usual stoopid questions, as I *have* already found a solution. But I'm wondering if there's a more elegant approach.

    Assume one has a strap 2"x3" in size, and wishes to add a 1/2" hole along the centerline of the strap.
    Name:  plate.JPG
Views: 678
Size:  28.9 KB
    The only thing is, I'm not sure if two inches is the final width that the strap is going to be. If I define the centerpoint of the hole as being 1 inch from one edge, if I change the width, the hole will no longer be along the centerline.

    The figure shows my solution...I add a centerline to the strap using a construction line locked to the midpoints of the two end lines, then define the centerpoint of the hole as being coincident to this line.

    Just seems to me that this should be possible without the construction line...like clicking the center point of the hole and the two adjacent sides of the strap, and defining a Relation. Yet can't quite make one work.

    Is there a better way?

    Ron Wanttaja

  2. #2
    cwilliamrose's Avatar
    Join Date
    Nov 2013
    Location
    SW Florida
    Posts
    217
    I hope not, I've been doing it that way for decades.

    Actually there's a more convoluted way that avoids the construction line. Make the center of the hole horizontal to the midpoint of one side and vertical to the midpoint of one of the perpendicular sides.

    Or make the construction line go corner to corner to keep the hole centered on the face.
    Last edited by cwilliamrose; 06-02-2020 at 02:32 PM.

  3. #3
    SOLIDWORKS Support Volunteer Jeffrey Meyer's Avatar
    Join Date
    Nov 2011
    Location
    Israel
    Posts
    209
    I've also been doing it that way for decades - and some.

    The trouble with centering the hole according to the midpoints of two ajacent sides is that the software is aware of the midpoints, but it doesn't constrain the hole center.

    Here is an even more convoluted way of doing it: Draw a 3-point arc through 2 diagonal corners of the rectangle, constrain the arc to coincide with one of the other corners, draw the hole on the arc center, and then make the arc into a construction curve. Now you've achieved the goal without a construction line.
    I should have been a lawyer...

  4. #4
    cwilliamrose's Avatar
    Join Date
    Nov 2013
    Location
    SW Florida
    Posts
    217
    I had to try the midpoint constraints because I was sure they would work;

    Name:  temp.JPG
Views: 679
Size:  30.5 KB

    Works for me, if you change the size of the rectangle to hole stays centered.

  5. #5
    vondeliusc's Avatar
    Join Date
    Nov 2011
    Location
    Kalispell, MT
    Posts
    39

    Big Grin The Hole Wizard is also an option

    Ron-
    Just like everything in SW, there are a million ways to do everything. The construction line is a nice simple solution.
    You can position with dimensions and/or relations to the construction geometry, or with dimensions only without construction lines.
    [Tip: run with your relations visible all the time]
    But if you need to add a threaded, countersunk or counterbored hole that is parametric, you can also use the 'hole wizard'.
    The hole wizard allows you to select the type of hole at the top, CB/CSK/Drill/Threaded/NPT/Legacy and below that the standard,
    whether imperial or metric or (many others). Below that you can customize and select parameters like depth and graphical representation.
    When you go to the 'Position' tab at the top, it immediately defaults to a 'point' tool; selecting any surface will place a '3-D' sketch of a preview
    of the hole you have previously specified. By hitting escape or deselecting the point tool, you can now draw as if you were in a 3-D sketch.
    Adding construction geometry, dimensions and relations is possible to locate your hole, all which can be changed later.
    I have created a video that demonstrates this with sound (might be a bit quiet)
    Name:  SolidWorks Hole Demo.jpg
Views: 1116
Size:  18.9 KB
    https://www.youtube.com/watch?v=UAspU0N54V0

    The link to the file is:
    https://drive.google.com/file/d/1UiG...ew?usp=sharing
    -Christian

  6. #6
    rwanttaja's Avatar
    Join Date
    Jul 2011
    Location
    Seattle
    Posts
    2,948
    Quote Originally Posted by cwilliamrose View Post
    I had to try the midpoint constraints because I was sure they would work;

    Works for me, if you change the size of the rectangle to hole stays centered.
    Worked for me, too. Thanks much to cwilliam and others with suggestions.

    Solidworks is a complicated program, designed for professionals. That's what makes it so powerful.

    For a casual user trying to teach it to themselves, the danger comes when one does not pick up on key foundational concepts. That's what happened to me...I didn't realize what the "Relations" were, and that Solidworks was helping professional users by automatically locking aspects of the sketches based on what the person was drawing. All I knew is that I was trying to edit a rectangle, and the #$%@ program wouldn't let me turn it into a non-rectangle like every other drawing package I'd ever used. Now I can know to delete and add relations. Literally just learned this in the past month or so.

    I'd probably write a "Solidworks for Dummies" book, except there IS one, and I'm even more of a dummy than what they assumed.

    Ah, well. Getting better and better, with a lot of brute-force trial and error and with the help of folks here. I'm actually getting to the point where SW is my preferred drawing tool.

    Ron "No hope for me, now" Wanttaja
    Last edited by rwanttaja; 06-03-2020 at 12:00 PM.

  7. #7
    SOLIDWORKS Support Volunteer Jeffrey Meyer's Avatar
    Join Date
    Nov 2011
    Location
    Israel
    Posts
    209
    Quote Originally Posted by cwilliamrose View Post
    I had to try the midpoint constraints because I was sure they would work;


    Works for me, if you change the size of the rectangle to hole stays centered.
    Bill, I told you I should have been a lawyer:
    To do it like this, you have to choose the line midpoint, then Ctrl choose the circle center, and then choose the appropriate constraint - twice. And this only works if the rectangle is horizontal/vertical. If the rectangle is sloping, it doesn't work.
    I still like the midpoint of the diagonal construction line - always works.

  8. #8
    cwilliamrose's Avatar
    Join Date
    Nov 2013
    Location
    SW Florida
    Posts
    217
    Yep, it's convoluted and only works in limited circumstances but it did what Ron asked for. I think his point was to learn about alternatives -- even if they suck a little.....

  9. #9
    SOLIDWORKS Support Volunteer Jeffrey Meyer's Avatar
    Join Date
    Nov 2011
    Location
    Israel
    Posts
    209
    Talking of symmetry and centering, here's a curiosity that some users seem to "forget":
    If you place a dimension between a construction line and a parallel line, the value shown is the actual distance between the lines. If you place the dimension on the side opposite the full line, the value shown is doubled. i.e. The construction line becomes the line of symmetry.

    If you already knew this, then don't read this post...
    Attached Images Attached Images  

  10. #10
    SOLIDWORKS Support Volunteer Jeffrey Meyer's Avatar
    Join Date
    Nov 2011
    Location
    Israel
    Posts
    209
    Quote Originally Posted by rwanttaja View Post
    Ron "No hope for me, now" Wanttaja
    Ron, the only reason I post replies is because I'm trying to catch up with you on your number of posts - thanks for giving me another opportunity ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •