Ray Kholodovsky - silkscreenrect (and future fa...

silkscreenrect (and future fabricationrect?) vs silkscreenpath I need a way to render not-filled rectangle for my margin boxes. rect seemed like the easier syntax.
my <silkscreenrect pcbX={0} pcbY={0} width={2} height={2} /> shows as filled while the doc shows unfilled. so need unfilled, also looking to be able to define strokeWidth="0.5mm" like in the silkscreenpath docs. and ideally I can do all this as fabrication objects not silkscreen like we've discussed before.
No description
No description
36 Replies
Seve
Seve2mo ago
fabricationrect should exist! let me see
Ray Kholodovsky
Ray KholodovskyOP2mo ago
https://docs.tscircuit.com/elements/pcbnoterect ah, was looking in the wrong section of the docs
<pcbnoterect /> | tscircuit docs
Draw rectangles on your PCB to highlight areas, create visual boundaries, and organize board sections.
Seve
Seve2mo ago
yes so <fabricationnoterect /> does exist but doesn't have a doc (so no proof of working) There is an isFilled prop for all of these (at least their should be) that we should add to the docs <pcbnoterect /> is similar but won't go to the final gerbers as a layer at least not by default
Ray Kholodovsky
Ray KholodovskyOP2mo ago
I don't need it to be on gerbers, I actually just need "documentation" for users in the PCB and 3D view of tsci. so these pcbnote props are the thing?
Seve
Seve2mo ago
yep pcbnote is great for that pcbnote is basically our user layers
Seve
Seve2mo ago
also this is very beta but you might be interested in our <pcbnotedimension /> https://docs.tscircuit.com/elements/pcbnotedimension
<pcbnotedimension /> | tscircuit docs
The <pcbnotedimension /> element adds dimension annotations to PCBs showing measurements between two points.
Ray Kholodovsky
Ray KholodovskyOP2mo ago
sweet, now that I can visualize it, time to fix the margin logic
No description
Seve
Seve2mo ago
ahh yea very cool i like that yea there is so much stuff the pcb viewer needs for debugging coordinate issues, glad you have a hack 😁
Ray Kholodovsky
Ray KholodovskyOP2mo ago
on hover of any pcbnoterect I get this - symbol I don't see any sort of "name" or "text" prop in the docs, so any idea where this comes from?
Seve
Seve2mo ago
i'm not sure it's supposed to have any hover behavior i mean we could show like a name or something what do you think, is there metadata you'd want to put on that rect right now to display to people? i'm trying to determine if we disable hovering for the notes or if we display e.g. their name it seems like the best behavior would be to show text="...." if it's defined, otherwise disable
Ray Kholodovsky
Ray KholodovskyOP2mo ago
yes, on hover, I want to give it a name or text to show context to people, leftMargin rightMargin topMargin bottomMargin centerMargin are all names I have ready to feed into it (for my use case)
Seve
Seve2mo ago
gotcha ok will queue this
Ray Kholodovsky
Ray KholodovskyOP2mo ago
and I like how on hover I get the red rect showing which thing I'm hovering over and you're telling be about
No description
Ray Kholodovsky
Ray KholodovskyOP2mo ago
so plz keep that
Seve
Seve2mo ago
kk yea so 1) need to add name/text to the pcbnote* spec and 2) alter the hover text for pcb-viewer 3) make sure core is passing along props 👍
Ray Kholodovsky
Ray KholodovskyOP2mo ago
and plz 4: also display the pcbnoterect / other pcbnote stuff in the 3D viewer
Seve
Seve2mo ago
oh interesting, so you want to be able to hover over the notes in the 3d viewer we don't support hovering over footprints/notes in the 3d viewer rn but makes sense to add it
Ray Kholodovsky
Ray KholodovskyOP2mo ago
less so that, I'd settle for seeing the white rects on the 3D view, probably by option, but it's needed
No description
Ray Kholodovsky
Ray KholodovskyOP2mo ago
no objection to this later, rn req is "this is a layer in the PCB Viewer, it needs to be viewable and toggle-able in the 3D Viewer cuz kicad does that"
No description
Seve
Seve2mo ago
CC @shibo @Abse yea so the reason the notes aren't showing is because we currently don't apply a texture to the board like we do with circuit-json-to-gltf- all the 3d geometry is created. I think we should apply a texture though also CC @Mustafa7 😁 there's probably like 5 issues listed above haha
Ray Kholodovsky
Ray KholodovskyOP2mo ago
have at it folks
Abse
Abse2mo ago
I will start working on them tomorrow god willing
Ray Kholodovsky
Ray KholodovskyOP2mo ago
btw, on <pcbnoterect color="blue" docs say
Rectangle color as hex string (e.g., "#ff0000")
so I don't get a type error, the shape renders as white, but when I hover over, it changes to blue (or yellow/ whatever other color name I wrote) I'd prefer if you can write colors by name, seems like you're already halfway there 🙂
No description
No description
Ray Kholodovsky
Ray KholodovskyOP2mo ago
here is yellow behaving as above
No description
Ray Kholodovsky
Ray KholodovskyOP2mo ago
but green is "working correctly" without any hover. strange.
No description
Seve
Seve2mo ago
yea something weird is going on, but yea writing "blue" is definitely supposed to work you're like the first man on the moon here because i don't think anyone has used this in a project yet haha
Ray Kholodovsky
Ray KholodovskyOP2mo ago
Yeah I got that impression already. Write more tests 🙂 I’m an expensive QA engineer in other circumstances 🙂
Seve
Seve2mo ago
yea the pcb-viewer doesn't have automated tests
Ray Kholodovsky
Ray KholodovskyOP2mo ago
Oh
Seve
Seve2mo ago
the SVG views do, but not the pcb-viewer. It has a massive test suite, but everything has to be manually inspected in a browser browser automation often doesn't catch what's important... anyway we'll get on it
Ray Kholodovsky
Ray KholodovskyOP2mo ago
Got it
Ray Kholodovsky
Ray KholodovskyOP2mo ago
more stuff on pcbnotedimension https://docs.tscircuit.com/elements/pcbnotedimension looks like offset doesn't work when using selectors: <pcbnotedimension from="MP1" to="MP2" text="hello" fontSize={1} offset="8mm"/> why is my lowercase text showing as all caps? and what's the point of a dimension if all you can do is enter text into it manually? Isn't the whole point to be able to say "show me the distance of the from and to points I just gave you"? (ideally as variable so that it can be inserted into a larger string in the text input)
<pcbnotedimension /> | tscircuit docs
The <pcbnotedimension /> element adds dimension annotations to PCBs showing measurements between two points.
No description
Seve
Seve2mo ago
yea that is a massive oversight, text should default to the dimension 🤦‍♂️ RE: lowercase. Looking into it, we should support this
Ray Kholodovsky
Ray KholodovskyOP2mo ago
ok there is now no behaviour on hover over pcbnoterect so no more arbitrary - symbol shows up doesn't look like name/ text have been implemented yet I try to wrap a group around pcbnoterect and I don't think the group registers it. I don't get the nice red bounding rect when I hover over the pcbnoterect
<group name={margin.name}>
<pcbnoterect
pcbX={margin.pcbX}
pcbY={margin.pcbY}
width={margin.width}
height={margin.height}
strokeWidth={0.05}
color="#ffffff"

/>
</group>
<group name={margin.name}>
<pcbnoterect
pcbX={margin.pcbX}
pcbY={margin.pcbY}
width={margin.width}
height={margin.height}
strokeWidth={0.05}
color="#ffffff"

/>
</group>
maybe that's the behaviour you want, cuz a pcbnoterect isn't a component like a footprint or chip is... so I'll just wait for pcbnoterect to get its own hover over name/text field 🙂
Seve
Seve2mo ago
yes so multiple changes are rolling out, the first change makes sure that empty tooltips don't show up, the second change will add the text!!!!
Ray Kholodovsky
Ray KholodovskyOP2mo ago

Did you find this page helpful?