Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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_schmid
Member Posts: 36 EDU
in General
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
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:
0
Answers
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
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.
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.
https://ooktech.com/jed/ExampleWikis/ThreeJS/
and
http://rboue.tiddlyspot.com/#Three.js/introduction