# \#code

**URL:** https://forum.techsoft3d.com/tag/code/2.md

[Latest](https://forum.techsoft3d.com/latest.md) · [Categories](https://forum.techsoft3d.com/categories.md) · [Tags](https://forum.techsoft3d.com/tags.md)

---

## [Clustering 8,000 CAD parts with k-means and Ward ― Making sense of a HOOPS AI Embeddings similarity-search index](https://forum.techsoft3d.com/t/clustering-8-000-cad-parts-with-k-means-and-ward-making-sense-of-a-hoops-ai-embeddings-similarity-search-index/5244)

<div class="topic-metadata">

**Author:** [@Toshi-TS3D](https://forum.techsoft3d.com/u/Toshi-TS3D)\
**Replies:** 0\
**Last updated:** [October 28, 2026, 3:29am UTC](https://forum.techsoft3d.com/t/clustering-8-000-cad-parts-with-k-means-and-ward-making-sense-of-a-hoops-ai-embeddings-similarity-search-index/5244 "2026-10-28T03:29:04Z")

</div>

In a recent webinar I ran through this scenario: open one bearing housing, run a HOOPS AI similar part search, and push the similarity slider up. Stop at 18 parts — the housings without a grease nipple — and tag them. Th…

---

## [XRay / DoNotXRay — isolated nodes look faded / washed out (especially after camera zoom)](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 7\
**Last updated:** [September 25, 2026, 12:46pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210 "2026-09-25T12:46:44Z")

</div>

Question We’re using DrawMode.XRay as a “glass” isolation mode. Background geometry should be very transparent; isolated nodes should stay fully solid via InstanceModifier.DoNotXRay. After applying the sequence below, …

---

## [HOOPS AI Inside a HOOPS Visualize Desktop + Exchange Application: Similar-Part Search Across 10,000 CAD Files](https://forum.techsoft3d.com/t/hoops-ai-inside-a-hoops-visualize-desktop-exchange-application-similar-part-search-across-10-000-cad-files/5203)

<div class="topic-metadata">

**Author:** [@Toshi-TS3D](https://forum.techsoft3d.com/u/Toshi-TS3D)\
**Replies:** 0\
**Last updated:** [August 17, 2026, 4:01am UTC](https://forum.techsoft3d.com/t/hoops-ai-inside-a-hoops-visualize-desktop-exchange-application-similar-part-search-across-10-000-cad-files/5203 "2026-08-17T04:01:47Z")

</div>

HOOPS AI Inside a HOOPS Visualize Desktop + Exchange Application: Similar-Part Search Across 10,000 CAD Files Last time I confirmed that a native application can call HOOPS AI directly through a C ABI bridge with CPython…

---

## [2D text (angled) with background](https://forum.techsoft3d.com/t/2d-text-angled-with-background/5202)

<div class="topic-metadata">

**Author:** [@simon](https://forum.techsoft3d.com/u/simon)\
**Replies:** 0\
**Last updated:** [August 14, 2026, 11:03pm UTC](https://forum.techsoft3d.com/t/2d-text-angled-with-background/5202 "2026-08-14T23:03:59Z")

</div>

For 2D texts, by default, backgrounds will be screen aligned. If you call HC\_Set\_Text\_Path() to angle you texts, text’s background will look like the screenshot below. If you want to maintain background size, you s…

---

## [Using HOOPS AI from a Fully Local Desktop Application](https://forum.techsoft3d.com/t/using-hoops-ai-from-a-fully-local-desktop-application/5200)

<div class="topic-metadata">

**Author:** [@Toshi-TS3D](https://forum.techsoft3d.com/u/Toshi-TS3D)\
**Replies:** 0\
**Last updated:** [August 7, 2026, 1:50am UTC](https://forum.techsoft3d.com/t/using-hoops-ai-from-a-fully-local-desktop-application/5200 "2026-08-07T01:50:30Z")

</div>

Using HOOPS AI from a Fully Local Desktop Application I installed HOOPS AI, worked through the Jupyter notebook tutorials, then wrapped it as a REST API with FastAPI, and after that put an MCP server in front of it so an…

---

## [DWG and Revit support Linux arm64](https://forum.techsoft3d.com/t/dwg-and-revit-support-linux-arm64/5192)

<div class="topic-metadata">

**Author:** [@mop1egn0bz2z](https://forum.techsoft3d.com/u/mop1egn0bz2z)\
**Replies:** 2\
**Last updated:** [July 31, 2026, 12:14am UTC](https://forum.techsoft3d.com/t/dwg-and-revit-support-linux-arm64/5192 "2026-07-31T00:14:35Z")

</div>

I looked at your documentation, and DWG and Revit don’t support Linux arm64. I compared it with ODA’s info, and their products do support Linux arm64. I wanted to ask, will your products support Linux arm64 in the future…

---

## [How to use Convert to convert rvt files into SC files, and the sphere-like part of the model appears smooth](https://forum.techsoft3d.com/t/how-to-use-convert-to-convert-rvt-files-into-sc-files-and-the-sphere-like-part-of-the-model-appears-smooth/2599)

<div class="topic-metadata">

**Author:** [@rohagax695](https://forum.techsoft3d.com/u/rohagax695)\
**Replies:** 8\
**Last updated:** [July 29, 2026, 10:51pm UTC](https://forum.techsoft3d.com/t/how-to-use-convert-to-convert-rvt-files-into-sc-files-and-the-sphere-like-part-of-the-model-appears-smooth/2599 "2026-07-29T22:51:39Z")

</div>

The similar spherical body in the rvt model of REVIT design software is converted to an SC file, and the surface shows concave-convex deformation and is not smooth. How to use Convert to convert rvt files into SC files, …

---

## [How to: Apply texture to each face of a shell (HPS)](https://forum.techsoft3d.com/t/how-to-apply-texture-to-each-face-of-a-shell-hps/5187)

<div class="topic-metadata">

**Author:** [@simon](https://forum.techsoft3d.com/u/simon)\
**Replies:** 0\
**Last updated:** [July 17, 2026, 11:35pm UTC](https://forum.techsoft3d.com/t/how-to-apply-texture-to-each-face-of-a-shell-hps/5187 "2026-07-17T23:35:31Z")

</div>

Following sample code apply texture to separate faces of a shell. You can copy/paste sample to hps\_mfc\_sandbox. Screenshot: Sample Code: SegmentKey modelKey = GetCanvas().GetFrontView().GetAttachedModel().GetS…

---

## [Version Compatibility Issue: HC 2025.6.1 Models Not Supported in HC 2025.6.0](https://forum.techsoft3d.com/t/version-compatibility-issue-hc-2025-6-1-models-not-supported-in-hc-2025-6-0/5182)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 1\
**Last updated:** [July 16, 2026, 10:15pm UTC](https://forum.techsoft3d.com/t/version-compatibility-issue-hc-2025-6-1-models-not-supported-in-hc-2025-6-0/5182 "2026-07-16T22:15:14Z")

</div>

We understand that HOOPS Communicator 2025.6.1 is a Windows-only patch and that other platforms should continue using 2025.6.0. However, 2025.6.0 is no longer available for download on Windows, so Windows users are forc…

---

## [Putting an AI Agent in Front of HOOPS AI via MCP](https://forum.techsoft3d.com/t/putting-an-ai-agent-in-front-of-hoops-ai-via-mcp/5179)

<div class="topic-metadata">

**Author:** [@Toshi-TS3D](https://forum.techsoft3d.com/u/Toshi-TS3D)\
**Replies:** 0\
**Last updated:** [July 13, 2026, 5:00am UTC](https://forum.techsoft3d.com/t/putting-an-ai-agent-in-front-of-hoops-ai-via-mcp/5179 "2026-07-13T05:00:12Z")

</div>

Putting an AI Agent in Front of HOOPS AI via MCP I put an MCP layer in front of a small FastAPI service wrapping HOOPS AI, so an AI agent (Claude Desktop) can drive HOOPS AI tutorial workflows through the same API a conv…

---

## [Errors After model.clear() and loadSubtreeFromModel()](https://forum.techsoft3d.com/t/errors-after-model-clear-and-loadsubtreefrommodel/5171)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 3\
**Last updated:** [June 30, 2026, 11:40am UTC](https://forum.techsoft3d.com/t/errors-after-model-clear-and-loadsubtreefrommodel/5171 "2026-06-30T11:40:31Z")

</div>

Hi, I’m seeing a couple of rejected promise errors when switching between 2D sheets in HOOPS Visualize Web 2025.6. Code await viewer2d.model.clear(); await iafViewer.\_viewer2d.model.loadSubtreeFromModel( iafView…

---

## [Wrapping HOOPS AI as a REST API with FastAPI](https://forum.techsoft3d.com/t/wrapping-hoops-ai-as-a-rest-api-with-fastapi/5168)

<div class="topic-metadata">

**Author:** [@Toshi-TS3D](https://forum.techsoft3d.com/u/Toshi-TS3D)\
**Replies:** 0\
**Last updated:** [June 29, 2026, 12:51am UTC](https://forum.techsoft3d.com/t/wrapping-hoops-ai-as-a-rest-api-with-fastapi/5168 "2026-06-29T00:51:34Z")

</div>

Wrapping HOOPS AI as a REST API with FastAPI Most manufacturing software I’ve worked on — apps, services, plugins — was C/C++, C#, or JavaScript/TypeScript, with npm handling dependencies, built in Visual Studio or VS Co…

---

## [Memory usage doubles when calling loadSubtreeFromModel() in HOOPS Communicator 2026.4 (not seen in 2023 SP1)](https://forum.techsoft3d.com/t/memory-usage-doubles-when-calling-loadsubtreefrommodel-in-hoops-communicator-2026-4-not-seen-in-2023-sp1/5163)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 8\
**Last updated:** [June 17, 2026, 4:05pm UTC](https://forum.techsoft3d.com/t/memory-usage-doubles-when-calling-loadsubtreefrommodel-in-hoops-communicator-2026-4-not-seen-in-2023-sp1/5163 "2026-06-17T16:05:47Z")

</div>

Hi Team, We are currently upgrading our application from HOOPS Communicator 2023 SP1 to 2026.4 and have encountered a memory-related issue. Scenario We load linked models using: subRootNodeId = gfxResObject.inde…

---

## [How-to: Use Physically Based Rendering](https://forum.techsoft3d.com/t/how-to-use-physically-based-rendering/1356)

<div class="topic-metadata">

**Author:** [@gabriel.peragine](https://forum.techsoft3d.com/u/gabriel.peragine)\
**Replies:** 5\
**Last updated:** [June 5, 2026, 8:59pm UTC](https://forum.techsoft3d.com/t/how-to-use-physically-based-rendering/1356 "2026-06-05T20:59:15Z")

</div>

Physically Based Rendering is a set of rendering techniques which simulate how light and surface materials interact in the natural world. The goal is to create images which are more realistic than traditional shading app…

---

## [Clash Detection Library for HOOPS Communicator released](https://forum.techsoft3d.com/t/clash-detection-library-for-hoops-communicator-released/2149)

<div class="topic-metadata">

**Author:** [@guido](https://forum.techsoft3d.com/u/guido)\
**Replies:** 11\
**Last updated:** [May 28, 2026, 4:32am UTC](https://forum.techsoft3d.com/t/clash-detection-library-for-hoops-communicator-released/2149 "2026-05-28T04:32:14Z")

</div>

Clash Detection Library for HOOPS Communicator The new Clash Manager library adds robust client and server-side clash detection capabilities to HOOPS Communicator, including support for both hard and soft (clearance…

---

## [WebAssembly Memory Limit Error: "Cannot enlarge memory arrays" in engine-wasm.js](https://forum.techsoft3d.com/t/webassembly-memory-limit-error-cannot-enlarge-memory-arrays-in-engine-wasm-js/5137)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 1\
**Last updated:** [April 19, 2026, 12:26pm UTC](https://forum.techsoft3d.com/t/webassembly-memory-limit-error-cannot-enlarge-memory-arrays-in-engine-wasm-js/5137 "2026-04-19T12:26:52Z")

</div>

Note:- Version of WebViewer 2023 SP1 Hi team, I’m encountering a WebAssembly memory issue while working with HOOPS Communicator. The application crashes with the following error: engine-wasm.js:846 Cannot enlarge mem…

---

## [How to highlight object by point using custom operator (HPS::PanOrbitZoomOperator)](https://forum.techsoft3d.com/t/how-to-highlight-object-by-point-using-custom-operator-hps-panorbitzoomoperator/5074)

<div class="topic-metadata">

**Author:** [@phu\_bn](https://forum.techsoft3d.com/u/phu_bn)\
**Replies:** 5\
**Last updated:** [April 16, 2026, 6:56am UTC](https://forum.techsoft3d.com/t/how-to-highlight-object-by-point-using-custom-operator-hps-panorbitzoomoperator/5074 "2026-04-16T06:56:15Z")

</div>

I want that when I click on a point on the screen, the item containing that point will be highlighted. Then, I would like to maintain the highlight state while still being able to perform panOrbit actions. My idea is to…

---

## [Lower 3D geometry quality in E2E (Playwright) vs normal browser](https://forum.techsoft3d.com/t/lower-3d-geometry-quality-in-e2e-playwright-vs-normal-browser/5123)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 3\
**Last updated:** [April 10, 2026, 11:44am UTC](https://forum.techsoft3d.com/t/lower-3d-geometry-quality-in-e2e-playwright-vs-normal-browser/5123 "2026-04-10T11:44:42Z")

</div>

Hi team, We are observing reduced 3D geometry quality when loading the same model using E2E testing tools (Playwright - Chromium) compared to a normal browser. Expected (Normal Browser) Full geometry detail Clean,…

---

## [Using the "HOOPS\_Exchange\_Publish Viewer" project to test "\_Aquo Bottle.CATProduct", there are issues with the position and rotation of "PMI"](https://forum.techsoft3d.com/t/using-the-hoops-exchange-publish-viewer-project-to-test-aquo-bottle-catproduct-there-are-issues-with-the-position-and-rotation-of-pmi/3844)

<div class="topic-metadata">

**Author:** [@1140643368](https://forum.techsoft3d.com/u/1140643368)\
**Replies:** 2\
**Last updated:** [April 3, 2026, 8:52pm UTC](https://forum.techsoft3d.com/t/using-the-hoops-exchange-publish-viewer-project-to-test-aquo-bottle-catproduct-there-are-issues-with-the-position-and-rotation-of-pmi/3844 "2026-04-03T20:52:58Z")

</div>

Using the “HOOPS\_Exchange\_Publish Viewer” project to test “\_Aquo Bottle.CATProduct”, there are issues with the position and rotation of “PMI”.

---

## [Reset node color applied with setNodesColors back to original material](https://forum.techsoft3d.com/t/reset-node-color-applied-with-setnodescolors-back-to-original-material/5108)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 1\
**Last updated:** [March 17, 2026, 12:51pm UTC](https://forum.techsoft3d.com/t/reset-node-color-applied-with-setnodescolors-back-to-original-material/5108 "2026-03-17T12:51:25Z")

</div>

Post: Hi Team, I am applying colors to nodes using viewer.model.setNodesColors() like this: const colorMap = new Map(); for (const nodeId of nodeIds) { colorMap.set(nodeId, new Communicator.Color(255, 0, 0)); } aw…

---

## [How to: Detect multi-touch events using a custom operator (HPS)](https://forum.techsoft3d.com/t/how-to-detect-multi-touch-events-using-a-custom-operator-hps/5076)

<div class="topic-metadata">

**Author:** [@simon](https://forum.techsoft3d.com/u/simon)\
**Replies:** 0\
**Last updated:** [February 3, 2026, 11:31pm UTC](https://forum.techsoft3d.com/t/how-to-detect-multi-touch-events-using-a-custom-operator-hps/5076 "2026-02-03T23:31:50Z")

</div>

Below is sample code that detect multi-touch events using a custom operator. class MyCustomTapOperator : public HPS::Operator { public: MyCustomTapOperator(HPS::Canvas c) : canvas(c) { tapCount=0; …

---

## [How to: test for double click on custom operator](https://forum.techsoft3d.com/t/how-to-test-for-double-click-on-custom-operator/5068)

<div class="topic-metadata">

**Author:** [@simon](https://forum.techsoft3d.com/u/simon)\
**Replies:** 0\
**Last updated:** [January 31, 2026, 12:08am UTC](https://forum.techsoft3d.com/t/how-to-test-for-double-click-on-custom-operator/5068 "2026-01-31T00:08:53Z")

</div>

Below is sample code on how you check for double click mouse event. class MyCustomOperator\_s1 : public HPS::HandlesOperator{public:MyCustomOperator\_s1(HPS::Canvas c) : canvas(c) {}bool OnMouseDown(HPS::MouseState const& …

---

## [Convert catia file error](https://forum.techsoft3d.com/t/convert-catia-file-error/5054)

<div class="topic-metadata">

**Author:** [@1224153851](https://forum.techsoft3d.com/u/1224153851)\
**Replies:** 1\
**Last updated:** [January 21, 2026, 1:59pm UTC](https://forum.techsoft3d.com/t/convert-catia-file-error/5054 "2026-01-21T13:59:11Z")

</div>

I am using the Hoops Exchanger demo and hope to convert a CATIA file to a GLB file. However, the result is: sHoopsExchangeLoader.Convert(sImport, sExport) returned error -10007 = A3D\_LOAD\_CANNOT\_LOAD\_MODEL

---

## [WebGL context lost after multiple model switches, followed by slow WebSocket binary streaming](https://forum.techsoft3d.com/t/webgl-context-lost-after-multiple-model-switches-followed-by-slow-websocket-binary-streaming/5050)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 1\
**Last updated:** [January 18, 2026, 11:01pm UTC](https://forum.techsoft3d.com/t/webgl-context-lost-after-multiple-model-switches-followed-by-slow-websocket-binary-streaming/5050 "2026-01-18T23:01:56Z")

</div>

We are facing an issue with HOOPS Communicator (WebGL) where the WebGL context is lost automatically after multiple model switches (no explicit WEBGL\_lose\_context call from our side). After the context loss: On page …

---

## [Model flickers when calling setNodesVisibility repeatedly](https://forum.techsoft3d.com/t/model-flickers-when-calling-setnodesvisibility-repeatedly/5040)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 3\
**Last updated:** [January 4, 2026, 2:05pm UTC](https://forum.techsoft3d.com/t/model-flickers-when-calling-setnodesvisibility-repeatedly/5040 "2026-01-04T14:05:35Z")

</div>

I’m facing a flickering issue in HOOPS Communicator whenever I update node visibility. Each time I call the following API, the entire 3D model visibly flickers (looks like a repaint or full re-render): viewer.model.set…

---

## [How to: Set mipmap texture options using shaders (HPS)](https://forum.techsoft3d.com/t/how-to-set-mipmap-texture-options-using-shaders-hps/5036)

<div class="topic-metadata">

**Author:** [@simon](https://forum.techsoft3d.com/u/simon)\
**Replies:** 0\
**Last updated:** [December 29, 2025, 10:00pm UTC](https://forum.techsoft3d.com/t/how-to-set-mipmap-texture-options-using-shaders-hps/5036 "2025-12-29T22:00:20Z")

</div>

Below is sample code on how to set mipmap on textures using Custom Shadders. Sample code been tested in HPS 2025.7.0 using hps\_mfc\_sandbox Screenshot: HSF file: grid.zip (17.8 KB) Sample Code: #define DTR(x) (st…

---

## [Weird result from getBranchVisibility](https://forum.techsoft3d.com/t/weird-result-from-getbranchvisibility/5032)

<div class="topic-metadata">

**Author:** [@nick.wong](https://forum.techsoft3d.com/u/nick.wong)\
**Replies:** 3\
**Last updated:** [December 24, 2025, 4:07pm UTC](https://forum.techsoft3d.com/t/weird-result-from-getbranchvisibility/5032 "2025-12-24T16:07:13Z")

</div>

I am using HOOPS\_communicator\_2024.3.0. In the sample application, the result from getBranchVisibility is always Mixed. No matter I hidden the whole model by toggling the visibility icon of the root node in the model bro…

---

## [setNodesVisibility() forces visibility of nodes not originally visible in initial load](https://forum.techsoft3d.com/t/setnodesvisibility-forces-visibility-of-nodes-not-originally-visible-in-initial-load/5013)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 1\
**Last updated:** [November 21, 2025, 10:54pm UTC](https://forum.techsoft3d.com/t/setnodesvisibility-forces-visibility-of-nodes-not-originally-visible-in-initial-load/5013 "2025-11-21T22:54:43Z")

</div>

When i load 3d model on initial i can see below file no extra color (Blue). But after recursively get all node from root using getNodeChildren() and settingsetNodesVisibility() call forces them visible like below. No…

---

## [New TextBox Markup released](https://forum.techsoft3d.com/t/new-textbox-markup-released/1276)

<div class="topic-metadata">

**Author:** [@guido](https://forum.techsoft3d.com/u/guido)\
**Replies:** 22\
**Last updated:** [November 5, 2025, 12:22pm UTC](https://forum.techsoft3d.com/t/new-textbox-markup-released/1276 "2025-11-05T12:22:53Z")

</div>

This set of classes implement an easy to use and customizable markup type for adding text notes with a leader line to a model in HOOPS Communicator. Complete source code, demos and documentation is available on GitHub: …

---

## [How to reconnect WebSocket automatically before calling loadSubtreeFromModel](https://forum.techsoft3d.com/t/how-to-reconnect-websocket-automatically-before-calling-loadsubtreefrommodel/4992)

<div class="topic-metadata">

**Author:** [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Replies:** 5\
**Last updated:** [November 4, 2025, 7:00pm UTC](https://forum.techsoft3d.com/t/how-to-reconnect-websocket-automatically-before-calling-loadsubtreefrommodel/4992 "2025-11-04T19:00:52Z")

</div>

Hi Team, I’m handling a situation where my viewer’s websocketConnectionClosed callback gets triggered (for example, after a couple of minutes of inactivity). websocketConnectionClosed: async () =\> { console.log("call…

[Next page](https://forum.techsoft3d.com/tag/code/2.md?match_all_tags=true&page=1&tags%5B%5D=code)
