Skip to main content

Upload my 3D files on Sketchfab for public purpose

This model is updated on Feb.7th.

Write something in advance

As my mentor said I should put my 3D files public, and I have learned the tool - "Sketchfab" as well as the way to do it.

The steps to upload my 3D files on Sketchfab from Onshape

  1. I first need to have my ".stl" formal 3D file from Onshape. As I learned that I should right click the "Part" and select "Export".

image1

  1. Then choose the "STL" then click "Export". I will have a ".stl" file.

image2

  1. I then go to the "Sketchfab" official website, creating an account, then clicking "upload". It looks like this:

image3

I then file the information of mine.

image4

And I have checked the preview, whicn looks fine to me. Finally I click the "publich" button.

image5

  1. For adding this model into my website, I should have the embedded code. I click the "Embed" block and it will automatically give me the code.

image6

The code is looking like this:

<div class="sketchfab-embed-wrapper"> <iframe title="Fab Lab Matthew 2024" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/d2a31a4312c042248d6963d11617de29/embed"> </iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;"> <a href="https://sketchfab.com/3d-models/fab-lab-matthew-2024-d2a31a4312c042248d6963d11617de29?utm_medium=embed&utm_campaign=share-popup&utm_content=d2a31a4312c042248d6963d11617de29" target="_blank" rel="nofollow" style="font-weight: bold; color: #1CAAD9;"> Fab Lab Matthew 2024 </a> by <a href="https://sketchfab.com/matthew031097?utm_medium=embed&utm_campaign=share-popup&utm_content=d2a31a4312c042248d6963d11617de29" target="_blank" rel="nofollow" style="font-weight: bold; color: #1CAAD9;"> matthew031097 </a> on <a href="https://sketchfab.com?utm_medium=embed&utm_campaign=share-popup&utm_content=d2a31a4312c042248d6963d11617de29" target="_blank" rel="nofollow" style="font-weight: bold; color: #1CAAD9;">Sketchfab</a></p></div>

But my website is built with Docusaurus and I should convert them into "JSX" format. And I would like it show in the center of my page, so I add style={{textAlign: 'center'}} into the code as well:

<div className="sketchfab-embed-wrapper" style={{textAlign: 'center'}} > <iframe title="Fab Lab Matthew 2024" frameBorder={0} allowFullScreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/d2a31a4312c042248d6963d11617de29/embed"> </iframe> <p style={{fontSize: 13, fontWeight: 'normal', margin: 5, color: '#4A4A4A'}}> <a href="https://sketchfab.com/3d-models/fab-lab-matthew-2024-d2a31a4312c042248d6963d11617de29?utm_medium=embed&utm_campaign=share-popup&utm_content=d2a31a4312c042248d6963d11617de29" target="_blank" rel="nofollow" style={{fontWeight: 'bold', color: '#1CAAD9'}}> Fab Lab Matthew 2024 </a> by <a href="https://sketchfab.com/matthew031097?utm_medium=embed&utm_campaign=share-popup&utm_content=d2a31a4312c042248d6963d11617de29" target="_blank" rel="nofollow" style={{fontWeight: 'bold', color: '#1CAAD9'}}> matthew031097 </a> on <a href="https://sketchfab.com?utm_medium=embed&utm_campaign=share-popup&utm_content=d2a31a4312c042248d6963d11617de29" target="_blank" rel="nofollow" style={{fontWeight: 'bold', color: '#1CAAD9'}}>Sketchfab</a></p></div>
  1. After I put the embedded code into my file. The display is shown good:

image7

  1. The final result is looking like this: