Note
Project Freewheel is the Autodesk Labs version of the Freewheel service.
It is experimental in nature.
It should not be used for production purposes.
Autodesk Freewheel, the production version of the Freewheel service, is available at http://freewheel.autodesk.com.
Embedding Autodesk Labs Project Freewheel web-based viewer in your own HTML page:
To allow people to view your design file inside your own web page, you first need to make
your design file available publicly on the internet (it must have a public URL so that
the Autodesk server can retrieve the design file and render it). Then all you need to do
is add the following to your HTML source code in the appropriate location (depending
upon where in your web page you want the viewing service to appear):
You can edit the red underlined items to specify your desired viewer window size and design URL respectively. The width and height must be specified using an even number of pixels. For example, odd values such as height="799" do not work.
Details for Web Developers
|
<iframe scrolling="no" width="800" height="600" src="http://madhatter.fw.labs.autodesk.com/dwf.aspx?path=http://madhatter.fw.labs.autodesk.com/sample/Hotel5.dwf"> </iframe> |
You can edit the red underlined items to specify your desired viewer window size and design URL respectively. The width and height must be specified using an even number of pixels. For example, odd values such as height="799" do not work.
There are three main services provided by the Project Freewheel server:
- Interactive Software Free Viewer (http://madhatter.fw.labs.autodesk.com/dwf.aspx)
This is an interactive viewer including a GUI. You can place hyperlinks on objects on your own HTML page and jump to this full-screen viewer from them. Alternatively you can embed this viewer service directly in your own HTML pages using an <IFRAME> or <FRAME> tag (as shown above). This page takes the following parameters:
- &path=<string> An URL path to a design to be viewed.
- &sec=<integer> An integer from 1 to "N" for the section number to view. Default: 1
Example, the following URL would start the interactive viewer with the minimal amout of parameters:
http://madhatter.fw.labs.autodesk.com/dwf.aspx?dwf=http://madhatter.fw.labs.autodesk.com/sample/Hotel5.dwf&sec=1
When viewing 2D sections, the following additional parameters are available:
- &cx=<float> A number from 0.0 to 1.0 for the view's Center in X. Default: 0.5
- &cy=<float> A number from 0.0 to 1.0 for the view's Center in Y. Default: 0.5
- &scale=<float> A number in the range 1.0 to 16384.0 for the view's Scale. Default: 1.0
Example, the following URL would start the interactive viewer looking at the 8th page of the design file "Hotel5.dwf". The scale of 2.0 means that the design will be zoomed in 2x. The cx and cy define the center point for the zoom.
http://madhatter.fw.labs.autodesk.com/dwf.aspx?cx=0.47&cy=0.3&scale=2.0&PAGE=8&dwf=http://madhatter.fw.labs.autodesk.com/sample/Hotel5.dwf
When viewing 3D sections, the following additional parameters are available:
- &px=<float> A number setting the camera positions X value.
- &py=<float> A number setting the camera positions Y value.
- &pz=<float> A number setting the camera positions Z value.
- &tx=<float> A number setting the camera target positions X value.
- &ty=<float> A number setting the camera target positions Y value.
- &tz=<float> A number setting the camera target positions Z value.
- &ux=<float> A number setting the camera up positions X value.
- &uy=<float> A number setting the camera up positions Y value.
- &uz=<float> A number setting the camera up positions Z value.
- &fy=<float> A number setting the camera field of view X value.
- &fz=<float> A number setting the camera field of view Y value.
- &proj=<string> A string setting the camera's projection value. Valid paremeters are "pers" or "orth".
- &q=<string> A string setting the image quality. Valid parameters are "low" or "high".
&px=XX&py=YY&pz=ZZ&tx=XX&ty=YY&tz=ZZ&ux=XX&uy=YY&uz=ZZ&fy=YY&fz=ZZ&proj=pers&q=high
as the parameter string at the end of your Project Freewheel URL.
Example, the following URL would start the interactive viewer with a close up view of the front of the model "hitmiss3d.dwf". http://madhatter.fw.labs.autodesk.com/dwf.aspx?path=http://madhatter.fw.labs.autodesk.com/sample/hitmiss3d.dwf&sec=1&px=99.511&py=-3.118
&pz=-73.963&tx=34.026&ty=0.095&tz=-13.814&ux=0.504&uy=0.998&uz=-0.48&fx=32.518&fy=1.344&proj=orth&q=high
If you wish to customize the controls of Project Freewheel as part of embedding:- &mode=ViewOnly Including this parameter removes the File and Share menu items.
- &CSS=<string> An URL to your own cascading style sheet.See the customization help page
- &UI=<string> A list of UI commands to enable. See the customization help page
- &TOOL=<string> Specify the default UI command. See the customization help page
Example, the following URL would start the interactive viewer without the File and Share menu items for "hitmiss3d.dwf". http://madhatter.fw.labs.autodesk.com/dwf.aspx?path=http://madhatter.fw.labs.autodesk.com/sample/hitmiss3d.dwf&mode=ViewOnly
- Rendering Service (http://madhatter.fw.labs.autodesk.com/DWFImage.aspx)
This is a raw rendering service that provides no GUI. The service accepts an URL to a design, view parameters, and returns a rendered image file. You can build your own interactive or multi-platform viewer from this service. The "dwf.aspx" service above uses this service internally to produce the various views.
The design-to-image rendering service takes the same parameters as the interactive serivce, along with the following additions:- &width=<integer> The width of the image to produce (in pixels).
- &height=<integer> The height the image to produce (in pixels).
- &bg=<integer>|'t' Color of background in hexadecimal (bg=ff0000 for red or bg=80808080 for semi-transparent gray) or t (bg=t) for the original color in transparent.
For example, the following URL will render an image small enough to fit on most cell phone screens. It will view the center of page 3 of the Hotel5 zoomed in to a factor of 4 and generate a image that is 200x200 pixels:
http://madhatter.fw.labs.autodesk.com/dwfImage.aspx?cx=0.5&cy=0.5&scale=4&sec=3&width=200&height=200
&path=http://madhatter.fw.labs.autodesk.com/sample/Hotel5.dwf
- Web Service (http://madhatter.fw.labs.autodesk.com/DWFRender.asmx)
This is a Web Service (via SOAP protocol) that returns information about a specified design. You can use methods on the service to determine the number of pages in a design file, the page names, and other information. The following URL provides additional SOAP interface and WSDL documentation: http://madhatter.fw.labs.autodesk.com/dwfRender.asmx
There you will find the following SOAP methods:- load Accepts an URL to a design and returns the section names and section types.
- pageCount Accepts an URL to a design and returns the number of pages.
- renderVersion Returns the version of the design rendering engine on the server.
- defaultCamera Accepts an URL to a design and returns the default camera position.
Examples are provided as part of the documentation: http://madhatter.fw.labs.autodesk.com/dwfRender.asmx
