{"action":"created","issue":{"url":"https://api.github.com/repos/KiCad/kicad-library/issues/186","labels_url":"https://api.github.com/repos/KiCad/kicad-library/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/KiCad/kicad-library/issues/186/comments","events_url":"https://api.github.com/repos/KiCad/kicad-library/issues/186/events","html_url":"https://github.com/KiCad/kicad-library/issues/186","id":72299983,"number":186,"title":"Do you accept 3d model files other than wings and wrl?","user":{"login":"hyOzd","id":1479166,"avatar_url":"https://avatars.githubusercontent.com/u/1479166?v=3","gravatar_id":"","url":"https://api.github.com/users/hyOzd","html_url":"https://github.com/hyOzd","followers_url":"https://api.github.com/users/hyOzd/followers","following_url":"https://api.github.com/users/hyOzd/following{/other_user}","gists_url":"https://api.github.com/users/hyOzd/gists{/gist_id}","starred_url":"https://api.github.com/users/hyOzd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyOzd/subscriptions","organizations_url":"https://api.github.com/users/hyOzd/orgs","repos_url":"https://api.github.com/users/hyOzd/repos","events_url":"https://api.github.com/users/hyOzd/events{/privacy}","received_events_url":"https://api.github.com/users/hyOzd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/KiCad/kicad-library/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2015-04-30T22:32:13Z","updated_at":"2015-08-06T15:39:01Z","closed_at":null,"body":"Do you accept Freecad or Blender as source format for 3d models? I have a couple models that I would like to contribute.\r\n\r\nAlso do you accept X3D instead of wrl? Asking this, because blender cannot export to wrl format and it seems kicad works fine with X3D."},"comment":{"url":"https://api.github.com/repos/KiCad/kicad-library/issues/comments/128412992","html_url":"https://github.com/KiCad/kicad-library/issues/186#issuecomment-128412992","issue_url":"https://api.github.com/repos/KiCad/kicad-library/issues/186","id":128412992,"user":{"login":"hyOzd","id":1479166,"avatar_url":"https://avatars.githubusercontent.com/u/1479166?v=3","gravatar_id":"","url":"https://api.github.com/users/hyOzd","html_url":"https://github.com/hyOzd","followers_url":"https://api.github.com/users/hyOzd/followers","following_url":"https://api.github.com/users/hyOzd/following{/other_user}","gists_url":"https://api.github.com/users/hyOzd/gists{/gist_id}","starred_url":"https://api.github.com/users/hyOzd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyOzd/subscriptions","organizations_url":"https://api.github.com/users/hyOzd/orgs","repos_url":"https://api.github.com/users/hyOzd/repos","events_url":"https://api.github.com/users/hyOzd/events{/privacy}","received_events_url":"https://api.github.com/users/hyOzd/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T15:39:01Z","updated_at":"2015-08-06T15:39:01Z","body":"@easyw I was going to talk about this soon. Thanks for calling me out :) \r\n\r\nCreating parametric files in FreeCAD, at least the way I did has some problems. First let me describe you my method:\r\n\r\n1. I draw a part using FreeCAD, I use parametric features as much as possible. Such as 'array' tool from \"Draft\" workbench\r\n2. I label some of those features (such as array tool) with a special syntax\r\n3. Using a small script, I change the parameters of those specifically labelled features to my needs. For example I draw a 4 pin header leveraging the array tool, then I use a script to change all '4's to '8', and now I have a 8 pin header.\r\n\r\nWhat's the problem? Well, FreeCAD is not smart enough. For example if I try to apply fillet to the top face of a cube, after I updated the size of cube, fillet may be broken. When the shape changes, FreeCAD cannot determine the correct face to apply the fillet. It doesn't have all the features to be a truly parametric modeller.\r\n\r\nI see a couple solutions to this; \r\n\r\n1. use only the tools that can be altered without side effects, avoid tools such as fillet\r\n2. use FreeCAD's Python API to draw the shape from scratch. Can be hard to design a model this way, and it's harder to maintain\r\n3. do the first option first, draw without problematic tools, then use pyhon APIs to add extra detail. I just don't like this idea. It's too complicated.\r\n\r\n----\r\n\r\nBut I would like to present to you another alternative: [cadquery](https://github.com/dcowden/cadquery/)\r\n\r\n> CadQuery is an intuitive, easy-to-use python based language for building parametric 3D CAD models\r\n\r\nIf you have heard of OpenSCAD, this is a similar tool. It's just that this one is a python library and has a syntax inspired by jQuery. At the moment, cadquery uses FreeCAD as its underlying 3D modelling engine. \"In theory\" it can do anything that FreeCAD is capable of. \r\n\r\nI must say, designing a detailed part using cadquery is not very easy compared to a visual tool. But if you compare it to FreeCAD's python API it's a much saner option. \r\n\r\n[Here](https://bitbucket.org/hyOzd/freecad-macros/src/e85defa66322bad7f2ef5df6fac17b5e94268eb8/make_pinheaders.py?at=master) is a cadquery script that I have created to model all the pin headers ranging from 1 to 40 pins. You want 80 pins? No problem. It even uses parallel processes to reduce build time. Note that my script generates X3D mesh files. Cadquery supports STEP export, but I haven't tried that yet. I will try that as soon as possible.\r\n\r\nI have more examples; [a qfp part generator](https://bitbucket.org/hyOzd/freecad-macros/src/e85defa66322bad7f2ef5df6fac17b5e94268eb8/make_qfp.py?at=master), [a DIP part generator](https://bitbucket.org/hyOzd/freecad-macros/src/e85defa66322bad7f2ef5df6fac17b5e94268eb8/make_dip.py?at=master) .\r\n\r\nIf you want to see the end results of these scripts right now, you can look at these blender files. Note that some of them are modified by hand just a little bit;\r\n\r\n* [pinheaders.blend](https://bitbucket.org/hyOzd/pcb2blender-models/src/6f11d961ec0006f09d925a60d02bbf74aeb5093a/pinheaders.blend?at=master)\r\n* [dip.blend](https://bitbucket.org/hyOzd/pcb2blender-models/src/6f11d961ec0006f09d925a60d02bbf74aeb5093a/dip.blend?at=master)\r\n* [qfp.blend](https://bitbucket.org/hyOzd/pcb2blender-models/src/6f11d961ec0006f09d925a60d02bbf74aeb5093a/qfp.blend?at=master)\r\n\r\nSome notes/disclaimers:\r\n* Although creating cadquery scripts can be hard at first, reuse rate can be really high. Especially in the case of plastic IC packages. For example the code that I've used to draw the plastic part of the DIP and QFP models is almost the same. It's not the same, just because I was lazy.\r\n* cadquery is an experimental/under development software. It uses FreeCAD as its engine which is also under heavy development itself. But then again, KiCAD is not very stable either :)\r\n* I haven't tested the STEP export. I'm not sure if it can handle multicolored parts.\r\n* Cadquery doesn't have capability to export X3D. I use [my own X3D export script](https://bitbucket.org/hyOzd/freecad-macros/src/e85defa66322bad7f2ef5df6fac17b5e94268eb8/export_x3d.py?at=master). This scripts generates a very pure output but it's not accepted by KiCAD although its valid X3D file. Can be easily fixed though.\r\n\r\nI'm already on my way to creating more generator scripts. But I could use some help. Gathering the parameters for different variations, testing and making sure that all works without problems takes most of the time. I could use some help in that regards."}}