# Show axes of stl file

**URL:** <https://discourse.threejs.org/t/show-axes-of-stl-file/38610>\
**Category:** Questions\
**Tags:** axes\
**Created:** [May 28, 2022, 7:09pm UTC](https://discourse.threejs.org/t/show-axes-of-stl-file/38610 "2022-05-28T19:09:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [May 28, 2022, 7:09pm UTC](https://discourse.threejs.org/t/show-axes-of-stl-file/38610/1 "2022-05-28T19:09:58Z")

</div>

Hi, how can we view axes of a stl file? Can we create axes on some position, so that we can display user frame coordinate system.

---

<div class="post-metadata">

**Author:** ![Fennec](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fennec/32/59265_2.png) [@Fennec](https://discourse.threejs.org/u/Fennec)\
**Post date:** [May 28, 2022, 7:14pm UTC](https://discourse.threejs.org/t/show-axes-of-stl-file/38610/2 "2022-05-28T19:14:28Z")

</div>

There is the [AxesHelper](https://threejs.org/docs/#api/en/helpers/AxesHelper), if it is what I think you’re looking for, add it the root object of your `Stl` scene it should orient itself in the direction of that object.

---

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [May 28, 2022, 7:21pm UTC](https://discourse.threejs.org/t/show-axes-of-stl-file/38610/3 "2022-05-28T19:21:53Z")

</div>

I tired the same, it isn’t working… I hope i am doing correctly

```javascript
var bmaterial = new THREE.MeshPhongMaterial( { color: 0x0e2045, specular: 0x111111, shininess: 200, opacity: .8, transparent: true } );
	loader.load( './model/bottomC.stl', function ( geometry ) {
	var bottomf = new THREE.Mesh( geometry, bmaterial );
		bottomf.castShadow = true;
		bottomf.receiveShadow = true;
		sys.add(bottomf);
	});

const axesHelper = new THREE.AxesHelper( 2);
sys.add( axesHelper );

```

---

<div class="post-metadata">

**Author:** ![Fennec](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fennec/32/59265_2.png) [@Fennec](https://discourse.threejs.org/u/Fennec)\
**Post date:** [May 28, 2022, 7:35pm UTC](https://discourse.threejs.org/t/show-axes-of-stl-file/38610/4 "2022-05-28T19:35:26Z")

</div>

If you want the orientation of the `bottomf` object, add the `AxesHelper` to it, also check the scale of that object, may be it’s too big and it’s hiding the axes object inside, set the axes first param accordingly.

The code should look like this

```javascript
var bmaterial = new THREE.MeshPhongMaterial({
  color: 0x0e2045,
  specular: 0x111111,
  shininess: 200,
  opacity: 0.8,
  transparent: true,
});

loader.load("./model/bottomC.stl", function (geometry) {
  var bottomf = new THREE.Mesh(geometry, bmaterial);
  bottomf.castShadow = true;
  bottomf.receiveShadow = true;

  const axesHelper = new THREE.AxesHelper(2);
  bottomf.add(axesHelper);

  sys.add(bottomf);
});

```

---

<div class="post-metadata">

**Author:** ![ashishsiddharth](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ashishsiddharth/32/10940_2.png) [@ashishsiddharth](https://discourse.threejs.org/u/ashishsiddharth)\
**Post date:** [May 28, 2022, 7:41pm UTC](https://discourse.threejs.org/t/show-axes-of-stl-file/38610/5 "2022-05-28T19:41:25Z")

</div>

The problem was with scaling… Thank you.
