Skip to content

Add working STEP cadmodel docs example with bundled SOIC-8 asset and live preview#529

Merged
Abse2001 merged 2 commits intotscircuit:mainfrom
AnasSarkiz:main
Apr 10, 2026
Merged

Add working STEP cadmodel docs example with bundled SOIC-8 asset and live preview#529
Abse2001 merged 2 commits intotscircuit:mainfrom
AnasSarkiz:main

Conversation

@AnasSarkiz
Copy link
Copy Markdown
Member

@AnasSarkiz AnasSarkiz commented Apr 9, 2026

This PR replaces the STEP cadmodel placeholder in the docs with a complete, runnable example.

It adds a live CircuitPreview that demonstrates loading a STEP model into <cadmodel /> using both:

  • modelUrl for the hosted 3D model
  • stepFileUrl for the local STEP asset used during STEP export

The change also includes the new soic8.step asset so the example is fully backed by a real file instead of placeholder text.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 10, 2026 1:41pm

Request Review

footprint="soic8"
cadModel={
<cadmodel
modelUrl="https://modelcdn.tscircuit.com/jscad_models/soic8.step"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can add modelUrl={soic8StepUrl}, that will be confusing to add a modelcdn url there

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep @AnasSarkiz mustafa is right, this is confusing, why are you providing two urls

@Abse2001 Abse2001 merged commit 043dd2e into tscircuit:main Apr 10, 2026
4 checks passed
@MustafaMulla29
Copy link
Copy Markdown
Contributor

@AnasSarkiz we meant to say remove the modelUrl which uses modelcdn url, local step file was the main motive of this example ig

@Abse2001
Copy link
Copy Markdown
Contributor

@MustafaMulla29 we checked props and found that we don't have a stepFIleUrl that is why, did the docs meant stepUrl?
if so @AnasSarkiz has tried to use local model with stepUrl that didn't work for both stepUrl and modelUrl, he will start debuggin this issue

@MustafaMulla29
Copy link
Copy Markdown
Contributor

MustafaMulla29 commented Apr 10, 2026

@MustafaMulla29 we checked props and found that we don't have a stepFIleUrl that is why, did the docs meant stepUrl? if so @AnasSarkiz has tried to use local model with stepUrl that didn't work for both stepUrl and modelUrl, he will start debuggin this issue

Yes it is stepUrl, I think we have to use both modelUrl=(stepPath} and stepUrl={stepPath} on a cadmodel for it to work. Works in runframe though with just modelUrl as well. Might not be working in svg.tscircuit.com

@tscircuitbot
Copy link
Copy Markdown


Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants