by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 28 10:37
    renovate[bot] edited #342
  • Aug 28 09:07
    renovate[bot] edited #342
  • Aug 28 07:43
    renovate[bot] commented #342
  • Aug 28 07:43
    renovate[bot] edited #342
  • Aug 28 07:17
    renovate[bot] edited #342
  • Aug 28 05:13
    renovate[bot] edited #342
  • Aug 28 03:21
    renovate[bot] edited #342
  • Aug 28 01:42
    renovate[bot] edited #342
  • Aug 28 01:00
    renovate[bot] edited #342
  • Aug 27 21:29
    renovate[bot] edited #333
  • Aug 27 20:20
    renovate[bot] edited #342
  • Aug 27 20:20
    renovate[bot] synchronize #333
  • Aug 27 19:33
    renovate[bot] edited #342
  • Aug 27 06:11
    renovate[bot] edited #342
  • Aug 27 05:52
    renovate[bot] edited #342
  • Aug 26 20:43
    renovate[bot] edited #342
  • Aug 26 19:41
    renovate[bot] edited #342
  • Aug 26 18:50
    renovate[bot] edited #342
  • Aug 26 18:27
    renovate[bot] edited #342
  • Aug 26 10:56
    renovate[bot] synchronize #337
Mike Cousins
@mcous
This is a very basic server-side Node script using pcb-stackup: https://github.com/tracespace/tracespace/blob/master/packages/pcb-stackup/example/index.js
In real life, I think a AWS Lambda job (or whatever FaaS platform you prefer) might be the easiest thing to get up and running
Dominik Ottenbreit
@dottenbr
I like the clean code structure of your project, I took your commit messages (commitizen) as inspiration for our own projects among some other things.
I am trying to take tracespace/view to build upon it, so I am currently looking into how I best serve a slightly tweaked version to our employees at the company
Mike Cousins
@mcous
I see! I've been turning over the idea of an embedded viewer as a service (like an iframe or something), so I'd be really curious to hear about what sorts of customizations you're looking to do
Dominik Ottenbreit
@dottenbr
The thing is our colleagues have been using tracespace for some time, but privacy concerns of some of our customers prevented us from continuing to use the web service. So I need to run it on our own infrastructure.
Mike Cousins
@mcous
A few SZ PCB shops do a similar thing (https://www.pcbway.com/project/OnlineGerberViewer.html) though I'm not sure how they accomplish it
Dominik Ottenbreit
@dottenbr
yeah, I saw that before :-)
Mike Cousins
@mcous
I understand! I will say that I personally take privacy really seriously; there's a reason the web-viewer is built to do absolutely everything in the browser rather than with an API
Dominik Ottenbreit
@dottenbr
so npm run build bundles everything into view/dist
Mike Cousins
@mcous
Yup! It bundles the @tracespace/view production files, as well as the various library bundles for unpkg in packages
Dominik Ottenbreit
@dottenbr
So I guess here is the disconnect for me, the thing I don't understand yet: is all of tracespace/viewer and the packages you use (e.g. gerber-to-svg) 100% client side?
Mike Cousins
@mcous
Yup, that's exactly right. The libraries (all the projects in packages) are built so that they can be deployed to either the browser or the server, but the only application we deploy (apps/view) is 100% client-side
In the future I'd like to also offer a tracespace API, but the viewer is always going to remain client-side
Dominik Ottenbreit
@dottenbr
I understand, your packages are designed in such a way that they can be ran on node for some backend use but also to be bundled for your frontend. So the way to think about everything except view is dual-purpose.
This also means, that the contents of view/dist if copied to a webserver should work right away
Mike Cousins
@mcous
I'm pretty sure the domain name isn't hardcorded in there, so yes it should just work

dual-purpose

You'll also see the phrase "isomorphic" thrown around by JS people who like to sound fancy (myself very much included)

Dominik Ottenbreit
@dottenbr
What you have built is getting cooler the more I understand about it :-)
Mike Cousins
@mcous
That means a lot to me, thank you
Kaspar Emanuel
@kasbah
oh wow, hadn't seen that pcbway one :laughing:
Kaspar Emanuel
@kasbah
enabled CORS on kitspace.org zips so they can be used in the viewer directly
@mcous maybe we could add a "inspect gerbers" link that goes to tracespace and imports the files?
Kaspar Emanuel
@kasbah
would require some url params parsing in the viewer
(semi-secret sneaky feature)
Kaspar Emanuel
@kasbah
AHA!
very nice
Mike Cousins
@mcous
Also good stuff on the CORS
Kaspar Emanuel
@kasbah
was very easy, thanks to netlify
Kaspar Emanuel
@kasbah
not that it would be hard with Nginx either
in fact it would be super easy to set up a little proxy that you could use for the viewer to get around CORS
Kaspar Emanuel
@kasbah
hmm, couldn't figure out how to do it with Nginx alone :/
(*.preview.kitspace.org doesn't set CORS)
could add it as a fallback when the initial load fails?
aaronbo2019
@aaronbo2019
I can see the website is very good! https://jlcpcb.com/quote @mcous
Dave Workman
@davidworkman9
Screen Shot 2019-06-17 at 2.42.54 PM.png

Hey @mcous, I had a question I'm hoping there's an answer to, using your tool is there some way I can extract all the soldermask items? Like each pad/hole, and their X/Y and size information?

I have a working prototype of this where I map the converter.layer array through a transform function that looks up it's definition tag(if applicable) and grabs the width height and X/Y, if it's a polygon I attach the polygon to an offscreen SVG and get it's bounding box, and if it's a circle I use it's radius. It works great, however occasionally they're drawn with path objects, that may contain many pads. Example is the Arduino project (see above screenshot) any suggestions how I might go about parsing those out?

Mike Cousins
@mcous

Sorry for the delay @davidworkman9! A Gerber file has three basic drawing operations:

  • Flash a shape (ideally used for a pad)
  • Stroke a shape (ideally used for a trace)
  • Fill a region (ideally used for a fill)

tracespace maps those exactly from flash > use, stroke > path with stroke-width, and fill > path with fill. Unfortunately for you here, some CAD software doesn't obey the three rules above. Eagle, in this case, looks like it has output a series of strokes instead of using the more proper flash for some pads.

I don't know if it'll be particularly easy, but you could try to collect the output of gerber-plotter itself (you'd want to attach a listener on converter.plotter before the conversion starts; sorry that it's not easier to get to). You'd then have access to the stroke operations as data, with each "segment" as an object: https://github.com/tracespace/tracespace/blob/master/packages/gerber-plotter/API.md#stroke-and-fill-objects. That array of segments is what gerber-to-svg uses to construct those long path data strings.

I'm a little ways into a big refactor that will output proper (or at least, almost proper) ASTs for the parse tree as well as the plot tree, which would give you fewer hoops to jump through to collect this data. Unfortunately it's going to be some time before it's in a usable state.

Kaspar Emanuel
@kasbah
links to load the gerbers into tracespace/view are now up on kitspace.org!
Mitch Davis
@CapnKernel
Hello. I'd like to use tracespace to show a board design to my friends. The zipped gerbers are stored as a release on github, and tracespace works fine if I drag the zip to the tracespace web page. In the network tab I can see that my browser requests the zip file, a 302 is returned to Amazon, but that fetch fails because of CORS. How can I get this to work?
https://tracespace.io/view/?boardUrl=https://github.com/CapnKernel/ozhelm/releases/download/0.1/ozhelm-gerbers-0.1.zip
(This used to work with gerblook.org, but I see that's now running a tracespace instance for pad2pad)
(Going offline now, but will be back later)
Mitch Davis
@CapnKernel
Back.
Mitch Davis
@CapnKernel
Anyone?
Kaspar Emanuel
@kasbah
@CapnKernel you need to host the zip somewhere that allows CORS
it would be a bit of a roundabout way to just show the gerbers, but you could add your project to kitspace.org as we serve the gerber zip with CORS allowed have links to tracespace on the page
Sangamesh Bappanna
@sangameshBappanna
Hi, I am using pcbstackup core, and when I pass a layer with type drawing it is not giving any SVG output, can you help me out.
Sangamesh Bappanna
@sangameshBappanna
can any one help
Mike Cousins
@mcous
Layer type drawing means "this layer is informational and should not affect the render". If you would like the layer to render, you should give it a specific type like copper or silkscreen