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=BtQ4yOo1oKD+SeRuc1jVV32rlbv9TGLU0m6JUk7FivI=; b=Cke1Xz1QxPU4GB2Ocd1yEsYFF+FNmt7RL8iKD/bVWs4yXGbMb/KuHN2enL7lfOQ5bp XGEwG6+61Z49le6IN8Iw2gza1dvjLVzgid0XXa6TF0xJ/mQ5tKRFynkbJiZKu0zHpQ+n EPpvXE8ig7pgf67v4qkR7faxtPtqfrN4ZH3hky96FyCQYTabKjbeO5pr31McP6mFByuy RS90uX5/EC59z5OxxKi2k0tbdwXPPXEns32JzOTisDMiV3AuOhvTBXv/JZ6D+ZATn4HY rv0abry5t5GnB6tjFD+PIA/5zvYoYjaVz71sOKBmaX3QtCuGanRYvRAMzuI1zF9yzIog gsJw== MIME-Version: 1.0 X-Received: by 10.180.212.52 with SMTP id nh20mr11081056wic.2.1416452746161; Wed, 19 Nov 2014 19:05:46 -0800 (PST) In-Reply-To: References: <5468E8B2 DOT 9090604 AT prochac DOT sk> <546A6A3F DOT 3040606 AT xs4all DOT nl> <20141117233312 DOT 17d7d4a8 AT jive DOT levalinux DOT org> Date: Thu, 20 Nov 2014 08:35:46 +0530 Message-ID: Subject: Re: [geda-user] PCB and 3D Views From: Shashank Chintalagiri To: geda-user AT delorie DOT com Content-Type: text/plain; charset=UTF-8 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 I had some free time last night and took a look at the export filters on LP699502. Here are some observations : - My usual workflow for obtaining a 3D model of a PCB is : (a) Export ps from pcb in multifile. (b) Convert ps to dxf using "pstoedit -f dxf .top.ps .dxf (c) Import dxf into a sketch in solidworks (d) Extrude PCB from a sketch overlapping the outline (c) Cut out the necessary mounting holes and just enough pins to be able to assemble the mecahnically significant components (connectors, etc) - Using export to "OpenSCAD" (Bert's exporter), (a) I get a syntax error. "Parser error in line 1514: syntax error", with the following line highlighted: "include ". I did a git checkout on files that changed while I was looking though the models, but that doesn't seem to have helped. (b) From glancing through the comments in the code, it seems to me like this only generates a model with a rectangular PCB outline. This is a showstopper. (c) I have so far only been trying to get the unpopulated PCB in 3D so far, and combined with the syntax error I haven't really paid much attention to the ability to import models. I like the approach used by this exporter for handling models, though there are various quirks which probably will need me to make code-level changes to make it work with my setup. These have to do with footprint naming conventions and matching the footprint and model origins. It would be nice to have a offset that can be written into to the model to specify the offset from the footprint origin. - 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. (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). (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). (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. (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. (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. On Tue, Nov 18, 2014 at 11:29 PM, Britton Kerin wrote: > On Mon, Nov 17, 2014 at 1:33 PM, Levente Kovacs wrote: >> On Mon, 17 Nov 2014 22:35:59 +0100 >> Bert Timmerman wrote: >> >>> Short-comings, weak points, strong points: are all very valuable, so >>> we can iron out them flaws and improve pcb. >> >> I checked out your branch, and I think it is super cool! >> >> I have the following questions: >> >> * Is there any support for 3D models of a component? >> * If yes, how can make your exporter find the models? >> * It renders plated holes as copper areas. Is this intentional? >> * Unplated holes rendered as copper covered by something. >> * the 0 point of the layout is the 0 point of the PCB file which is IMHO >> not the best way. I would make it the center of the outline. > > I would think it would be better to have them agree, at least as far as > displayed coordinates are concerned. If you need to pick a different > point as the default center for rotation or something that's ok. > > Britton -- Chintalagiri Shashank Indian Institute of Technology, Kanpur http://blog.chintal.in