Author Topic: Resize a STL File For Me  (Read 9850 times)

0 Members and 1 Guest are viewing this topic.

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9954
  • Country: nz
Re: Resize a STL File For Me
« Reply #25 on: January 20, 2024, 07:37:01 am »
If you can convert this STL to a STP/STEP file, and have Altium you can do it by just making a new PCB, placing the STP file 3D body on the PCB at whatever size you want, then export the entire PCB as a new STL file.   Resize complete.

Not exactly a clean way to do it, but should work fine.


Failing that, FreeCAD will do what you want, but can be a bit hard to use if you've never used CAD before.
Maybe if you can find an online video showing how to resize a model in FreeCAD you can get something exported that fits your needs.
« Last Edit: January 20, 2024, 07:40:54 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #26 on: January 20, 2024, 03:49:03 pm »
I am measuring with calipers, but, to provide (more) accurate measurements, maybe I should wait for the rotary encoder samples to arrive (Ian.M, I believe you’re part of my other post regarding rotary encoders for my broken power supply) to find out if those will fit and replace the originals. From there, the datasheet will provide accurate measurements eliminating any error on my past.. edit: “part” (typing on my phone and auto correct messed up)

The knob that’s too large was suppose to be a 6mm D shaft (what I searched for and the description stated), and that fit (loosely), so my measurements SHOULD be accurate, but maybe mine are slightly off or my printer has poor resolution. (Anet A8).

Also, when I measured mine, it was 6mm give or take. When I looked online, they came in either 6mm or (I believe) 6.35mm. At that point it was too small to be 6.35 and too large to be anything smaller.

I found a site had a 6mm D-shaft dimensions:
Plus, it's an easy way to measure a shaft with calipers.



You might also what to check the calibration of your 3D printer.  I taped a pin onto my extruder and then laying a ruler on the print bed along each axis measured how far the extruder moves.  Then storing the printer steps/mm for that axis.  For example, set the extruder in one corner of the bed, align the ruler zero at the pin, tell the printer to move 200mm, measure the distance traveled, calculate and store a steps/mm adjustment value if the distances don't match.  Repeat for all three axis.
 

Offline themadhippy

  • Super Contributor
  • ***
  • Posts: 2583
  • Country: gb
Re: Resize a STL File For Me
« Reply #27 on: January 20, 2024, 05:40:34 pm »
slightly tweaked ,reduced the number of side slots ,made em deeper and made the D slot a smidge bigger.

Quote
I found a site had a 6mm D-shaft dimensions:
a rough  guesstimates  the flat length around 3 an a bit mm,which is different to the 6mm rotary encoder shaft i measure ,that had a flat length of 4.5mm
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #28 on: January 20, 2024, 08:11:53 pm »
Really close to the pictured knob.
Finally got my head in gear and figured out how to cut the side grooves and added the domed top.

1987132-0


My D-Slot dimensions (I can make them anything you want):

1987117-1


For completeness, here is the profile:
This is revolved 360deg around the z-axis.

1987123-2


Edit:  Adjusted D-Slot size
« Last Edit: January 21, 2024, 05:20:14 am by MarkF »
 
The following users thanked this post: Kean

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Resize a STL File For Me
« Reply #29 on: January 20, 2024, 10:13:30 pm »
bostonman: a tip for you, look for the exe file installer for an old offline Sketchup version, version 7 or 8, from when Google owned it before the sale to Trimble. These will work under Wine on Linux.

Here's some mroe detail:
https://www.dedoimedo.com/computers/google-sketchup.html

If you install blender then you can import a downloaded stl in to blender, export from blender as a dae (collada), Sketchup 7 or 8 will import that dae, then you modify the mesh geometry in sketchup, and re-export to get it to blender, then export a new stl from blender.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #30 on: January 20, 2024, 11:07:42 pm »
It's much easier to just re-draw these simple parts instead of struggling to re-scale a
STL that doesn't match the part you're trying to replace. 

I'm using the newest version of FreeCAD 0.21.2, which only runs on a 64-bit operation system.

However, you can download FreeCAD 0.18.4 which will run on Windows XP. 
There have been a lot of improvements and features that were fixed.
The learning curve is pretty steep but there are a bunch of videos to help get started.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #31 on: January 21, 2024, 09:01:19 am »
You might also what to check the calibration of your 3D printer.  I taped a pin onto my extruder and then laying a ruler on the print bed along each axis measured how far the extruder moves.  Then storing the printer steps/mm for that axis.  For example, set the extruder in one corner of the bed, align the ruler zero at the pin, tell the printer to move 200mm, measure the distance traveled, calculate and store a steps/mm adjustment value if the distances don't match.  Repeat for all three axis.

While you're doing the calibration, don't forget to do the extruder.  I load in a light color filament, measure off 110mm of filament from where it enters the extruder and mark the filament with a Sharpie.  Then, extrude 100mm of filament.  Measure the filament again that you have the 10mm left.  Store a correction into the printer if it didn't extrude the 100mm you told it to.

Repeat all your measurements until the printer moves the exact distances you tell it.  Obviously, the larger distance you can measure, the more accurate your calibration will be (i.e. Measuring 300mm would be better than measuring 10mm.  A 1mm error in measurement would have a lower impact if doing the 300mm distance.)
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1795
  • Country: us
Re: Resize a STL File For Me
« Reply #32 on: January 21, 2024, 02:17:57 pm »
Mark F, I downloaded Knob002-ver4 and opened the slicing software. I'll print this today, however, looking at it in the slicing software, it looks like additional shapes will be printed giving it the appearance it may not be smooth (see attached) - it looks blurry ironically. Maybe it's just how the slicing software is interpreting it, and the print will be fine.

It doesn't take long to print, so running these prints to test size and stuff isn't an issue anyway.

On another note, I was unaware my printer needs and/or could be calibrated. I'm uncertain who has experience with an Anet A8, it's a good printer, but my experience is that it's sloppy in many directions due to the nature of the printer. Many upgrades exist which I've printed and added, but I thought it was more about belt tension as most prints improved once I added braces and tightened the belts.

This is good feedback and I'll certainly look into checking the calibration.

 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #33 on: January 21, 2024, 05:48:13 pm »
I see what you mean about the look of the smoothness.  I expect it's just the mesh on the curved areas and the knob being so small.  I haven't printed it so I don't know how smooth it will be.  Try printing with a small layer height (maybe 0.12mm)


I can't find the original video I watched but here is one showing the process.
A few notes:
  • You will need to find the similar menus for your printer.
  • I don't like the extruder process which requires taking the printer apart.  That's why I say heat the hotend to 200oC, mark off 110mm of filament from where it enters the printer, extrude 100mm and measure filament to where you marked it.
  • Out of the box, I had to make some minor adjustments to get my prints dimensionally correct.  At least within a few thousandth.  We are talking small corrections here.  But when you're fitting parts together, these differences matter.

 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1795
  • Country: us
Re: Resize a STL File For Me
« Reply #34 on: January 21, 2024, 06:14:37 pm »
I printed it before your reply.

It seems to have printed fine. The side grooves aren’t too deep, but I suspect that’s my printer. Sadly, it still doesn’t fit on the shaft; which again may just be my printer. Even applying lots of force, enough to damage the new encoder switch, it won’t slide on.

I’ll have to look into the calibration when I get a chance this week before I print another.

 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #35 on: January 21, 2024, 06:35:15 pm »
Deeper grooves..
You said earlier that the Thingiverse knob fit loosely? 
I matched up the hole size to the Thingiverse knob.
(It's now 6.1mm with 4.7mm slot)

1987699-0
« Last Edit: January 21, 2024, 07:55:13 pm by MarkF »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Resize a STL File For Me
« Reply #36 on: January 21, 2024, 08:21:09 pm »
I wouldn't be surprised if the X and Y axes are off a mm or so in 100, so calibration will certainly be beneficial, but I would be very surprised if its off by a large enough percentage to affect the fit of a 6mm hole.  X and Y calibration on Prusa I3 clones like the Anet A8 is affected by belt tension, as they do stretch slightly under tension, so make sure the belts are tensioned correctly before calibration.

Extruder calibration is likely to improve small hole fit some, but the volume extruded is also critically dependent on filament diameter, and cheap filament may deviate significantly from nominal. e.g. 1.72mm instead of nom. 1.75mm is 3.4% less volume per unit length.    Take several measurements of the filament diameter for each new spool, and update your slicer's filament settings accordingly.   Even so, you will have to adjust small holes to compensate for the line being extruded dragging inwards as the nozzle moves round small radius interior perimeters, hence my suggestion to print an array of different fit holes test jig to see which hole fits best.  N.B. if you alter the perimeter extrusion speed or nozzle temperature, the required hole compensation will change some, so keep them consistent between test jig and actual part.

Also note that the as-shipped Anet A8 firmware is notorious for not having thermal runaway protection enabled, so unless you have upgraded to a version of Marlin compiled with thermal runaway protection enabled, *DO* *NOT* print unattended, even for only a few minutes.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1795
  • Country: us
Re: Resize a STL File For Me
« Reply #37 on: January 21, 2024, 08:26:52 pm »
I’ll try printing it tonight or tomorrow.

Yes, the Thingiverse was loose, but it’s fine as I planned to glue it. The original knob (as you probably saw) uses a V shape groove which I assume causes it to grip tighter on the shaft. Maybe the corners make a solid contact and the flatter part has less contact resistance allowing it to slide on easier and that’s how it manages to have such a strong hold without needing to force it.

Whatever the case may be, the fact a replacement knob now exists is absolutely amazing. Years ago we couldn’t do this, now someone at one part of the world can send a file to someone else and have a replacement part for the cost of a few cents in filament.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #38 on: January 21, 2024, 10:13:41 pm »
I overlayed mine with the Thingiverse knob and mine is ever so slightly smaller.
If your new print is too loose, I shave a little more off to make it tighter.
The last (ver6) is a 6.1mm diameter.  I could make it 6.05mm.  Let me know.

1987888-0

Mine = gray
Thingiverse = purple
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Resize a STL File For Me
« Reply #39 on: January 21, 2024, 10:22:56 pm »
Another idea might be to adjust the size to slightly too loose then add a few narrow thin ribs on the interior flat of the D, along the shaft not cross-wise to add some crushability for a snug fit.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1795
  • Country: us
Re: Resize a STL File For Me
« Reply #40 on: January 21, 2024, 11:56:58 pm »
Quote
Also note that the as-shipped Anet A8 firmware is notorious for not having thermal runaway protection enabled, so unless you have upgraded to a version of Marlin compiled with thermal runaway protection enabled, *DO* *NOT* print unattended, even for only a few minutes.

Fully aware of this issue and appreciate the warning. The printer has been upgraded with the MOSFET for both the extruder (not necessarily needed) and the bed along with Marlin firmware. My goal was to add the Btouch (?) sensor, for auto leveling, but never got around to installing it.

Okay, here is the latest, something is odd. First off, keep in mind, I'm waiting on replacement rotary encoders that may or may not be the correct replacement due to size or whatever. With this being said, I'll gladly hold off trying to get a 3D printed knob that fits until these new encoders arrive.

With this being said, the most recent one still doesn't fit. I measured the encoder shaft, it's 5.98mm (I'm seeing 5.95mm at a few points - most likely worn down from removing the knob many times) and 4.48mm flat side to round part.

The Thingiverse part I printed (i.e. oversized knob) is approximately 6mm and fits tight enough that I can hold it upside down without it sliding off, but, if I hit the board on my hand, the knob falls off. The most recent one I printed from you is measuring approx. 5.44mm (and that's pulling on the calipers extremely tight).

Maybe something has shifted with my printer since I printed the Thingiverse one (because that fits and measures 6mm). Measuring the rest of the knob recently printed: base 18.25mm, top 17mm (hard to get a good measurement because it's rounded, height 13.05mm.

Give me a minute and I'll post a picture of the D hole being measured.

Edit: I also added a picture of the oversized Thingiverse hole size showing it's basically 6mm.
« Last Edit: January 22, 2024, 12:03:10 am by bostonman »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #41 on: January 22, 2024, 12:41:05 am »
You got me now.
Somewhere you said our knobs were a little smaller than the original.
So, I increased the knob overall diameter.  The base diameter should be 18.4mm

With an overall printing error of 0.15mm, you D-slot diameter should be 6.1mm - 1.5mm = 5.95
But, you show 5.44mm

Here is a 6.25mm diameter slot.
The base is still 18.4mm.

What size would you like me to make it?
« Last Edit: January 22, 2024, 01:25:53 am by MarkF »
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1795
  • Country: us
Re: Resize a STL File For Me
« Reply #42 on: January 22, 2024, 02:04:56 am »
I haven't tried your latest version, however, I went into SketchUp (online) and created a 3mm radius circle (should be 6mm diameter - unless I or SketchUp mesed up).

In the slicing software, I put your Knob002-ver6.zip (which has a file name: Knob002 inside) next to the 6mm circle (see attached) - I also scaled it up to 200% for better resolution.

The outside oval is the skirt (ignore), the left is your knob, and the right is the 6mm circle. With my limited tools (or at the moment mentally drawing a blank on another method), I went into Photoshop, drew a thin rectangle around the 6mm (outside of the three yellow lines) to use for measuring, dragged it over, and compared the two.

It looks like the hole on the knob is 6mm because the rectangle fit in the hole (I thought maybe my slicing software wasn't interpreting the stl file correctly). Is it possible where I drew the red arrow that the radius is closing too soon causing the shaft to not fit in?

Ignore my statement and the red arrow as it appears the measurements you show in your 2D drawing match throwing my theory out the window.

I'm measuring the base and seeing around 18.25. The diameter changes as I spin it down to around 18.11mm, but believe this is due to catching the lines. Although the diameter changes, it doesn't seem that it printed oval implying one of the axis has a loose belt. In all cases, I'm not seeing close to 18.4.

I will still look into calibration and belt tension, but something is obviously off. Maybe printing it at 90% fill is causing issues or printing in the cold (it's in my basement) is causing issues.

 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Resize a STL File For Me
« Reply #43 on: January 22, 2024, 02:19:48 am »
Scaling off the original STL, as rendered by OpenSCAD, I got dimensions of 6.13mm dia, and 4.8mm  on the flat. but that's before printing, and as I explained above, unless the slicer software is advanced and very well tuned, FDM 3D printed small holes invariably close up some when printed.  It seems likely that a 6.13 mm hole was printing 0.13mm or so undersize and it felt loose because that wasn't enough to bring the D flat dimension down to the 4.5mm or so that would be needed for a slip fit to the existing shaft.

However you can get a false tight fit due to Z banding resulting in a hole that's snakey rather than straight sided, and as its got a flat, reaming to size is not a practical option.   

Try this test jig for fit on your existing measured shaft, preferably printed on a raft to avoid elephant's foot distortion.  It starts off at exact nominal size for the hole at the notched corner, and goes up in 0.1mm increments along its length.  The second row holes are 0.05mm bigger than the adjacent first row hole.  The max. oversize is +0.55mm, and if that's not enough, you probably need to fix/tune your printer!

Code: [Select]
shaft_d=5.98;
shaft_f=4.48;
h=3;
grid=10;
nx=2;
ny=6;
ovstep=0.05;
$fn=120;
$dd=1e-3;

module dshaft(l,d,f){ //l=length, d=dia, f=thickness at flat
    intersection(){
        cylinder(h=l,d=d);
        translate([0,f-d,l/2]) cube([d,d,l],center=true);
    }
}

//render()  // only needed (for preview) if graphics driver OpenGL is broken!
difference(){
    cube([grid*nx,grid*ny,h]);
    // --- cuts ---
    cylinder(h=h,r=1); // mark origin corner
    for(x=[0,nx-1])
        for(y=[0:ny-1]){
            oversize=ovstep*(y*nx+x);
            echo(str("[",x,", ",y,"] +",oversize," mm"));
            translate([grid*x+grid/2,grid*y+grid/2,-$dd])
                dshaft(h+2*$dd,shaft_d+oversize,shaft_f+oversize*shaft_f/shaft_d);
        }
}
« Last Edit: January 22, 2024, 02:23:13 am by Ian.M »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #44 on: January 22, 2024, 02:59:04 am »
I don't see how the outside diameter is off by 0.15mm while the inside slot diameter is off by 0.5mm.  Over extrusion might cause some of that.  But not that much difference.

Until you do a calibration, you might try printing a 100mm x 100mm square that is only 2 or 3 layers.  Leaving a 50mm x 50mm hole in the middle.  See how close the measurements are.
« Last Edit: January 22, 2024, 03:07:08 am by MarkF »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #45 on: January 22, 2024, 03:14:14 am »
Looking again at the knob print you did; are those ridges, highlighted in red, layer shifts?
They are going to have a hugh impact on the size.

1988107-0
« Last Edit: January 22, 2024, 03:15:47 am by MarkF »
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1795
  • Country: us
Re: Resize a STL File For Me
« Reply #46 on: January 22, 2024, 03:19:24 am »
I will print the test jig tomorrow; it's a great idea.

As loosely mentioned, I'm taking all the possibilities into account and will exercise calibration, belt tension, etc... For now, I just tinkered with the STL file for fun.

Sometimes I like to rule out the simpler things and/or just putts around with what is somewhat easier to rule out; in this case it was easy since I was sitting in front of the computer.

Ian.M, as usual, your input is very well accepted. It's quite obvious it's printer related, whether one or a combination of stuff you (and others) have mentioned.

Quote
Scaling off the original STL, as rendered by OpenSCAD, I got dimensions of 6.13mm dia, and 4.8mm

Just to clarify, are you referring to the initial one I posted that's too large (30mm ??) If so, then it would explain why it fit (and loosely) since these others were drawn at 6mm.

Does it make sense to make the hole as a V shape per the factory knob? As I mentioned, I'm guessing the V part allows for less of the surfaces to touch giving more room for error whereas a (half) hole has to fit a round shaft.

My printer isn't anything great as some of you may know. How I acquired it is a different story, but I printed many of the associated brackets allowing me to tighten the belts without bending the acrylic (or less bending). The shaft bearings were replaced for smoother movement, belts were tightened (may have stretched now), and I built an overhead filament holder reducing friction as the roll turns.
 

Offline bostonmanTopic starter

  • Super Contributor
  • ***
  • Posts: 1795
  • Country: us
Re: Resize a STL File For Me
« Reply #47 on: January 22, 2024, 03:28:25 am »
Here are some closeups. It’s printed so the closed end is the bottom layer and I’ve noticed the printer doesn’t handle curves well, so the first layer is part of the support material and the curved part is a bit off. The sides are fairly smooth with the ability to feel the layers as I pass my fingernail across them.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #48 on: January 22, 2024, 03:28:46 am »
Another thing you can try is design a small cylinder with a 6mm hole in SketchUp.
You'll want to verify the inside and outside are smooth to rule out loose belts.
Adjust the size till you get a fit.  We can then adjust the knob in the short term.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Resize a STL File For Me
« Reply #49 on: January 22, 2024, 03:30:48 am »
Here are some closeups. It’s printed so the closed end is the bottom layer and I’ve noticed the printer doesn’t handle curves well, so the first layer is part of the support material and the curved part is a bit off. The sides are fairly smooth with the ability to feel the layers as I pass my fingernail across them.

Are you printing it upside down?

You might try right-side up with supports.
Maybe the print is rocking on the dome as it prints.

With a 0.12mm layer height, the print should be extremely smooth.
Not what's in the pictures.
« Last Edit: January 22, 2024, 03:32:23 am by MarkF »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf