<p>One can create a module to import the respective STL files.</p>

<blockquote>
  <p>module bring_it_on_1() {</p>
  
  <p>import("c:/user/models/egg_on_face.stl");</p>
  
  <p>}</p>
  
  <p>translate([-10, 20, 0]) </p>
  
  <p>bring_it_on_1();</p>
</blockquote>

<p>Other modifiers can be used and will act on the STL file appropriately.</p>

CC BY-SA 4.0
2020-08-16T10:24:02.013Z
The OpenSCAD forum has a discussion regarding this topic: http://forum.openscad.org/Working-with-imported-STLs-td23840.html which includes a link to a program to convert STL to OpenSCAD, which may reduce or eliminate the problem you experience.
fred_dot_u
CC BY-SA 4.0
2020-04-11T01:58:37.463Z
2020-04-11T01:58:37.463Z
fred_dot_u
<p>I have 2 STL files that I want to chop, rotate, and glue together.  If I printed them and literally chopped and glued them together, I would be done.  Very simple operations.</p>

<p>I imported them both into OpenSCAD, but I can't find docs or figure out a way to do anything to the STL files once they are imported.  They imported fine.  I don't know how to assign a variable name to the imported object, which I presume is the next step before I can rotate and move the objects around.  I might be going in the wrong direction though, I don't know.  usually during an import of a module you can assign a variable name, or instantiate it.  Since the import also instantiates it, I'm at a loss for what to do next.  I've programmed in a smattering of languages, but haven't touched OpenSCAD in ~3+ years.</p>

<p>When searching, I find a cornucopia of slightly related information like how to import a file from 2011, but nothing about how to work with it once it's been imported.</p>

<openscad>
How to I assign an imported STl file to a variable, polygon, or otherwise manipulate it?
YetAnotherRandomUser
# How to I assign an imported STl file to a variable, polygon, or otherwise manipulate it?

(Asked by: username_0 on 2020-04-11)

I have 2 STL files that I want to chop, rotate, and glue together. If I printed them and literally chopped and glued them together, I would be done. Very simple operations.

I imported them both into OpenSCAD, but I can't find docs or figure out a way to do anything to the STL files once they are imported. They imported fine. I don't know how to assign a variable name to the imported object, which I presume is the next step before I can rotate and move the objects around. I might be going in the wrong direction though, I don't know. usually during an import of a module you can assign a variable name, or instantiate it. Since the import also instantiates it, I'm at a loss for what to do next. I've programmed in a smattering of languages, but haven't touched OpenSCAD in ~3+ years.

When searching, I find a cornucopia of slightly related information like how to import a file from 2011, but nothing about how to work with it once it's been imported.

**Tags:** openscad

---

## 1 answers

### Answer by username_1 on 2020-04-11. Score: 1

One can create a module to import the respective STL files.

> module bring\_it\_on\_1() {
>
> import("c:/user/models/egg\_on\_face.stl");
>
> }
>
> translate([-10, 20, 0])
>
> bring\_it\_on\_1();

Other modifiers can be used and will act on the STL file appropriately.

> **Comments:**
> **username_1**: The OpenSCAD forum has a discussion regarding this topic: http://forum.openscad.org/Working-with-imported-STLs-td23840.html which includes a link to a program to convert STL to OpenSCAD, which may reduce or eliminate the problem you experience.  

---

