Live data from Hacker News

SVG can do that?

slides.com

161–170 of 202 posts

Re: SVG can do that?

#161
post #73
post #71

Earlier quoted context omitted.

I guess I'm dumb, but I have no idea what 'PGM' is supposed to mean in this context.

I'm guessing Program Manager, which is new-corporate speak for Project Manager.

The abbreviation suggests that it's Pro Gram Manager. As opposed to, say, an Amateur Ounce Manager.

Re: SVG can do that?

#162

SVG has the opposite performance profile of Canvas. SVG hits a performance ceiling as number of elements increases. Canvas, since it's rasterized image can handle a rasterized representation of millions of SVG elements. However as Canvas dimension increase, it will hit a performance ceiling.

Choice between SVG and Canvas comes down to a balance between performance and interactivity, IMO. It is very easy to attach events and create interactions with a SVG object -- much harder to do that in Canvas (basically, you have to keep track of everything that was drawn). The flipside is, Canvas it effectively a bitmap, doesn't care what the pixels are, so the complexity is a constant regardless of what is drawn. SVG renderers will start to bog down once there are "too many" elements.

Re: SVG can do that?

#163
post #155

Earlier quoted context omitted.

do 3d css transforms make that much difference ?

You can use something like `transform:translateZ(0px)` to force a subsection of the dom to exist on its own rendering layer. Then you can transform the parent nodes and they'll move the lower layer around as if it were a static picture that they don't need to redraw. I'm not sure how well this works within an svg, but you can certainly use it to do your transformations outside the svg.

ok i dug out the project I was thinking of and I was wrong - performance is fine at 10k nodes. adding translateZ causes a slight delay after changing the transform matrix while it re-renders the bitmap, and you see the switch - thanks for the advice

Re: SVG can do that?

#164
I've used SVG to design custom PCBs using traces as magnetic coils, something that, surprisingly, doesn't have a good industrial software package for. Everything in PCB design software is geared toward routing wires conveniently between components, but if you try to actually use the wires as actual components, it's almost impossible to freely design. And even regular PCB design software feels almost unchanged since the 1980s or 1990s. Incredibly clunky.

Here's a good Hackaday article on converting SVG to PCB file formats: http://hackaday.com/2016/01/28/beautiful-and-bizarre-boards/ PCBModE is one package I tried for a while: http://pcbmode.com/ Boldport uses this toolchain to make beautiful PCBs relying heavily on SVG: https://www.boldport.com/

I had a hard time with all these packages, however, and ended up just hacking it together by hand with python code and outputting in KiCAD format. I wasn't even able to get KiCAD to read/render it properly (too many weird elements), but since OSH Park (where I got my PCBs from) takes KiCAD format directly and gives you a preview, that all worked fine, and when I ordered my PCBs, they arrived in working condition just fine the first time.

https://oshpark.com/

So yeah, SVG can do a lot, including make funky PCBs.

Re: SVG can do that?

#165

I use svg all the time to make tiny web interfaces for embedded systems. When the entire web app has to fit in 350k, you don't have space for gif's or jpg's.

If your embedded system only has 350 kB of space for your app how on earth do you fit a browser in there? Or do you only use the 'static' features of SVG?

Re: SVG can do that?

#166

I've used SVG to design custom PCBs using traces as magnetic coils, something that, surprisingly, doesn't have a good industrial software package for. Everything in PCB design software is geared toward routing wires conveniently between components, but if you try to actually use the wires as actual components, it's almost impossible to freely design. And even regular PCB design software feels almost unchanged since t…

Altium can do that sort of thing fairly easily. We use it for boards with waveguide filters, couplers, etc. (usually the geometry is designed and simulated in a field solver first, and then imported in, but you can do it straight in the software if you want).

The easiest way is to design the coil as a part, but you can use traces and arcs and stuff like normal in that.

Re: SVG can do that?

#167

We attempted to do a complex animation in SVG and the primary complaint was that it killed the browser in terms of CPU and memory usage. Are we doing something wrong?

I had the same experience using SVG to render music notation. We hit a performance issue - high CPU usage, skips/stutters - with several hundred to a thousand nodes, some animated. Switching to canvas increased that limit, in that we were able to keep smooth rendering with larger documents.

Re: SVG can do that?

#168
post #108

Flash has the "advantage" that it's used almost exclusively for advertisments. Mostly pretentious people (artists, photographers etc) have websites made of flash. So, by turning off Flash, you block the bulk of annoying ads. And you lose little by disabling Flash. Would the same be true for SVG ? Would it be used mostly for ads, too ? Or even, can you selectively block only the SVG used for advertisments ?

Unfortunately, that seems to be one of the bigger hazards for SVG.

It really is an amazing graphical tool. David Dailey has been posting some amazing stuff on Ello: https://ello.co/ddailey

(Which also uses SVG for most of its icons and buttons.)

But ... the potential for advertising/marketing abuse (or just sheer bad design / misuse) is so high. Unless there's a way to quash it....

Sigh. This is why we can't have nice things.

Re: SVG can do that?

#169

I've used SVG to design custom PCBs using traces as magnetic coils, something that, surprisingly, doesn't have a good industrial software package for. Everything in PCB design software is geared toward routing wires conveniently between components, but if you try to actually use the wires as actual components, it's almost impossible to freely design. And even regular PCB design software feels almost unchanged since t…

Altium can do that sort of thing fairly easily. We use it for boards with waveguide filters, couplers, etc. (usually the geometry is designed and simulated in a field solver first, and then imported in, but you can do it straight in the software if you want). The easiest way is to design the coil as a part, but you can use traces and arcs and stuff like normal in that.

That works well if your coil component is small and is just acting as a microwave RF component or something, but in my case I had a pretty complicated coil design (although simple conceptually) that spanned the entire PCB and interwove with other coils and wasn't arranged in a simple rectilinear manner. My original plan was to design the whole thing in Solidworks, which I did (and it was pretty easy to do), but there was simply no easy way to convert that into an actual PCB for manufacture (there is a Circuitworks module, but it's designed only for importing circuits to design around in Solidworks, not the other direction). Sitting there and manually making arcs and such in the PCB design software was just a non-starter. There are no parametric modeling features to speak of, and it's actually way easier to do what I did.

I think I used OpenSCAD to export to SVG.

Re: SVG can do that?

#170
post #13

Earlier quoted context omitted.

The article is proposing SVG for rendering responsive text for articles. So the screen reader comment is valid.

It is not, is picked up by screen-readers without any issue.

In what order?

Have you ever looked at a text dump of a PDF?

Assuming it's a text-PDF in the first place, there's no guarantee that it's in any sensible order.

Of course, most Web writing is pastiche anyway.

Post reply on HN