=== PartWork.ai 3D Viewer – CAD, STEP & STL Files ===
Contributors: partworkteam
Tags: 3d viewer, cad, stl, step file, 3d model
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let visitors open STEP, STL, IGES and other CAD files in a free 3D viewer on your site. Nothing for them to install.

== Description ==

**PartWork.ai 3D Viewer** puts an interactive 3D viewer on any page or post. Your visitors drop in a STEP, STP, STL, IGES, IGS, OBJ, DXF, BREP or GLB file and see it in 3D: rotate, zoom, switch views and go fullscreen, on desktop or phone, with nothing to install.

It's built for sites whose customers send CAD files: machine shops, 3D printing services, fabricators, makerspaces and engineering firms. A customer can check their file on your "request a quote" page before they send it, and you can ask for exactly the file you need.

The plugin adds:

* A **PartWork.ai 3D Viewer** block, with a live preview in the editor.
* A **[partwork_viewer]** shortcode for the classic editor and page builders.
* Settings for title, light or dark theme, height and colors.

= Free, with a credit link =

The viewer is free on any site. It shows a small "Powered by PartWork.ai" link inside the viewer, which must stay visible. For a viewer without it, ask about a white-label license at support@partwork.ai.

= External services =

This plugin embeds the PartWork.ai viewer, which is hosted by PartWork.ai and loads in an iframe from `cdn.partwork.ai` on pages that contain the block or shortcode. The plugin adds no script to the rest of your site.

What the viewer sends, and when:

* **Every time the viewer loads:** an anonymous usage event (which viewer surface loaded and the origin of the page it is embedded on) is sent to `api.partwork.ai`. The viewer stores a random visitor ID in its own storage on `cdn.partwork.ai` to count repeat views. No cookies are set on your site, and no name, email or account is involved.
* **When a visitor opens a STEP, STL, IGES, OBJ, DXF or BREP file:** the file is uploaded to `api.partwork.ai` to be converted for display. Before the upload, a Cloudflare Turnstile check (`challenges.cloudflare.com`) confirms the visitor is not a bot. GLB files open in the visitor's browser and are not uploaded.
* **When a visitor clicks "Modify with AI" or "Open in Studio":** a new tab opens on `studio.partwork.ai`. Nothing is sent before the click. You can hide the button in the block settings or with `ai="off"`.

Links:

* Viewer and documentation: [partwork.ai/embed](https://www.partwork.ai/embed/)
* Embed license: [partwork.ai/viewer-license](https://www.partwork.ai/viewer-license/)
* Terms of service: [partwork.ai/terms-of-service](https://www.partwork.ai/terms-of-service/)
* Privacy policy: [partwork.ai/privacy-policy](https://www.partwork.ai/privacy-policy/)
* Cloudflare Turnstile privacy: [cloudflare.com/turnstile-privacy-policy](https://www.cloudflare.com/turnstile-privacy-policy/)

== Installation ==

1. In your WordPress admin, go to **Plugins → Add New**.
2. Search for "PartWork 3D Viewer", click **Install Now**, then **Activate**.
3. Add the **PartWork.ai 3D Viewer** block to a page, or use the shortcode below.

= Shortcode =

`[partwork_viewer]`

With options:

`[partwork_viewer title="Check your part" theme="light" height="600"]`

= Shortcode attributes =

* `title` — Shown in the viewer header.
* `theme` — `dark` (default) or `light`.
* `height` — Height in pixels, 240 to 1200. Default 520.
* `ai` — `off` hides the "Modify with AI" button.
* `accent`, `model_color`, `background` — Hex colors, e.g. `#e11d48`.

== Frequently Asked Questions ==

= Which files can visitors open? =

STEP (.step, .stp), STL, IGES (.iges, .igs), OBJ, DXF, BREP and GLB. Files up to 75 MB.

= Can I show my own part on a product page? =

Not in this version. Showing a model you choose is coming in a later update.

= Is it really free? =

Yes. Viewing is free for you and your visitors, with no API key and no signup. The only condition is that the "Powered by PartWork.ai" link stays visible.

= Will it slow down my site? =

No. The viewer loads in a lazy-loaded iframe, only on pages that use the block or shortcode, and the 3D engine stays inside the iframe.

= Can I put more than one viewer on a page? =

Yes. Each block or shortcode is its own viewer.

= Where do I get help? =

Email support@partwork.ai.

== Screenshots ==

1. A visitor checking their STEP file on a machine shop's quote page.
2. The block settings: title, theme, height and colors.
3. The viewer on a phone.

== Changelog ==

= 1.0.0 =
* Initial release: block and shortcode.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
