Rotating gears breaking off

I have been trying to rotate and mesh the wheels of this simple gear train, contained in a single .stl file, but in the animation a wheel always breaks off one part of the other wheel and starts rotaing, like shown here.
I checked the segmentation of these wheels and it confirmed my previous assessment of one wheel taking a part of the other wheel with itself (the part which is meshed) as shown below.
How to solve this?

1 Comment

DGM
DGM on 7 Aug 2025
Edited: DGM on 7 Aug 2025
We don't know what's in the STL file, or what code you're actually using on it. If I had to guess from the screenshot, the two objects are not unconnected. It appears to be a triangulation of two overlapping parts, but again, I'm looking at a small screenshot after it's been processed, not the actual file.
Attach the STL file (needs to be zipped) and provide some description of where it came from and how you're processing it. If the objects are overlapping like they appear to be, then there are going to be entire sections with missing teeth geometry. If that's the case, you're probably going to have to start wtih an STL that isn't messed up to begin with.

Sign in to comment.

Answers (0)

Categories

Products

Release

R2024b

Asked:

on 7 Aug 2025

Edited:

DGM
on 7 Aug 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!