# Blender generated STL files not showing up in snapmaker luban 4.7

**URL:** <https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477>\
**Category:** Snapmaker Luban\
**Created:** [May 22, 2023, 3:53pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477 "2023-05-22T15:53:42Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 22, 2023, 3:53pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/1 "2023-05-22T15:53:42Z")

</div>

I created an object in blender using Python. The file shows up on viewers and other software but not on snapmaker luban  
[disk\_with\_hole\_rim\_and\_boxes.stl](https://forum.snapmaker.com/uploads/short-url/cw5OVOCbQj1AbEdInAHklvxnmd0.stl) (57.3 KB)  
. The code looks like it’s all in binary so I don’t even know what to make of it. Any help would be appreciated.

Thank you

---

<div class="post-metadata">

**Author:** ![Rwide](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/rwide/32/27055_2.png) [@Rwide](https://forum.snapmaker.com/u/Rwide)\
**Post date:** [May 22, 2023, 4:13pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/2 "2023-05-22T16:13:12Z")

</div>

It’s pretty small. Did you try scaling it up 10 000%?

---

<div class="post-metadata">

**Author:** ![Rwide](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/rwide/32/27055_2.png) [@Rwide](https://forum.snapmaker.com/u/Rwide)\
**Post date:** [May 22, 2023, 4:19pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/3 "2023-05-22T16:19:37Z")

</div>

![Snap 2023-05-22 at 18.18.55](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/3X/5/f/5f18241db95b96985b299896f14b87a660ef9d96.png)

---

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 22, 2023, 5:49pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/4 "2023-05-22T17:49:53Z")

</div>

that’s the problem. I’m a newb at this. I used chatGpt to come up with the python code. thanks for that, need to poke thru code and see where my original size settings went awry.

---

<div class="post-metadata">

**Author:** ![Rwide](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/rwide/32/27055_2.png) [@Rwide](https://forum.snapmaker.com/u/Rwide)\
**Post date:** [May 22, 2023, 5:56pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/5 "2023-05-22T17:56:04Z")

</div>

Code might be fine as it is. Just change your unit scale in blender and then save a new startup file.

 ![Snap 2023-05-22 at 18.25.03](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/3X/c/a/cabe5da84a5e22f3f4af9afdaeb1f04043c1fd28.png)

or maybe you need to tell chat GPT that you want another unit scale…

---

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 22, 2023, 6:42pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/6 "2023-05-22T18:42:42Z")

</div>

It’s set to meters in my scene properties. Which is in line with the code that I have. What’s outputted and shows up on snapmaker luban is something which is basically one by two millimeters in size

 ![Capture.PNG](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/3X/0/4/04e65d257c1da346ed6290bc6d9dc311aeca1ee1.jpeg)  
 ![Capture2](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/3X/f/c/fc84b9f9307da0db98e0bb94150abb0821a210b5.png)

---

<div class="post-metadata">

**Author:** ![Rwide](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/rwide/32/27055_2.png) [@Rwide](https://forum.snapmaker.com/u/Rwide)\
**Post date:** [May 22, 2023, 6:45pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/7 "2023-05-22T18:45:36Z")

</div>

Yes but your unit scale is 1.0 right? You need to change it to 0.001 for the scales to match…

---

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 22, 2023, 6:54pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/8 "2023-05-22T18:54:19Z")

</div>

That looks like it could be it. We’ll give it a try

---

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 22, 2023, 7:10pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/9 "2023-05-22T19:10:41Z")

</div>

> [@Rwide](#):
>
> 0.001

dint work.  
here my python script  
import bpy  
import math

# Function to create a cylinder

def create\_cylinder(name, radius, depth, location, vertices=32):  
bpy.ops.mesh.primitive\_cylinder\_add(  
radius=radius,  
depth=depth,  
location=location,  
vertices=vertices)  
obj = bpy.context.active\_object  
obj.name = name  
return obj

# Function to create a ring

def create\_ring(name, outer\_radius, inner\_radius, depth, location, vertices=32):  
outer\_cylinder = create\_cylinder(name + “\_outer”, outer\_radius, depth, location, vertices)  
inner\_cylinder = create\_cylinder(name + “\_inner”, inner\_radius, depth, location, vertices)

```
bpy.context.view_layer.objects.active = outer_cylinder
bpy.ops.object.modifier_add(type='BOOLEAN')
outer_cylinder.modifiers['Boolean'].object = inner_cylinder
outer_cylinder.modifiers['Boolean'].operation = 'DIFFERENCE'
bpy.ops.object.modifier_apply(modifier='Boolean')

bpy.ops.object.select_all(action='DESELECT')
inner_cylinder.select_set(True)
bpy.ops.object.delete()

return outer_cylinder

```

# Delete all mesh objects

bpy.ops.object.select\_all(action=‘DESELECT’)  
bpy.ops.object.select\_by\_type(type=‘MESH’)  
bpy.ops.object.delete()

# Blender uses meters, but 1 inch = 0.0254 meters

main\_disk\_radius = 11 \* 0.0254 / 2  
main\_disk\_height = 1 \* 0.0254

rim\_outer\_radius = main\_disk\_radius  
rim\_inner\_radius = rim\_outer\_radius - 0.25 \* 0.0254  
rim\_height = 4 \* 0.0254

hole\_radius = 0.75 \* 0.0254 / 2  
hole\_height = main\_disk\_height + rim\_height

# Create the main disk

main\_disk = create\_cylinder(“main\_disk”, main\_disk\_radius, main\_disk\_height, (0, 0, main\_disk\_height / 2))

# Create the rim ring with 24 faces

rim\_ring = create\_ring(“rim\_ring”, rim\_outer\_radius, rim\_inner\_radius, rim\_height, (0, 0, main\_disk\_height + rim\_height / 2), vertices=24)

# Create the hole cylinder

hole\_cylinder = create\_cylinder(“hole\_cylinder”, hole\_radius, hole\_height, (0, 0, (main\_disk\_height + hole\_height) / 2))

# Add the rim to the main disk

bpy.context.view\_layer.objects.active = main\_disk  
bpy.ops.object.modifier\_add(type=‘BOOLEAN’)  
main\_disk.modifiers[‘Boolean’].object = rim\_ring  
main\_disk.modifiers[‘Boolean’].operation = ‘UNION’  
bpy.ops.object.modifier\_apply(modifier=‘Boolean’)

# Cut hole in the resulting disk

bpy.context.view\_layer.objects.active = main\_disk  
bpy.ops.object.modifier\_add(type=‘BOOLEAN’)  
main\_disk.modifiers[‘Boolean’].object = hole\_cylinder  
main\_disk.modifiers[‘Boolean’].operation = ‘DIFFERENCE’  
bpy.ops.object.modifier\_apply(modifier=‘Boolean’)

# Delete the hole\_cylinder and rim\_ring

bpy.ops.object.select\_all(action=‘DESELECT’)  
hole\_cylinder.select\_set(True)  
rim\_ring.select\_set(True)  
bpy.ops.object.delete()

# Now we need to export the object as STL

bpy.ops.object.select\_all(action=‘DESELECT’)  
main\_disk.select\_set(True)  
bpy.ops.export\_mesh.stl(filepath=“C:/Users/Baron/Documents/disk\_with\_hole\_and\_rim.stl”)

---

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 22, 2023, 7:15pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/10 "2023-05-22T19:15:44Z")

</div>

I’m having GBT change the code to scale it up by 1000

---

<div class="post-metadata">

**Author:** ![Rwide](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/rwide/32/27055_2.png) [@Rwide](https://forum.snapmaker.com/u/Rwide)\
**Post date:** [May 22, 2023, 7:16pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/11 "2023-05-22T19:16:32Z")

</div>

After 0.001 unit scale is applied. Blender will use millimeters not meters as standard unit.

I think maybe you need to think in millimeters in your code. So it should be 25.4 in your example 🙂

---

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 22, 2023, 7:31pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/12 "2023-05-22T19:31:23Z")

</div>

ok will try, thx, you’ve been very helpful

---

<div class="post-metadata">

**Author:** ![Rwide](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/rwide/32/27055_2.png) [@Rwide](https://forum.snapmaker.com/u/Rwide)\
**Post date:** [May 22, 2023, 7:36pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/13 "2023-05-22T19:36:43Z")

</div>

No problem!

---

<div class="post-metadata">

**Author:** ![ctaddey](https://avatars.discourse-cdn.com/v4/letter/c/bbe5ce/32.png) [@ctaddey](https://forum.snapmaker.com/u/ctaddey)\
**Post date:** [May 24, 2023, 3:54pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/14 "2023-05-24T15:54:38Z")

</div>

Maybe you should be using OPENScad instead of phyton+blender?

---

<div class="post-metadata">

**Author:** ![mcwhirtj](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@mcwhirtj](https://forum.snapmaker.com/u/mcwhirtj)\
**Post date:** [May 29, 2023, 5:04pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/15 "2023-05-29T17:04:56Z")

</div>

I had similar issue w/ .stl file generated by my granddaughter from some software she used at a Girl Scout camp. In the end, I discovered this (and seems this is relevant to your situation):

Luban is constrained to import .stl files with units set to mm. I.e., it will interpret all dims as mm no mater how or what the .stl export software intended. When I found this info (on some forum) and had my granddaughter re-export her .stl with units set to mm, and it subsequently imported to Luban as expected. Turns out that initially, she had exported it with units set to inches - and Luban was importing as mm so there was a 25.4x reduction in apparent “size” of the model!

Hope that is useful.

---

<div class="post-metadata">

**Author:** ![thebronxtexan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/thebronxtexan/32/14405_2.png) [@thebronxtexan](https://forum.snapmaker.com/u/thebronxtexan)\
**Post date:** [May 29, 2023, 7:43pm UTC](https://forum.snapmaker.com/t/blender-generated-stl-files-not-showing-up-in-snapmaker-luban-4-7/31477/16 "2023-05-29T19:43:35Z")

</div>

Gonna try that right now.
