Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Is it possible to show a part studio in an iframe of a simple html website?

timo_schmidtimo_schmid Member Posts: 36 EDU
I'd like to show (and potentially manipulate) a part studio from a custom created simple html website, using the onshape API? 
Is this possible? (and if yes,which API calls could be used?) Or has it even been done before, and there is a template of sorts available?
Any help is appreciated, 
Timo
Tagged:

Best Answer

Answers

  • harmanpaharmanpa Member, User Group Leader Posts: 11 PRO
    There is a forthcoming app for the App Store that solves this exact problem in an easy-to-use way, if you are interested we can add you as a beta tester.

    If you're interested in developing a custom solution there are some examples on the Onshape Public Github such as this:
    https://github.com/onshape-public/configurator-example
    which an example of is running here:
    https://configurator.cae.tech

    thanks

    Pete

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited July 2020
    I'm using gcp (google servers) at work, run my email blaster through aws (amazon servers) and my website servers are at digital ocean.

    As far as ease of use, my opinion: digital ocean, amazon and then gcp.

    Basic steps for viewing 3D content on your website:
    -you need a server, virtual server or shared server with admin rights. I'm using nginx & nodejs.
    -you need something on your server to create get & post requests, and talk to clients. I'm running sockets & express.
    -you need to request gltf info from Onshape with get & post requests.
    -you need to load sites with a gltf viewer and also add spinning & zooming controls. I'm using sockets for this.

    I'm digging into Pete's code which is a cadillac solution and picking out the bits that fit my setup.

    If you're running wordpress, I think you'll have to wait for them to add support for this with some type of add-in or module extension. I'd hate to write this and extend wordpress. Leave it to those who know wordpress and bug them to write it.
     

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited August 2020
    There is another way to show your OS parts on your web site using an iframe.

    Bill Schnoebelen, San Francisco users group lead, shared one of his documents with me. This gives me access to his document and in turn I create a cloud presence for his document. He could, in an iframe on his website, reference this part & config table hosted from my site. I would need to give him a url to include in his iframe that doesn't have all my web stuff included.

    This is Bill's part on my website with the configuration table exposed:


    My website is controlled by Bill's shared part:


    Bill still has control of the document and what shows up on his website. The nice thing is that I don't have to be involved with his updates.

    I don't have a webgl viewer hooked into my site yet, so you can't spin his part. This is something I'm planning on doing. You'll need to send low resolution graphics 1st followed by higher resolution graphics to enhance user experience. I want to substitute material shaders for material call outs and make the parts look real. You can make it look like OS, but why not render it? You can cache the geometry in your customer's browser so on the next visit the graphics are there and shows up instantly. You can then check for updates and gently update the website.

    If you're thinking of building this, don't use a shared server, you'll kill it. You need a dedicated server with some decent bandwidth. You're just sending the gltf data which could be taxing for a shared server. 

    There will be services that'll provide this service in the near future. Probably won't be free because it's a lot of work to create and then you'll need to maintain it. Onshape will probably charge developers more for the high bandwidth implementations. It could easily be setup in the app store.


  • Ste_WilsonSte_Wilson Member Posts: 198 EDU
    edited August 2020
    I have been using the tiddlywiki platform (tiddlywiki.com) for some time (here's mine bit.ly/Steacher) and remembered that someone had created a three.js plugin for it after exploring the embedding threads on here. It's a bit old now and I wouldn't know where to start updating it but would it be an avenue of exploration? It would possibly allow simply dropping and exported STL file into the wiki to have it display. 

    https://ooktech.com/jed/ExampleWikis/ThreeJS/
    and
    http://rboue.tiddlyspot.com/#Three.js/introduction
Sign In or Register to comment.