Add working STEP cadmodel docs example with bundled SOIC-8 asset and live preview#529
Add working STEP cadmodel docs example with bundled SOIC-8 asset and live preview#529Abse2001 merged 2 commits intotscircuit:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
docs/elements/cadmodel.mdx
Outdated
| footprint="soic8" | ||
| cadModel={ | ||
| <cadmodel | ||
| modelUrl="https://modelcdn.tscircuit.com/jscad_models/soic8.step" |
There was a problem hiding this comment.
I think you can add modelUrl={soic8StepUrl}, that will be confusing to add a modelcdn url there
There was a problem hiding this comment.
Yep @AnasSarkiz mustafa is right, this is confusing, why are you providing two urls
|
@AnasSarkiz we meant to say remove the modelUrl which uses modelcdn url, local step file was the main motive of this example ig |
|
@MustafaMulla29 we checked props and found that we don't have a stepFIleUrl that is why, did the docs meant stepUrl? |
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 |
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This PR replaces the STEP
cadmodelplaceholder in the docs with a complete, runnable example.It adds a live
CircuitPreviewthat demonstrates loading a STEP model into<cadmodel />using both:modelUrlfor the hosted 3D modelstepFileUrlfor the local STEP asset used during STEP exportThe change also includes the new
soic8.stepasset so the example is fully backed by a real file instead of placeholder text.