← Back to team overview

kicad-developers team mailing list archive

Re: Remove holes and bottleneck in 3d-viewer

 

Le 13/04/2015 17:04, Mário Luzeiro a écrit :
> Thank you for the explanation, I am starting to better understand it
> now.
> 
> Could that be done some other way?
> 
> I was trying to understand how GAL is rendering the zones and it
> first draws "the polygon it self" and then the beautiful rounded
> outlines. (The corner interpolation is visually implemented in
> shaders in openGL GAL case)

The legacy render also draws the polygon itself, and then the thick
outlines.
> 
> What about apply the remove holes only to that "10 000 to 20 000
> corners" (I believe the remove holes will so create more
> corners..with the format of the hole..) and then render an outline
> with the approximation polygon.?

It could work for via holes, not pad holes.
Pad holes are (most of time) on the outline (when pads have thermal
reliefs).

> 
> The other way I was trying to suggest / think is in some acceleration
> structure (tree) or to subdivide the board (in a grid) and then apply
> that remove holes. (so, not sure how can it be performed .. or if
> boost is already doing that)

Combining polygons uses optimized algos.
Polygons are not combined one by one, but globally.
So the faster way to remove holes is the current way.

Accel struct could be useful when copper zones are small.
But unfortunately, zones with a lot of corners are planes which cover
the full board area, not small zones.

Globally Combining polygons (zones + tracks) it time consuming, it give
an optimized description of copper areas. This is useful to build these
areas and showing the copper thickness: the polygons also describes the
vertical edges of the copper areas (which is not so optimized when you
do not combine the polygons)

Remember: combining polygons is not just remove holes, but also merge
overlapping polygons.

> 
> Another technical question: How does the outline width/ polygon is
> properly rendered? If we have a single point, that point will draw a
> circle with the radius = width ?

You cannot have a single corner: a valid polygon needs at least 3
corners (not aligned).

> 
> Maybe there are some other way that I am trying to think how this can
> be visually rendered with less processing (similar way as GAL).
> 
> One other possibility, but it could lack a bit from "technical
> precision" would be using image operation & textures. In that case
> the rendering could be performed as in GAL and the holes are removed
> by pixel operations... maybe then.. (as I suggested before) a proper
> outline can be rendered in 3D... In the end we want to have the best
> math / physical realistic & correctness rendering.. but it can be
> faked somehow.
> 
> What do you think?
> 
> Regards, Mario Luzeiro

Be careful: GAL is a 2D representation (the copper thickness is not
taken in account).
The 3D viewer uses the 3D representation of the copper layers (and tech
layers)
It means a rectangular pad, for instance needs 6 rectangles (Top,
Botton, and 4 sides) and a hole needs to be removed from these rectangles.
In GAL there is only one rectangle.


-- 
Jean-Pierre CHARRAS


Follow ups

References