www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/11/20/12:13:48

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-SourceIP: 85.216.233.42
Message-ID: <546E211E.7090202@prochac.sk>
Date: Thu, 20 Nov 2014 18:13:02 +0100
From: Milan Prochac <milan AT prochac DOT sk>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] PCB and 3D Views
References: <CALT8Ef7W0XRHeXUEtLQyGJmWsUQ7PWgF3S+PjfcvbfmjDzwfqw AT mail DOT gmail DOT com> <5468E8B2 DOT 9090604 AT prochac DOT sk> <m4dkif$dt2$1 AT ger DOT gmane DOT org> <546A6A3F DOT 3040606 AT xs4all DOT nl> <20141117233312 DOT 17d7d4a8 AT jive DOT levalinux DOT org> <CAC4O8c-U+zN=DvCATY9CJ1i5mZcGt=GcpTPUsJxoaJTJP0L6og AT mail DOT gmail DOT com> <CALT8Ef6Aw-gd7hnySYBRazOBLhpMvMeBauyKiGiaundFNQSHog AT mail DOT gmail DOT com>
In-Reply-To: <CALT8Ef6Aw-gd7hnySYBRazOBLhpMvMeBauyKiGiaundFNQSHog@mail.gmail.com>
X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham
version=3.3.2
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on samuel.doma.local
Reply-To: geda-user AT delorie DOT com

On 11/20/2014 4:05 AM, Shashank Chintalagiri wrote:
> I had some free time last night and took a look at the export filters
> on LP699502. Here are some observations :
>
>
>   - Using export to "scad" (Milan's exporter).
>     (a) Export seems to work fine at a basic level (again, I only know
> about the bare PCB. I have not yet looked at component models and how
> they are picked up. It isn't obvious to me at this point how the
> exporter finds the models, but that's likely because I haven't really
> looked for any substantial documentation besides just briefly skimming
> through the code.
The newer version ot this exporter is available - see my another mail in 
this tread. It contains sample models, small example and documentation.

>     (b) I export with Silkscreen (green), all pins and pads with gold
> plating, no copper otherwise, and with outline as outline layer.
>     (c) Opening the resulting .scad file on openscad produces a very
> nice image at first glance for small, simple PCBs.
>
>   - SCAD workflow (Milan's exporter, possibly even Bert's, though I
> didn't get as far with Bert's so I don't know)
>     (a) The SCAD that is generated opens on openSCAD for small, simple
> PCBs. This render is pretty, nice, and correct, though not
> particularly useful in that format.
>     (b) Complicated PCBs don't seem to be rendered immediately on
> opening openSCAD for some reason. As an aside, complicated PCBs won't
> even compile without increasing the maximum number to elements to
> render from the default 2000 (I increased it to 100000. The PCB I'm
> using seems to have about 18000 or so).

The copper, silk and mask generates huge amount of objects - but that is 
the way, how the PCB's export HID works. To make it more efficient means 
to reinvent the "drawing engine".

For the mechanical modelling purposes you do not need copper, silk and 
mask - just deselect them in exporter's dialog.

>     (c) Compiling the file to CGAL (F6) (which is necessary to be able
> to export to STL, DXF) takes forever. It took 41 minutes on a small,
> rectangular 4 cm2 PCB with less than 10 components on it on my machine
> (i7, 4G RAM). The limiting resource seems to be RAM. The larger PCB is
> still compiling, many hours now, and has been stuck on 92/100 for
> atleast 2 (though there is still the occasional scroll in the log, so
> it isn't actually stuck).
Same as above - you do not need copper, silk and mask.

>     (d) Once compiled, for some reason, all the colors seem to be
> messed up. The majority of the surface of the model shows up as gold.
> The interior surfaces of the plated drills seem to be green, or
> atleast there's a few slivers of green visible.
AFAIK the colors are not part of 3D  interchange formats mentioned here, 
I have read about some proprietary color extensions to STL.... but I am 
not expert in that area. But this is probably the reason why  generated 
design does not contain the colors.

On the other side, the colored preview mode is sufficient to get feeling 
about the assembled board look.

>     (e) FreeCAD always takes an indefinite amount of time to open the
> openSCAD directly. Even the small PCB. I gave it about an hour or so
> and gave up. This is after selecting maximum number of edges in
> polylines to 6.
>     (f) FreeCAD imports the STL in a reasonable length of time -
> relatively instantaneously. However, the STL imported is devoid of all
> color information. It shows up just as a block of grey. When I change
> the display to wireframe I see all the necessary elements are there -
> even the text on the silk. They're all the same color, though, so
> aren't immediately visible. I should note that the exported STL was
> from a compile which resulted in a render with already messed up
> colors. It's possible that the problem lies there and not in the
> import.
The same as above.
>     (g) Export to CSG from openSCAD is quick. Import of CSG to freeCAD
> is again infinitely long. I have not seen it complete.
>
> - Given these observations, I think SCAD may not be the correct format
> to be attempting to do this in. The only real advantage I see with
> SCAD is interoperability with the limited SCAD environment. From the
> technical perspective, having a full mesh _may_ make vibration and/or
> thermal simulations nicer, but that's going to need a whole lot of
> work to model the solder joints and so forth. IDF may indeed be a
> better bet, with IDF-SCAD conversions scripted outside of PCB. We're
> not talking about real-time 3D renders within PCB anyway - which is
> what openSCAD and similar native 3D formats would afford us. Since
> we're only really taking component placement information from PCB and
> providing everything else externally, it's probably easier (and
> cleaner) to formalize that relationship in IDF.
>

All these discussion are about the same - about the unisex, "one size 
fits all" 3D export format. Similar to looking for philosopher's stone, 
and with the same result: huge NOTHING.

IMO there is no universal 3D format - requirements are very different 
for various use cases. On the one side is mechanical modelling - the 
monochromatic board shape with simplified component models (possibly 
simple bounding boxes) will suffice. On the other side is 3D model for 
presentation or publication purposes - more details, color, realistic 
look is desired. Somewhere in the middle is 3D model as design aid to 
get feeling about the final board lookout - colors and medium details 
are necessary.

The OpenSCAD is not ideal - but it is real piece of code. It can be used 
for mechanical modelling (simple models, no copper, silk and mask, 
export into STL or directly in OpenSCAD), in preview mode it can be used 
to review the board and produce low quality pictures for publication 
pictures.

Why we need just one 3D export filter? Why we cannot have more 3D export 
filters? The endless discussions about universal 3D format without any 
real lines of code do not move the PCB forward.

The OpenSCAD export filter was implemented 15 months ago - the further 
development was cancelled because PCB core developers claimed that some 
other (STEP?) export is under development and OpenSCAD export will be 
obsoleted soon. After 15 months we have NOTHING.

Milan




- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019