Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Patrick Doyle
On Thu, Nov 18, 2010 at 10:01 PM, kai-martin knaak k...@familieknaak.de wrote:

 Looks like there is no open 3D exchange format that fits the
 need of pcb:

 a) render a beautiful image of a populated board

 b) integrate pcb in a 3D work-flow to fit the board into some
 tight space.

 The existing formats are either limited to surfaces rather than objects
 (STL, VRML). This prevents efficient processing of the 3D geometry.
 Or they lack attributes for eye candy (IGES). Or they are overly
 complex and geared to completely different use cases (STEP)
Not knowing anything of which I speak (write?), would COLLADA
(https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema)
fit the bill?  I just happened to stumble across it last week on
something totally unrelated, and then noticed your email saying I
need an open 3D exchange format.

--wpd


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: current working file name in gschemrc

2010-11-19 Thread Kai-Martin Knaak
Currently, my print command in gschemrc is 
(print-command lp -d PDF)

This prints a PDF of the current schematic via cups-pdf. 
The PDF file appears in $HOME/PDF/ as 
job_1296-untitled_document.pdf

I'd like to replace this with the name of the schematic. The lp command can 
set the base name of the file with the option -t. But how would I teach 
gschemrc to automatically fill in the file name of the current schematic? Is 
there some way to access the file name like this:
(print-command lp -d PDF -t $CURRENTFILENAME) 

---)kaimartin(---
-- 
Kai-Martin Knaak  tel: +49-511-762-2895
Universität Hannover, Inst. für Quantenoptik  fax: +49-511-762-2211 
Welfengarten 1, 30167 Hannover   http://www.iqo.uni-hannover.de
GPG key:http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmkop=get



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: exporting single pcb layers

2010-11-19 Thread chrysn
hi geda-users,

in the process of cnc-milling a pcb with a custom shape using pcb2gcode
[1], i created a polygon on a separate layer. in the following
processing steps, i need a gerber file that contains just that polygon
(without holes for the pins, becaus they don't belong to the outline).

my current workflow is to create a copy of the pcb file and strip away
all pins and vias using

sed -e 's/^\tPin/# /' -e 's/^\t\(SymbolLine\|Line\)/# /' -e 's/^Via/# 
/'

but that's certainly not ideal.

is there a way to either

* flag a layer in pcb in such a way that it won't get interference from
  other layers,
* make pcb export only a single layer, or
* make pcb remove all layers but one (in that case, i'd still need to
  duplicate the file)?

the last option could be done with an advanced sed script as well, but
i'd prefer to rely on pcb for parsing pcb files instead of hoping that
the assumptions the sed script works on hold.

regards
chrysn

[1] http://sourceforge.net/apps/mediawiki/pcb2gcode/

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom


signature.asc
Description: Digital signature


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: exporting single pcb layers

2010-11-19 Thread timecop
        sed -e 's/^\tPin/# /' -e 's/^\t\(SymbolLine\|Line\)/# /' -e 
 's/^Via/# /'
In my windows PCB CAD, I click 'Export Gerber' and click a layer.
If I don't want vias or pins there, I uh,, click a checkbox.
GUIs exist for a reason. This is one of those good reasons.

--
1966 called, wants its LISP interpreter back.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: exporting single pcb layers

2010-11-19 Thread John Doty

On Nov 19, 2010, at 7:56 AM, timecop wrote:

sed -e 's/^\tPin/# /' -e 's/^\t\(SymbolLine\|Line\)/# /' -e 
 's/^Via/# /'
 In my windows PCB CAD, I click 'Export Gerber' and click a layer.

What if there's no checkbox for the function you need?

 If I don't want vias or pins there, I uh,, click a checkbox.
 GUIs exist for a reason. This is one of those good reasons.

That's why GUI apps end up with 1000 checkboxes with incomprehensible 
functions, requiring hours of work merely to discover that the special case 
*you* need wasn't considered by the designers. But the computer-literate user 
of a well-factored toolkit can incorporate things like that sed command in a 
Makefile as part of an export action and never have to waste time with a GUI to 
do that job. Automation.

There's nothing wrong with a simple GUI app targeting a narrow subset of common 
development paths. But when GUI designers try to cover every possible case, 
they are effectively attempting to travel a very long road with a short range 
vehicle.

 1966 called, wants its LISP interpreter back.

Can have it: the modern LISPs are better.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: exporting single pcb layers

2010-11-19 Thread Kovacs Levente
On Fri, 19 Nov 2010 23:56:50 +0900
timecop time...@gmail.com wrote:

 In my windows PCB CAD

I think the OP wants information about gEDA's PCB editor and not your
PCB CAD.

Your comment is irrelevant.

-- 
Kovacs Levente leventel...@gmail.com
Voice: +36705071002




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: exporting single pcb layers

2010-11-19 Thread Stefan Salewski
On Fri, 2010-11-19 at 23:56 +0900, timecop wrote:
 sed -e 's/^\tPin/# /' -e 's/^\t\(SymbolLine\|Line\)/# /' -e 
  's/^Via/# /'
 In my windows PCB CAD, I click 'Export Gerber' and click a layer.
 If I don't want vias or pins there, I uh,, click a checkbox.
 GUIs exist for a reason. This is one of those good reasons.
 

Yes, GUIs with checkboxes are great.
I really would like a checkbox labeled Delete silly and stupid postings
automatically for my email client.





___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread Peter Clifton
http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/pcb+gl_3d_packages_mockup3.png
http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/pcb+gl_3d_packages_mockup4.png

Perhaps pixel shaders and bump mapping is a little overkill for a few
resistors, but it has kept me amused for a while.

I'm working on a VRML importer at the moment, as this will give us
access to models people have created for KiCad. (And hopefully the
converse too, when PCB+GL+3D lands and users start creating models).

/me hating flex and bison like a pro now ;)


Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: exporting single pcb layers

2010-11-19 Thread Stephan Boettcher
chrysn chr...@fsfe.org writes:

 hi geda-users,

 in the process of cnc-milling a pcb with a custom shape using pcb2gcode
 [1], i created a polygon on a separate layer. in the following
 processing steps, i need a gerber file that contains just that polygon
 (without holes for the pins, becaus they don't belong to the outline).

Just name the layer outline without the quotes, lowercase.  Draw the
outline with lines, in an exact closed loop, not as a polygone.  The
gerber export will magically do what you need.

 [1] http://sourceforge.net/apps/mediawiki/pcb2gcode/

-- 
Stephan Böttcher FAX: +49-431-880-3968
Extraterrestrische PhysikTel: +49-431-880-2508
I.f.Exp.u.Angew.Physik   mailto:boettc...@physik.uni-kiel.de
Leibnizstr. 11, 24118 Kiel, Germany


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 01:29 +0100, kai-martin knaak wrote:
 Peter Clifton wrote:
 
  stl (very nice)
 
 IMHO, stl is a mesh only format. That is, everything is made of
 triangles -- no squares, no circles, no real curvatures. There are
 no macros, no loops, or repetitions.

That suits me just fine.. OpenGL _likes_ rendering triangles, and any
other geometry primitives are extra work to implement ;)

  A decent pcb would make for
 a pretty large stl file if all the vias and pin holes were to be
 modeled realistically. Named objects are unknown to stl. This
 renders stl a one way format for most construction purposes. 

I've been looking for a format to _import_ 3D models of components for a
quick rough viewing within PCB. I concur that we probably don't want
many of the suggested formats for CAD interchange.

I concur with your other points, but think I'll play with VRML models
for now. I'm _hoping_ that there will be a route to do:

Serious component model in CAD - VRML for use within PCB.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread Richard Barlow
On Fri, 2010-11-19 at 17:21 +, Peter Clifton wrote:
 http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/pcb+gl_3d_packages_mockup3.png
 http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/pcb+gl_3d_packages_mockup4.png

Wow, they look amazing!

 Perhaps pixel shaders and bump mapping is a little overkill for a few
 resistors, but it has kept me amused for a while.

I'm sure one day we'll be able to export the whole thing to a format
which can be used in blender for those times you need super realistic
renderings ;)

Richard


signature.asc
Description: This is a digitally signed message part


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 17:30 +, Richard Barlow wrote:
 On Fri, 2010-11-19 at 17:21 +, Peter Clifton wrote:
  http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/pcb+gl_3d_packages_mockup3.png
  http://www2.eng.cam.ac.uk/~pcjc2/geda/pcb+gl_3d/pcb+gl_3d_packages_mockup4.png
 
 Wow, they look amazing!

Thanks. About 1000 lines of C code to produce though ;)

  Perhaps pixel shaders and bump mapping is a little overkill for a few
  resistors, but it has kept me amused for a while.
 
 I'm sure one day we'll be able to export the whole thing to a format
 which can be used in blender for those times you need super realistic
 renderings ;)

I wish I knew blender or some other 3D modelling package. I am playing
with writing a VRML importer - which should be able to read files
exported by Wings32 (like KiCad), but I can't for the life of me figure
out how to drive Wings32 to create a new model!

Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 06:15 -0500, Patrick Doyle wrote:
 Not knowing anything of which I speak (write?), would COLLADA
 (https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema)
 fit the bill?  I just happened to stumble across it last week on
 something totally unrelated, and then noticed your email saying I
 need an open 3D exchange format.

Blender imports and exports it too, which is nice. I just exported a
simple cube from blender into Collada format, and it isn't too
frightening, but it is not so simple as VRML.

Perhaps it ranks as nice to have, especially if there is some good
modelling software which only makes that format.

For now, I think in the spirit of co-operation with our FOSS bretheren /
competitors, VRML is the way forward. In the short term, we benefit from
pre-existing models from KiCad, in the long term, we both benefit from
more users generating models.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 17:43 +, Peter Clifton wrote:
 On Fri, 2010-11-19 at 06:15 -0500, Patrick Doyle wrote:
  Not knowing anything of which I speak (write?), would COLLADA
  (https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema)
  fit the bill?  I just happened to stumble across it last week on
  something totally unrelated, and then noticed your email saying I
  need an open 3D exchange format.
 
 Blender imports and exports it too, which is nice. I just exported a
 simple cube from blender into Collada format, and it isn't too
 frightening, but it is not so simple as VRML.
 
 Perhaps it ranks as nice to have, especially if there is some good
 modelling software which only makes that format.

By which I mean Google Sketchup, of course.. I've not used it myself, as
it dies under Wine for me (setting up GL), but apparently it is good.
Unfortunately only the Pro (pay-for) version supports export to VRML.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: New branch of PCB

2010-11-19 Thread Peter TB Brett
On Tuesday 16 Nov 2010 11:09:34 timecop wrote:
 With TopoR having a freeware version for 2 layers and up to 256 nets
 (or some other fairly high for 'hobby' use limitation), there's not
 really any point on bothering improving built in autorouter...

Even this single sentence contains so many factual inaccuracies and completely 
incorrect assumptions that I can't work out where best to start refuting it.

 Peter


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Patrick Doyle
On Fri, Nov 19, 2010 at 1:23 PM, Peter Clifton pc...@cam.ac.uk wrote:
 On Fri, 2010-11-19 at 17:43 +, Peter Clifton wrote:
 On Fri, 2010-11-19 at 06:15 -0500, Patrick Doyle wrote:
  Not knowing anything of which I speak (write?), would COLLADA
  (https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema)
  fit the bill?  I just happened to stumble across it last week on
  something totally unrelated, and then noticed your email saying I
  need an open 3D exchange format.

 Blender imports and exports it too, which is nice. I just exported a
 simple cube from blender into Collada format, and it isn't too
 frightening, but it is not so simple as VRML.

 Perhaps it ranks as nice to have, especially if there is some good
 modelling software which only makes that format.

 By which I mean Google Sketchup, of course.. I've not used it myself, as
 it dies under Wine for me (setting up GL), but apparently it is good.
 Unfortunately only the Pro (pay-for) version supports export to VRML.

So then why not use COLLADA and blender?  (I'm not trying to push for
this, or to pick a fight, I'm just curious and trying to learn
something totally new to me.)

--wpd


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Colin D Bennett
On Fri, 19 Nov 2010 17:27:45 +
Peter Clifton pc...@cam.ac.uk wrote:

 On Fri, 2010-11-19 at 01:29 +0100, kai-martin knaak wrote:
  Peter Clifton wrote:
  
   stl (very nice)
  
  IMHO, stl is a mesh only format. That is, everything is made of
  triangles -- no squares, no circles, no real curvatures. There are
  no macros, no loops, or repetitions.
 
 That suits me just fine.. OpenGL _likes_ rendering triangles, and any
 other geometry primitives are extra work to implement ;)

But wouldn't support for higher-level shapes be superior to triangle
meshes for high-quality renderings (e.g., raytracing, etc.)?  Is the
goal for PCB 3D support intended to be primarily for high-quality
renderings or for real-time viewing of and interaction with the 3D
scene?

On the other hand, it may be that most PCB elements can be quite
accurately represented with triangle meshes, especially flat,
rectangular SMT parts.  Through-hole parts tend to have more round
shapes that would be much more expensive to accurately model with
triangle meshes: cylindrical resistors, disc-shaped ceramic capacitors,
etc.

Regards,
Colin


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread John Griessen

On 11/19/2010 03:06 PM, Colin D Bennett wrote:

Through-hole parts tend to have more round
shapes that would be much more expensive to accurately model with
triangle meshes: cylindrical resistors, disc-shaped ceramic capacitors,
etc.


STL seems to work fine for those shapes - your tool just chooses triangles that 
are
long and skinny to accurately model the side of a cylinder for instance.

The other formats are wanted just for interoperability and translation.  VRML
might do fine for that.

John G


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Colin D Bennett
On Fri, 19 Nov 2010 15:24:05 -0500
Patrick Doyle wpds...@gmail.com wrote:

 On Fri, Nov 19, 2010 at 1:23 PM, Peter Clifton pc...@cam.ac.uk
 wrote:
  On Fri, 2010-11-19 at 17:43 +, Peter Clifton wrote:
  Perhaps it ranks as nice to have, especially if there is some
  good modelling software which only makes that format.
 
  By which I mean Google Sketchup, of course.. I've not used it
  myself, as it dies under Wine for me (setting up GL), but
  apparently it is good. Unfortunately only the Pro (pay-for)
  version supports export to VRML.
 
 So then why not use COLLADA and blender?  (I'm not trying to push for
 this, or to pick a fight, I'm just curious and trying to learn
 something totally new to me.)

It has to be mentioned that Blender is free and open source but Google
Sketchup is not.

Regards,
Colin


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 15:24 -0500, Patrick Doyle wrote:
 So then why not use COLLADA and blender?  (I'm not trying to push for
 this, or to pick a fight, I'm just curious and trying to learn
 something totally new to me.)

1. KiCad
2. VRML is easier to implement perhaps?
3. Blender can also save VRML (+lots of other formats)

I'm trying to design the data-structures with both VRML, Collada and
additional internally generated models in mind.

I've got a Collada file open right now. It is completely understandable,
but will probably take a bit more work extracting data from it reliably
as there is a lot more referencing which is done by name within the DOM,
rather than implied by the structure of the file.


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 13:06 -0800, Colin D Bennett wrote:

  That suits me just fine.. OpenGL _likes_ rendering triangles, and any
  other geometry primitives are extra work to implement ;)
 
 But wouldn't support for higher-level shapes be superior to triangle
 meshes for high-quality renderings (e.g., raytracing, etc.)?  Is the
 goal for PCB 3D support intended to be primarily for high-quality
 renderings or for real-time viewing of and interaction with the 3D
 scene?

Primarily for the latter (at the moment). I imagine your component
design workflow is:

Proper 3D CAD (e.g. insert cad program here) -
or   |
 |
3D graphics (e.g. Blender)   |
 |
  |  |
  |  |
 \|/ |
 |
Export VRML / Collada / ... for PCB's library|
\|/
  |  
  |Export CAD constraints, case etc..
 \|/ 
 |
Design board using PCB  

  ||
  | - Emit rendering description in graphics friendly format 
---
 \|/
|

|
Emit board shape / component placement as CAD data in some format 
|

|
  |
\|/
  |   Render board in graphics 
app.
 \|/  povtrace / blender?

Model board in CAD, design casing around it / whatever



I'm coming round to the idea that 3D is more than just eye candy if we
do it nicely. It helps visualise component placement and layout issues
far more readily than just looking at flat layers can do. Your brain may
spot issues it wouldn't otherwise.

I have also spoken to design professionals who value the ability to emit
3D renderings, however rough, as it allows better communication of
project progress and design ideas to clients, who may not themselves be
technical. (Think.. your manager??)

 triangle meshes: cylindrical resistors, disc-shaped ceramic capacitors,

My shiny through hole resistor screen-shots had approx 6000 panels, and
yes, it does slow things down if you have lots on screen at once!


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 14:07 -0800, Colin D Bennett wrote:

 It has to be mentioned that Blender is free and open source but Google
 Sketchup is not.

I took that as known, but I don't disprove of using good commercial
software to do a job. I find Blender quite challenging to work with.


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Philipp Klaus Krause
Am 19.11.2010 23:07, schrieb Colin D Bennett:
 
 It has to be mentioned that Blender is free and open source but Google
 Sketchup is not.

Let's not forget other free software, like wings3d, which may be less
powerful compared to blender, but is much more newbie-friendly, and
quite good for modelling (which it focuses on more than blender). AFAIK
it has wuite a number of export plugins though, which should make
supporting it easier.

Philipp


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Rubén Gómez Antolí

Hi:

El 19/11/10 23:07, Colin D Bennett escribió:

On Fri, 19 Nov 2010 15:24:05 -0500
Patrick Doylewpds...@gmail.com  wrote:


On Fri, Nov 19, 2010 at 1:23 PM, Peter Cliftonpc...@cam.ac.uk
wrote:

On Fri, 2010-11-19 at 17:43 +, Peter Clifton wrote:

Perhaps it ranks as nice to have, especially if there is some
good modelling software which only makes that format.


By which I mean Google Sketchup, of course.. I've not used it
myself, as it dies under Wine for me (setting up GL), but
apparently it is good. Unfortunately only the Pro (pay-for)
version supports export to VRML.


So then why not use COLLADA and blender?  (I'm not trying to push for
this, or to pick a fight, I'm just curious and trying to learn
something totally new to me.)


It has to be mentioned that Blender is free and open source but Google
Sketchup is not.


And runs on non x86 platforms. Sketchup, and wine, doesn't.

Please remember non x86 platforms (like PowerPC users how me) in yours 
decisions, there are solutions that aren't fully compatible in others 
platforms.



Regards,
Colin


Best regards.

Salud y Revolución.

Lobo.
--
Libertad es poder elegir en cualquier momento. Ahora yo elijo GNU/Linux,
para no atar mis manos con las cadenas del soft propietario.
-
Desde El Ejido, en Almería, usuario registrado Linux #294013
http://www.counter.li.org


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Russell Shaw

On 20/11/10 10:02, Peter Clifton wrote:

On Fri, 2010-11-19 at 13:06 -0800, Colin D Bennett wrote:


That suits me just fine.. OpenGL _likes_ rendering triangles, and any
other geometry primitives are extra work to implement ;)


But wouldn't support for higher-level shapes be superior to triangle
meshes for high-quality renderings (e.g., raytracing, etc.)?  Is the
goal for PCB 3D support intended to be primarily for high-quality
renderings or for real-time viewing of and interaction with the 3D
scene?


Primarily for the latter (at the moment). I imagine your component
design workflow is:

Proper 3D CAD (e.g.insert cad program here) -
or   |
  |
3D graphics (e.g. Blender)   |
  |
   |  |
   |  |
  \|/ |
  |
Export VRML / Collada / ... for PCB's library|
 \|/
   |
   |Export CAD constraints, case etc..
  \|/
  |
Design board using PCB

   ||
   | -  Emit rendering description in graphics friendly format 
---
  \|/   
 |

 |
Emit board shape / component placement as CAD data in some format 
|

 |
   |
\|/
   |   Render board in graphics 
app.
  \|/  povtrace / blender?

Model board in CAD, design casing around it / whatever



I'm coming round to the idea that 3D is more than just eye candy if we
do it nicely. It helps visualise component placement and layout issues
far more readily than just looking at flat layers can do. Your brain may
spot issues it wouldn't otherwise.

I have also spoken to design professionals who value the ability to emit
3D renderings, however rough, as it allows better communication of
project progress and design ideas to clients, who may not themselves be
technical. (Think.. your manager??)


triangle meshes: cylindrical resistors, disc-shaped ceramic capacitors,


My shiny through hole resistor screen-shots had approx 6000 panels, and
yes, it does slow things down if you have lots on screen at once!


Are you using a spatial data structure to omit emitting polygons
for off-screen components?


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Peter Clifton
On Sat, 2010-11-20 at 11:01 +1100, Russell Shaw wrote:

 Are you using a spatial data structure to omit emitting polygons
 for off-screen components?

PCB does that (spatial data-structures) already for rendering layers, so
yes. With the 3D perspective view, I fall back to rendering the whole
board at certain view angles which make it more awkward to calculate the
on-screen coverage of the board. This happens when the corners of the
viewport don't lie on the projection of the board plane, e.g. for near
edge-on views. (Which usually show most of the board anyway).

For the individual component models, no.. let GL deal with it. It is
unlikely you'll zoom into one so close that culling panels on the CPU
will be a big win.

It _is_ very helpful for board geometry though.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Tom Sylla
It looks like you are almost to the next step, but probably the
biggest value of having good 3d representations is the ability to do
clearance checking as a DRC. This is not just visualization, it is
rule-driven placement and flagging of errors when you place components
in conflict with each other, enclosures, or anything else you want to
represent in the PCB. My most recent designs were with Altium
Designer, and they use STEP as their 3d format of choice. This is
nice, because most connector manufacturers provide relatively good
STEP models of their parts for this purpose. Altium supports simple
objects like cubes and cylinders for most parts, but connectors are
always the biggest pain, so it was helpful to be able to import a
STEP. You get the pathway to pretty pictures too, but those are sort
of on a different level of value (mostly for show and tell). If PCB
could support clearance checking for components (as well as normal
electrical and other clearances), you'd get the best benefit of 3d
representations.

Here are some notes on the checking in Altium:
http://wiki.altium.com/display/ADOH/Component+Clearance



On Fri, Nov 19, 2010 at 3:02 PM, Peter Clifton pc...@cam.ac.uk wrote:
 On Fri, 2010-11-19 at 13:06 -0800, Colin D Bennett wrote:

  That suits me just fine.. OpenGL _likes_ rendering triangles, and any
  other geometry primitives are extra work to implement ;)

 But wouldn't support for higher-level shapes be superior to triangle
 meshes for high-quality renderings (e.g., raytracing, etc.)?  Is the
 goal for PCB 3D support intended to be primarily for high-quality
 renderings or for real-time viewing of and interaction with the 3D
 scene?

 Primarily for the latter (at the moment). I imagine your component
 design workflow is:

 Proper 3D CAD (e.g. insert cad program here) -
 or                                                   |
                                                     |
 3D graphics (e.g. Blender)                           |
                                                     |
      |                                              |
      |                                              |
     \|/                                             |
                                                     |
 Export VRML / Collada / ... for PCB's library        |
                                                    \|/
      |
      |                        Export CAD constraints, case etc..
     \|/
                                                     |
 Design board using PCB  

      |        |
      |         - Emit rendering description in graphics friendly format 
 ---
     \|/                                                                       
  |
                                                                               
  |
 Emit board shape / component placement as CAD data in some format           
   |
                                                                               
  |
      |                                                                        
 \|/
      |                                               Render board in graphics 
 app.
     \|/                                              povtrace / blender?

 Model board in CAD, design casing around it / whatever



 I'm coming round to the idea that 3D is more than just eye candy if we
 do it nicely. It helps visualise component placement and layout issues
 far more readily than just looking at flat layers can do. Your brain may
 spot issues it wouldn't otherwise.

 I have also spoken to design professionals who value the ability to emit
 3D renderings, however rough, as it allows better communication of
 project progress and design ideas to clients, who may not themselves be
 technical. (Think.. your manager??)

 triangle meshes: cylindrical resistors, disc-shaped ceramic capacitors,

 My shiny through hole resistor screen-shots had approx 6000 panels, and
 yes, it does slow things down if you have lots on screen at once!


 --
 Peter Clifton

 Electrical Engineering Division,
 Engineering Department,
 University of Cambridge,
 9, JJ Thomson Avenue,
 Cambridge
 CB3 0FA

 Tel: +44 (0)7729 980173 - (No signal in the lab!)
 Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



 ___
 geda-user mailing list
 geda-user@moria.seul.org
 http://www.seul.org/cgi-bin/mailman/listinfo/geda-user



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Russell Shaw

On 20/11/10 11:43, kai-martin knaak wrote:

John Griessen wrote:


STL seems to work fine for those shapes - your tool just chooses
triangles that are long and skinny to accurately model the side
of a cylinder for instance.


... and the file size explodes. If the wires of thru hole components
are supposed to look vaguely realistic on zoom, at least 20 triangles
per cylinder are needed. The 90° bend needs another 40 triangles. Every
triangle requires 3 nodes and every node includes three coordinates
plus orientation. That way, the stl size of a simple resistor may
easily xceed the memory footprint of its footprint by two orders of
magnitude.


You need lots of polygons for smooth shading only if the polygons
are flat-shaded.

If fewer polygons are used but with decent shading, the main effect
is that the silhouette has a few visible corners. That wouldn't matter
much for resistors.

http://en.wikipedia.org/wiki/Gouraud_shading
http://en.wikipedia.org/wiki/Phong_shading


The other formats are wanted just for interoperability and
translation.  VRML might do fine for that.


VRML is very similar to STL in that both are formats to export
from 3D CAD applications to rendering software like blender. They
both communicate just meshes, no objects. Beause of this, they
are they are less useful as imports for 3D editing. From mechanical
point of view these mesh formats are one-way roads.

---)kaimartin(---




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread kai-martin knaak
Peter Clifton wrote:

 I'm coming round to the idea that 3D is more than just eye candy
 if we do it nicely.

yes!


 It helps visualise component placement and layout issues
 far more readily than just looking at flat layers can do.

Even better: It aids the process of enclosing design in a very
practical way. I do this even in the absence of a way to transfer
geometrical data from pcb to 3D CAD. The 3D model below, was not 
done for the sake of eye candy, but as part of the front panel
construction:
http://bibo.iqo.uni-
hannover.de/dokuwiki/lib/exe/detail.php?id=eigenbau%3Alasertreibermedia=eigenbau:lasertreiber:frontplatte_lasertreiber.png


 I have also spoken to design professionals who value the ability to emit
 3D renderings, however rough, as it allows better communication of
 project progress and design ideas to clients, who may not themselves be
 technical. (Think.. your manager??)

Very true.
 

 triangle meshes: cylindrical resistors, disc-shaped ceramic capacitors,
 
 My shiny through hole resistor screen-shots had approx 6000 panels, 
 
Ok, bump up my estimation from the last mail by an order of magnitude ;-)


 and
 yes, it does slow things down if you have lots on screen at once!

That's why I'd prefer to stick with the object approach as long as 
possible. And keep the rendering business away from the pcb binary.

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread kai-martin knaak
Peter Clifton wrote:

 I'm sure one day we'll be able to export the whole thing to a format
 which can be used in blender for those times you need super
 realistic renderings ;)

VRML is already such a format :-)


 I wish I knew blender

This close-up of a laser diode package shows what blender is 
very good at -- render shapes as in a super natural way.

http://commons.wikimedia.org/wiki/File:Laserdiode_housing.png?uselang=de
The shape was done with varicad and exported to blender as STL.
Note the artifacts on the supposedly smooth surfaces. There are
filters to get rid of these artifacts in the renders image. However,
in this case, the image looks better as it is.

When it comes to 3D construction, mesh formats like STL or VRML
won't help you much, though. 


 I am playing
 with writing a VRML importer - which should be able to read files
 exported by Wings32 (like KiCad), but I can't for the life of me
 figure out how to drive Wings32 to create a new model!

I'd strongly prefer to do 3D models with a full fledged 3D CAD
application. Preferably with the CAD app I use for the rest of my 
construction work. That's the benefit if pcb would communicate 
the full information of the layout to a free 3D CAD app. This app
would shoulder the tedious import/export to the complex formats 
of the real 3D CAD world -- IGES, STEP, DWG, ... 
Did I mention, that mesh formats are a one way road, when it
comes to construction? 
(Please tell me, that I don't need to make that point over and over 
again ;-)

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: STEP Format? [WAS: Re: PCB+GL+3D Packages??]

2010-11-19 Thread Peter Clifton
On Sat, 2010-11-20 at 11:59 +1100, Russell Shaw wrote:

 If fewer polygons are used but with decent shading, the main effect
 is that the silhouette has a few visible corners. That wouldn't matter
 much for resistors.
 
 http://en.wikipedia.org/wiki/Gouraud_shading
 http://en.wikipedia.org/wiki/Phong_shading

FWIW, my resistors were shaded with a crude Blinn-Phong pixel shader.
(Simplified by having the viewer and light at infinity).

(I think!) That was basically what fell out of me doing bump mapping,
albeit very inefficiently. I probably ought to use the vertex shader to
compute the texture space basis vectors rather than CPU.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread kai-martin knaak
Bert Timmerman wrote:

 http://openscad.org/
 
 And the beginning of an OpenSCAD exporter for pcb, on top of a recent
 (current) clone of the pcb git repository:
 
 https://github.com/bert/pcb-openscad
 
 Please give me your thoughts and opinions on both.

I see a nice way to produce 3D models non-interactively. The models 
can be exported as a mesh in STL format. This allows for import to 
blender for super naturalistic rendering. Goal number one achieved :-)

I don't see a work flow to 3D construction apps. There is DXF output. 
But this is 2D, only. So goal number two seems out of reach. Is there 
a STEP export in the pipeline?

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread Peter Clifton
On Sat, 2010-11-20 at 02:39 +0100, kai-martin knaak wrote:
 Did I mention, that mesh formats are a one way road, when it
 comes to construction? 
 (Please tell me, that I don't need to make that point over and over 
 again ;-)

Got it ;)

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread kai-martin knaak
Peter Clifton wrote:

  when PCB+GL+3D lands and users start creating models).
^
I'd love to see PCB+GL enter the main repo rather than wait until 
3D is mature enough, too.

---)kaimartin(
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Peter Clifton
On Fri, 2010-11-19 at 23:43 +0100, Philipp Klaus Krause wrote:

 Let's not forget other free software, like wings3d, which may be less
 powerful compared to blender, but is much more newbie-friendly, and
 quite good for modelling (which it focuses on more than blender). AFAIK
 it has wuite a number of export plugins though, which should make
 supporting it easier.

Wings3D can export to most if not all the formats I'm interested in, but
now you make me feel stupid.. I couldn't figure out how to get started
with it other than opening existing models. Since you say it is newbie
friendly, I'll go back and try again.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread Peter Clifton
On Sat, 2010-11-20 at 03:00 +0100, kai-martin knaak wrote:
 Peter Clifton wrote:
 
   when PCB+GL+3D lands and users start creating models).
 ^
 I'd love to see PCB+GL enter the main repo rather than wait until 
 3D is mature enough, too.

I've been slowly tinkering with stabilising the code and heading in that
direction. One of the big jobs I've been putting off is cleaning up the
polygon rasterisation code I stole from cairo, moving it into its own
namespace and fixing up some gross API kludges I made.

The other nuisance is that the nice fast pixel shader based rendering
I've been using and enjoying recently will not necessarily work for
everyone. I have to write some tests to check what functionality is
available - and (if I feel charitable!), write some fall-backs ;).


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread kai-martin knaak
Paul Tan wrote:

 (get-selected-filename) is a Gschem Scheme procedure which
 returns the current page filename as string.

Unfortunately, my gschem segfaults right away, if gschemrc contains the 
(get-selected-filename) procedure. It segfaults even if the line is 
reduced to 
(define name (get-selected-filename))

---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: a different approach to 3D modeling

2010-11-19 Thread Peter Clifton
On Sat, 2010-11-20 at 02:05 +, Peter Clifton wrote:

 Wings3D can export to most if not all the formats I'm interested in, but
 now you make me feel stupid.. I couldn't figure out how to get started
 with it other than opening existing models. Since you say it is newbie
 friendly, I'll go back and try again.

Ok.. so you right click on the canvas to insert and manipulate objects.
I've been using CAD apps deprived of useful mouse context menus for too
long (looks at gEDA and PCB ;)).

I could still go insane quite fast trying to draw a complex model in
Wings3D. I managed a cylinder and something touching it, but found
myself wanting to hurl the computer very readily.

I suppose I've been spoilt coming from a background where the only CAD
I've used is PTC's Pro-Engineer, which has a really nice parametric
sketch editor you can extrude or revolve parts from.

Any real CAD beats tools for graphic designers for objects where you
want to get dimensions accurate I guess.


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: PCB+GL resistor p0rn

2010-11-19 Thread timecop
3D renderings of through-hole components is great and all, but this IS
2010, anyone still using through-hole stuff can just use Fritzing or
something. How about adding relevant features to PCB, like boolean
operations on copper pours that aren't a hack or ... hey, who am I
kidding.

-tc

On Sat, Nov 20, 2010 at 11:18 AM, Peter Clifton pc...@cam.ac.uk wrote:
 On Sat, 2010-11-20 at 03:00 +0100, kai-martin knaak wrote:
 Peter Clifton wrote:

   when PCB+GL+3D lands and users start creating models).
         ^
 I'd love to see PCB+GL enter the main repo rather than wait until
 3D is mature enough, too.

 I've been slowly tinkering with stabilising the code and heading in that
 direction. One of the big jobs I've been putting off is cleaning up the
 polygon rasterisation code I stole from cairo, moving it into its own
 namespace and fixing up some gross API kludges I made.

 The other nuisance is that the nice fast pixel shader based rendering
 I've been using and enjoying recently will not necessarily work for
 everyone. I have to write some tests to check what functionality is
 available - and (if I feel charitable!), write some fall-backs ;).


 --
 Peter Clifton

 Electrical Engineering Division,
 Engineering Department,
 University of Cambridge,
 9, JJ Thomson Avenue,
 Cambridge
 CB3 0FA

 Tel: +44 (0)7729 980173 - (No signal in the lab!)
 Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



 ___
 geda-user mailing list
 geda-user@moria.seul.org
 http://www.seul.org/cgi-bin/mailman/listinfo/geda-user



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread John Doty

On 11/19/2010 07:18 PM, kai-martin knaak wrote:

Paul Tan wrote:

   

(get-selected-filename) is a Gschem Scheme procedure which
returns the current page filename as string.
 

Unfortunately, my gschem segfaults right away, if gschemrc contains the
(get-selected-filename) procedure. It segfaults even if the line is
reduced to
(define name (get-selected-filename))


   
Well, it shouldn't segfault, but I'm not surprised you can't evaluate it 
in gschemrc before there is a selected file. What did you expect to happen?



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread Paul Tan

Hi Kai-Martin Knaak,

Oh, I remember there is a bug in the gschem/src/g_funcs.c file.
You may want to change the get_selected_filename function
in g_funcs.c file, (around line number 299), as follows:

/* 
= */

SCM get_selected_filename(GSCHEM_TOPLEVEL *w_current)
{
  gchar* s;   /* 
Added */

 SCM return_value;

 exit_if_null(w_current);
  s = g_strdup(w_current-toplevel-page_current-page_filename); /* 
Changed */
  return_value = scm_makfrom0str (s); /* 
Changed */
  g_free (s); /* 
Added */
  return return_value;/* 
Changed */

}
/* 
= */


The above change made the (get_selected_filename) work for me.

Hope it helps.

Best Regards,
Paul Tan




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread Paul Tan

Hi Kai-Martin Knaak,

(depending on your email system, some lines in the
code below may be just a long single line. So I am
re-sending with the fix for this. Hope it
comes out ok now)

Oh, I remember there is a bug in the gschem/src/g_funcs.c file.
You may want to change the get_selected_filename function
in g_funcs.c file, around line number 299, as follows:

/* 
= */

SCM get_selected_filename(GSCHEM_TOPLEVEL *w_current)
{
  gchar* s;   /* 
Added */

 SCM return_value;

 exit_if_null(w_current);
  s = g_strdup(w_current-toplevel-page_current-page_filename); /* 
Changed */
  return_value = scm_makfrom0str (s); /* 
Changed */
  g_free (s); /* 
Added */
  return return_value;/* 
Changed */

}
/* 
= */


The above change made the (get_selected_filename) work for me.

Hope it helps.

Best Regards,
Paul Tan



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread kai-martin knaak
John Doty wrote:

 Well, it shouldn't segfault, but I'm not surprised you can't
 evaluate it in gschemrc before there is a selected file. What
 did you expect to happen?

From the doxygen comment:
 *  This function gets the whole filename of the current schematic.
 *  Specifically, the Bpage_filename/B of the current page.
 
---)kaimartin(---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread kai-martin knaak
Paul Tan wrote:

 Hope it helps. 

I still get segfaults. My get_selected_filename procedure
looks like this now:

/---
SCM get_selected_filename(GSCHEM_TOPLEVEL *w_current)
{ 
  gchar* s;
  SCM return_value;
  
  exit_if_null(w_current);
  s = g_strdup(w_current-toplevel-page_current-page_filename);
  return_value = scm_makfrom0str (s);
  g_free (s);
  return (return_value);
}
\

---)kaimartin(
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x6C0B9F53



___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread John Doty

On 11/19/2010 08:59 PM, kai-martin knaak wrote:

John Doty wrote:

   

Well, it shouldn't segfault, but I'm not surprised you can't
evaluate it in gschemrc before there is a selected file. What
did you expect to happen?
 

 From the doxygen comment:
  *  This function gets the whole filename of the current schematic.
   


What's the current schematic at gschem startup, when gschemrc is executed?


  *  Specifically, theBpage_filename/B  of the current page.

---)kaimartin(---
   




___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


gEDA-user: Calling Xspice code models through gnetlist

2010-11-19 Thread clif


Say,

does anyone know how to get spice-sdb or the like to pass non-default port 
types to ngspice for the xspice code models? Most of the standard code 
models default to single ended sources eg. %v(1) where the %v() is 
optional, but often you want a differential input. This means you double 
the number of nets and the syntax can look like this: A1 %vd(1 2) %vd(3 4) 
%vd(5 6) etc... It would be great if you could just abreviate things like: 
A1 %vd(1 2 3 4 5 6) but I guess that's not in the cards right now...


Because then you could add a trailing %vd( to Refdes and prepend a ')' to 
value and you would be set, for the simple case of changing all to 
differential anyway.


Is there a stash of gnetlist guile hacks somewhere?

Thanks,
Clif


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user


Re: gEDA-user: current working file name in gschemrc

2010-11-19 Thread Peter TB Brett
On Friday 19 November 2010 12:22:05 Kai-Martin Knaak wrote:

 I'd like to replace this with the name of the schematic. The lp command can
 set the base name of the file with the option -t. But how would I teach
 gschemrc to automatically fill in the file name of the current schematic?
 Is there some way to access the file name like this:
   (print-command lp -d PDF -t $CURRENTFILENAME)

Hi Kai-Martin,

You will be pleased to hear that this is doable without my Scheme API branch.  
But everything Paul Tan has told you so far has been wrong. :-(

What we're going to do is to override the Scheme function that is called to 
show the print window, so that it first resets the print-command with the 
filename of the current file.

You'll need to add the following to your gschemrc:

  (define %file-print file-print)
  (define (file-print)
(print-command (format #f lp -d PDF -t \~A\ (get-selected-filename)))
(gschem-use-rc-values)
(%file-print))

It is horrible and nasty, but it seems to work.

Regards,

  Peter

-- 
Peter Brett pe...@peter-b.co.uk
Remote Sensing Research Group
Surrey Space Centre


signature.asc
Description: This is a digitally signed message part.


___
geda-user mailing list
geda-user@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user