How to calculate thread length?
See original GitHub issueThis is not an issue, just a question I couldn’t find an answer to. I would be really thankful if someone can provide some help with this. I’m trying to come up with a formula to calculate the thread length needed for a pattern. I tried the distance formula between 2 stitches ( d = sqrt(a^2 + b^2) ) :
file = "../assets/e4-1053.DST"
pattern = pyembroidery.read(file)
distance = []
for i in range(0, len(pattern.stitches)-1, 1):
if pattern.stitches[i][2] == pyembroidery.STITCH:
a_x = pattern.stitches[i][0]
a_y = pattern.stitches[i][1]
b_x = pattern.stitches[i+1][0]
b_y = pattern.stitches[i+1][1]
d_x = a_x - b_x
d_y = a_y - b_y
distance.append(math.sqrt(pow(d_x/10,2) + pow(d_y/10,2)))
threadlen = sum(distance)
print(threadlen)
the result for this example is about 19.2m
I know this is missing the distance the thread has to travel at each stitch point passing through the fabric, but the result is way too far off compared to what I get when I open the same file in Wilcom truesizer where I get 55m.
What am I missing?
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
How to Calculate Fastener Minimum Thread Engagement ...
The thread engagement length is multiplied by a ratio of the shear areas and ultimate tensile strengths of the respective materials. Thread ......
Read more >How to Determine the Thread Length of a Bolt
Need to know how to determine the amount of thread on a bolt? For a hex cap screw the rule of thumb is...
Read more >Bolt Thread Length
Bolts that are longer than 6″ have a thread length of twice the diameter plus 1/2″. For example, a 1/2 x 6 hex...
Read more >How To Calculate Length Of Screw Thread?
As an intuitively convincing method, you could consider straightening out the arc into a line of length 212π and then stretching it along ......
Read more >How Long is the Thread Length of a Metric Bolt
For Bolts over 200mm in length ... Multiply the diameter by 2 and add 25mm – this is the minimum length that the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think wilcom’s equation is something like
total_length * 1.375 + 2 * thickness * stitches
. It seems to be about 37-38% longer than the raw distance. I’m guessing because material floof or they actually measured it and took the average additional length such things did. Since the thread isn’t perfectly taught.I would assume wilcom probably actually measured it. And made a pretty good guess. Comparing it to other software is likely fine but the real gold standard should be comparing it to how close it actually comes to being correct with those lengths. If you run a 200m spool, does it die where that estimate suggested it would? Etc.