X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=6t+rgd08vD+r0Bhtk/ou0/Ph8KJXzobjNOB60t9sWM8=; b=k0Afq7aBiI/72QqL4tsKMmJbOOEagUiODXUuznlpDlhaNUpWR1jdnTkuos/nfdFYBo 7DD6JTyPgOH17QutT05xqq/E01Hn0xJeha19XZZYoxp+i0xIOD8Xc9zfYA5oTiuEAX9M QWZMgNH9DjsLDCIOhWGHzxD5kUTrhaQnAiHeDKgj8Q90zMX48b1vs/7AliWtgzTP9w7/ 4ILT1ow6nfMtEDKOYQE+UDU8ZiTnzDypetEyGLUVE4onxHH1fsIZgqkEHuD+cbB7d+++ ozf2Wfpjn8SUW1T/XJPmYTac8UnUuKpZmLBJVbimZpuIFAJlM1hO52JmOtWXhTjvO+30 IPjg== MIME-Version: 1.0 X-Received: by 10.194.91.228 with SMTP id ch4mr38637178wjb.59.1402394942140; Tue, 10 Jun 2014 03:09:02 -0700 (PDT) In-Reply-To: <1402355532.14291.63.camel@pcjc2lap> References: <1402355532 DOT 14291 DOT 63 DOT camel AT pcjc2lap> Date: Tue, 10 Jun 2014 12:09:02 +0200 Message-ID: Subject: Re: [geda-user] Prerequisites for a STEP exporter - call for assistance. From: Levente To: gEDA User Mailing List Content-Type: multipart/alternative; boundary=047d7bd91d9e5c7d4e04fb7884b5 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --047d7bd91d9e5c7d4e04fb7884b5 Content-Type: text/plain; charset=UTF-8 Peter, Many thanks for the work done so far. Yes, I think implementing a new file format would be nice for PCB. And it would be nice if one could define a footprint at least with a height parameter. I think the current file format is the barrier for many nice features that is on the doorstep. Unfortunatelly, I am 100% loaded with my home automation project, and I have 2000m2 of grass to cut. Levente 73s de HA5OGL On Tue, Jun 10, 2014 at 1:12 AM, Peter Clifton wrote: > Hi All, > > Some might recall that I was looking into 3D export for PCB. (Of the > board shape). > > My thanks go out to the people who funded purchase of the ISO STEP > standard collection - this work would not have been possible without the > reference material. Whilst progress on the exporter has been very slow > going, it is a lot closer to being useful now. > > > I've re-written my export code over the last week or so, and can now > emit useful AP214 .STEP files containing a representation of the PCB > board, complete with via holes. (And colour!) As of tonight, there is > support for emitting multiple solid bodies, when the board outline has > more than one piece. > > > There are, however, some things we ought to get straight in PCB before > the exporter can sensibly be finished off and merged. > > > 1. We need a semantically defined, machine parse-able board outline > definition adding to our file format. > > I propose that we allow users to draw this contour in a similar way to a > polygon, and use this as a machine-readable "outline" embedded in the > PCB file. > > For my testing, I have been extracting an outline polygon from the > objects on the "outline" layer. Unfortunately, this is not particularly > robust, and with the current code, can lead to incorrect dimensioning. > (I trace the polygon produced by gluing "fat" versions of the "outline" > layer objects in order to allow skipping over small gaps in their > centrelines). > > > In order to do this properly we need to develop an extended poly-curve > syntax which allows line AND arc segments to form a connected, closed > loop. With this, the user can be completely explicit about the design > intent. I DO NOT want us to extract this from the magic "outline" layer, > using some magic heuristics to interpret what various objects the user > drew there. > > > We should use this extended poly-curve definition to replace the > poly-line outline definition used of PCB's (file format) polygons. > > The underlying polygon algebra code will internally use line-segment > approximations to implement the arc segments, but we need to be able to > express the design intent to use arcs as part of the board outline. (The > STEP exporter will certainly be able to use them). > > > With a common poly-curve format, we can, of course use the (extended) > polygon editing code to define an explicit board outline. Exporters and > renders which care (gerber, STEP, PCB+GL), can use this definition to > emit definitive outline data. > > We could possibly write an action routine to extract an outline from > lines and arcs on an existing, legacy "outline" layer. This could > perhaps be based on an extension of the outline extraction code I've > been using to test PCB+GL and the STEP exporter, although a slightly > different approach to constructing the outline polygon would be needed > to have it properly follow the centreline of the various lines and arcs. > > I am, however, COMPLETELY DEAD AGAINST using an automatic extraction > routine to add (yet more) magic and rules to the existing concept of an > "outline" layer. > > Until we have "PROPER" outline information in the PCB file, there is no > point in merging my STEP exporter, or the PCB+GL features which use the > board outlines. I really don't want to lock in rules to guestimate the > user's intent by looking at a drawing layer, when an exact outline could > so readily be defined explicitly. > > > > 2. We need to define and store stack-up meta-data, at the very least - > board thickness. (In a defined, and machine parse-able way). > > Ideally, we could store full build-up information, as this would be > useful for the 3D view, and for any (FUTURE) more detailed 3D model > output, that could conceivably include tracking and layer build-up. > > > 3. If we start defining "courtyard" and Z-height as part of our > footprints, then I can start extruding those outlines as well... to > augment the board model. > > This is a more trivial file format extension once we have a poly-curve > loop primitive. > > > 4. We need a decision on coordinates. Currently, my export uses a > right-handed coordinate system with its origin at the bottom left of the > board, with Z+ being towards the top of the board, coming out of the > screen. > > This is in common with the gerber exported coordinates (in 2D at least), > and TBH - is a more sane coordinate system than PCB currently uses. For > now though, we will have to convert on the fly. > > We do, however, need to define the Z-planes. At the moment, perhaps not > quite right, I have the top of the board at Z=0, and the bottom at > Z=-1.6mm. More sensible alternatives would be to centre the board > stack-up about Z=0, place or the bottom of the board at Z=0. > > > > I, unfortunately, don't have the time or resources to address points 1, > 2 (and 3) at the moment, so I'm calling for some assistance. > > > Does anyone want to look at these problems, work on the file-format > extensions, and editing tools to allow such definitions??? > > > In my opinion, the 3D stuff is easy (once you've got your head around > some of the STEP standard). It is also not too not critical in terms of > risk leaving a legacy to maintain compatibility with, should incorrect > design choices be made). The hard problem is getting good data to work > with. > > Getting the data-model and file format right is the difficult task.. we > don't want to be stuck maintaining backwards compatibility with bad > design decisions here. > > That is the primary reason why I don't want to introduce code to extract > an outline curve from the "outline" layer, and why merging the 3D stuff > is not going to be a quick job. > > > Does anyone feel like a challenge? > > > > Best regards, > > -- > Peter Clifton > > Clifton Electronics > > --047d7bd91d9e5c7d4e04fb7884b5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Peter,


Many thanks fo= r the work done so far.

Yes, I think implementing a new file f= ormat would be nice for PCB. And it would be nice if one could define a foo= tprint at least with a height parameter.

I think the current file format is the barrier for many nice feat= ures that is on the doorstep.

Unfortunatelly, = I am 100% loaded with my home automation project, and I have 2000m2 of gras= s to cut.


Levente

73s de HA5OGL
<= div class=3D"gmail_extra">

On Tue, Jun 10= , 2014 at 1:12 AM, Peter Clifton <pcjc2 AT cam DOT ac DOT uk> wrote:
Hi All,

Some might recall that I was looking into 3D export for PCB. (Of the
board shape).

My thanks go out to the people who funded purchase of the ISO STEP
standard collection - this work would not have been possible without the reference material. Whilst progress on the exporter has been very slow
going, it is a lot closer to being useful now.


I've re-written my export code over the last week or so, and can now emit useful AP214 .STEP files containing a representation of the PCB
board, complete with via holes. (And colour!) As of tonight, there is
support for emitting multiple solid bodies, when the board outline has
more than one piece.


There are, however, some things we ought to get straight in PCB before
the exporter can sensibly be finished off and merged.


1. We need a semantically defined, machine parse-able board outline
definition adding to our file format.

I propose that we allow users to draw this contour in a similar way to a polygon, and use this as a machine-readable "outline" embedded in= the
PCB file.

For my testing, I have been extracting an outline polygon from the
objects on the "outline" layer. Unfortunately, this is not partic= ularly
robust, and with the current code, can lead to incorrect dimensioning.
(I trace the polygon produced by gluing "fat" versions of the &qu= ot;outline"
layer objects in order to allow skipping over small gaps in their
centrelines).


In order to do this properly we need to develop an extended poly-curve
syntax which allows line AND arc segments to form a connected, closed
loop. With this, the user can be completely explicit about the design
intent. I DO NOT want us to extract this from the magic "outline"= layer,
using some magic heuristics to interpret what various objects the user
drew there.


We should use this extended poly-curve definition to replace the
poly-line outline definition used of PCB's (file format) polygons.

The underlying polygon algebra code will internally use line-segment
approximations to implement the arc segments, but we need to be able to
express the design intent to use arcs as part of the board outline. (The STEP exporter will certainly be able to use them).


With a common poly-curve format, we can, of course use the (extended)
polygon editing code to define an explicit board outline. Exporters and
renders which care (gerber, STEP, PCB+GL), can use this definition to
emit definitive outline data.

We could possibly write an action routine to extract an outline from
lines and arcs on an existing, legacy "outline" layer. This could=
perhaps be based on an extension of the outline extraction code I've been using to test PCB+GL and the STEP exporter, although a slightly
different approach to constructing the outline polygon would be needed
to have it properly follow the centreline of the various lines and arcs.
I am, however, COMPLETELY DEAD AGAINST using an automatic extraction
routine to add (yet more) magic and rules to the existing concept of an
"outline" layer.

Until we have "PROPER" outline information in the PCB file, there= is no
point in merging my STEP exporter, or the PCB+GL features which use the
board outlines. =C2=A0I really don't want to lock in rules to guestimat= e the
user's intent by looking at a drawing layer, when an exact outline coul= d
so readily be defined explicitly.



2. We need to define and store stack-up meta-data, at the very least -
board thickness. (In a defined, and machine parse-able way).

Ideally, we could store full build-up information, as this would be
useful for the 3D view, and for any (FUTURE) more detailed 3D model
output, that could conceivably include tracking and layer build-up.


3. If we start defining "courtyard" and Z-height as part of our footprints, then I can start extruding those outlines as well... to
augment the board model.

This is a more trivial file format extension once we have a poly-curve
loop primitive.


4. We need a decision on coordinates. Currently, my export uses a
right-handed coordinate system with its origin at the bottom left of the board, with Z+ being towards the top of the board, coming out of the
screen.

This is in common with the gerber exported coordinates (in 2D at least), and TBH - is a more sane coordinate system than PCB currently uses. For
now though, we will have to convert on the fly.

We do, however, need to define the Z-planes. At the moment, perhaps not
quite right, I have the top of the board at Z=3D0, and the bottom at
Z=3D-1.6mm. More sensible alternatives would be to centre the board
stack-up about Z=3D0, place or the bottom of the board at Z=3D0.



I, unfortunately, don't have the time or resources to address points 1,=
2 (and 3) at the moment, so I'm calling for some assistance.


Does anyone want to look at these problems, work on the file-format
extensions, and editing tools to allow such definitions???


In my opinion, the 3D stuff is easy (once you've got your head around some of the STEP standard). It is also not too not critical in terms of
risk leaving a legacy to maintain compatibility with, should incorrect
design choices be made). The hard problem is getting good data to work
with.

Getting the data-model and file format right is the difficult task.. we
don't want to be stuck maintaining backwards compatibility with bad
design decisions here.

That is the primary reason why I don't want to introduce code to extrac= t
an outline curve from the "outline" layer, and why merging the 3D= stuff
is not going to be a quick job.


Does anyone feel like a challenge?



Best regards,

--
Peter Clifton <