Message 1 of 3
How to change direction of the thread?
Not applicable
06-24-2021
03:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello guys!
I have a couple of problems with making a thread of the bolt.
I made a thread on the face of the bolt, but the problem is that it starts from top.
But I want to make thread that starts from the bottom.
I tried to created an offset parameter but it's a little bit incorrect for me.
I really hope you might know the prorperty which can solve that kind of problem.
Here's part of the code:
if num1 == 1:
dThreadBolt77= d_bolt77[:-3]
threads77 = [('8', '1.25', '22 mm', '8 mm'), ('10', '1.5', '26 mm', '13 mm'), ('12', '1.75', '30 mm', ''), ('16', '2', '38 mm'), ('20', '2.5', '46 mm'), ('24','3', '54 mm')]
for i in range(0, len(threads77)):
if threads77[i][0] == dThreadBolt77:
threadPitch77 = threads77[i][1]
compBolt77 = components.itemByName('3 БОЛТ ГОСТ 7796').bRepBodies.item(0)
componentBolt77faces = compBolt77.faces
faceBolt77 = componentBolt77faces.item(2)
threadTypeBolt77 = "ISO Metric profile"
threadDesignationBolt77 = 'M'+ dThreadBolt77 + 'x' + threadPitch77
threadClassBolt77 = '6g'
threadFeaturesBolt77 = components.itemByName('3 БОЛТ ГОСТ 7796').features.threadFeatures
threadInfoBolt77 = threadFeaturesBolt77.createThreadInfo(False, threadTypeBolt77, threadDesignationBolt77, threadClassBolt77)
threadInputBolt77 = threadFeaturesBolt77.createInput(faceBolt77, threadInfoBolt77)
threadInputBolt77.isFullLength = False
threadInputBolt77.threadLength = adsk.core.ValueInput.createByString(threads77[i][2])
threadBolt77 = threadFeaturesBolt77.add(threadInputBolt77)