#🔒 cant run my script

70 messages · Page 1 of 1 (latest)

jagged spindle
#

anyone wamt to help me.

worn ploverBOT
#

@jagged spindle

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

wind kraken
#

hey

#

tell me about this thing, you can share images here if you want

jagged spindle
#

import cadquery as cq

MĂ„tt (i mm) – justera vid behov
inner_width = 20 # Bredd pÄ öglan
clip_thickness = 4 # Tjocklek pÄ klÀmman
clip_depth = 10 # Djup in i öglan
clip_length = 60 # LĂ€ngd som sticker ut
hook_radius = 10 # Radie pÄ skohornshÀngaren

Basdel som gÄr in i öglan
base = (
cq.Workplane("XY")
.box(inner_width, clip_thickness, clip_depth)
)

Kroppen som sticker ut
clip_body = (
cq.Workplane("XY")
.transformed(offset=(0, 0, clip_depth))
.box(inner_width, clip_thickness, clip_length)
)

Rund krok i Ànden
hook = (
cq.Workplane("XZ")
.transformed(offset=(0, clip_thickness/2, clip_depth + clip_length))
.threePointArc((0, 0, hook_radius * math.pi), (0, 0, hook_radius * 2 * math.pi))
.sweep(cq.Workplane("YZ").circle(inner_width / 2))
)

Kombinera allt
hanger = base.union(clip_body).union(hook)

Exportera till STL
cq.exporters.export(hanger, 'skohornshangare_clip.stl')

#

ther we go

wind kraken
#

use a code block when sharing code

#

!code

worn ploverBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

wind kraken
#

read this

jagged spindle
#

!code import cadquery as cq

MĂ„tt (i mm) – justera vid behov
inner_width = 20 # Bredd pÄ öglan
clip_thickness = 4 # Tjocklek pÄ klÀmman
clip_depth = 10 # Djup in i öglan
clip_length = 60 # LĂ€ngd som sticker ut
hook_radius = 10 # Radie pÄ skohornshÀngaren

Basdel som gÄr in i öglan
base = (
cq.Workplane("XY")
.box(inner_width, clip_thickness, clip_depth)
)

Kroppen som sticker ut
clip_body = (
cq.Workplane("XY")
.transformed(offset=(0, 0, clip_depth))
.box(inner_width, clip_thickness, clip_length)
)

Rund krok i Ànden
hook = (
cq.Workplane("XZ")
.transformed(offset=(0, clip_thickness/2, clip_depth + clip_length))
.threePointArc((0, 0, hook_radius * math.pi), (0, 0, hook_radius * 2 * math.pi))
.sweep(cq.Workplane("YZ").circle(inner_width / 2))
)

Kombinera allt
hanger = base.union(clip_body).union(hook)

Exportera till STL
cq.exporters.export(hanger, 'skohornshangare_clip.stl')

wind kraken
#

no. read it

#

and once read, you do what it shows and tells you to do. that way we can read your code here on discord

jagged spindle
worn ploverBOT
jagged spindle
#

like that?

wind kraken
#

did you read the code tag?

jagged spindle
#

i dont know pyhon

wind kraken
#

thats not really what i asked

#

did you read this?

jagged spindle
#

yes

wind kraken
#

and what does it say you should do?

jagged spindle
#

MĂ„tt (i mm) – justera vid behov
inner_width = 20       # Bredd pÄ öglan
clip_thickness = 4     # Tjocklek pÄ klÀmman
clip_depth = 10        # Djup in i öglan
clip_length = 60       # LĂ€ngd som sticker ut
hook_radius = 10       # Radie pÄ skohornshÀngaren

Basdel som gÄr in i öglan
base = (
    cq.Workplane("XY")
    .box(inner_width, clip_thickness, clip_depth)
)

Kroppen som sticker ut
clip_body = (
    cq.Workplane("XY")
    .transformed(offset=(0, 0, clip_depth))
    .box(inner_width, clip_thickness, clip_length)
)

Rund krok i Ànden
hook = (
    cq.Workplane("XZ")
    .transformed(offset=(0, clip_thickness/2, clip_depth + clip_length))
    .threePointArc((0, 0, hook_radius * math.pi), (0, 0, hook_radius * 2 * math.pi))
    .sweep(cq.Workplane("YZ").circle(inner_width / 2))
)

Kombinera allt
hanger = base.union(clip_body).union(hook)

Exportera till STL
cq.exporters.export(hanger, 'skohornshangare_clip.stl')

wind kraken
#

this is not python, this is just how discord works

jagged spindle
#

aha

wind kraken
jagged spindle
#
import cadquery as cq

MĂ„tt (i mm) – justera vid behov
inner_width = 20       # Bredd pÄ öglan
clip_thickness = 4     # Tjocklek pÄ klÀmman
clip_depth = 10        # Djup in i öglan
clip_length = 60       # LĂ€ngd som sticker ut
hook_radius = 10       # Radie pÄ skohornshÀngaren

Basdel som gÄr in i öglan
base = (
    cq.Workplane("XY")
    .box(inner_width, clip_thickness, clip_depth)
)

Kroppen som sticker ut
clip_body = (
    cq.Workplane("XY")
    .transformed(offset=(0, 0, clip_depth))
    .box(inner_width, clip_thickness, clip_length)
)

Rund krok i Ànden
hook = (
    cq.Workplane("XZ")
    .transformed(offset=(0, clip_thickness/2, clip_depth + clip_length))
    .threePointArc((0, 0, hook_radius * math.pi), (0, 0, hook_radius * 2 * math.pi))
    .sweep(cq.Workplane("YZ").circle(inner_width / 2))
)

Kombinera allt
hanger = base.union(clip_body).union(hook)

Exportera till STL
cq.exporters.export(hanger, 'skohornshangare_clip.stl')
wind kraken
#

there you go

jagged spindle
#

hahaha

wind kraken
#

now.. this is not python code, this is output from a gpt

jagged spindle
#

im retarded 😛

#

yes

wind kraken
#

but it is not the code output, you copied the text output

jagged spindle
#

so how would i run this?

#

or make it into a 3d object?

wind kraken
#

this is not code, its human langauge

jagged spindle
#

yes its swedish

wind kraken
#

the gpt wrote a # infront of it

#

and you removed it

wind kraken
#

notice you have # here

jagged spindle
#

ok that understand why i could not paste and run it in freecad

wind kraken
#

so the gpt knows that human langauge needs it

jagged spindle
#

its step per step oi see now

wind kraken
#

to run python you have to have python installed

jagged spindle
#

well thank u for all help i will kill my self for waste ur time ;P

wind kraken
#

the gpt model does not really know how to write code, so it does not know how to help you out

#

to run python code you need to have two things in place, in most of the cases

#

you have to have python installed, and you have to have any third party packages, like cadquery already installed before you run the code using it

jagged spindle
#

its sounds so complicated for me, i think i will just cad it for scratch myself

#

i was hopping to save some time

wind kraken
#

you will save time if you learn python

#

if you use a gpt you will not save time

jagged spindle
#

true true, i wish i was smart to learn python

wind kraken
#

you dont have to be smart

#

you just have to do all the work yourself

jagged spindle
#

but dont have that mutch time over with work and wife

wind kraken
#

if you want to be able to save time in the long run, it requires short time investment up front

jagged spindle
#

true

#

it was just a simple thing i wanted to quick print

wind kraken
#

i dont think generative AI is a good choice when you have an expectation of its outcome beforehand, you kinda have to accept what you get

#

thats what makes AI such a poor tool when you want to do something exact, like programming

worn ploverBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.