Search found 2787 matches

by shoogen
Thu Mar 01, 2012 9:54 am
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 48393

Re: Import CSG files from OpenSCAD.

It looks like the RepRap software aims to import csg-files directly. http://reprap.org/wiki/Mendel_User_Manual:_Host_Software#Using_CSG https://github.com/reprap/host/tree/master/src/org/reprap/geometry They seem not to shoot for the really complex operations either. So far the supported OpenSCAD pr...
by shoogen
Wed Feb 29, 2012 6:48 pm
Forum: Developers corner
Topic: Bug or feature?
Replies: 42
Views: 11482

Re: Bug or feature?

Part.makePolygon() takes a list of tuples but does not accepts a list of lists: Part.makePolygon([(0,0,1),(0,1,0)]) works Part.makePolygon([[0,0,1],[0,1,0]]) does not work. Calling tuple() on Vectors works, so using tuple() in my code doesn't break anything. But the error message in case of an list ...
by shoogen
Wed Feb 29, 2012 2:41 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 48393

Re: Import CSG files from OpenSCAD.

typical one liner :) def polyhedron(points,faces,mksolid=True): '''creates a Polyhedron. returns a solid shape points is a list of lists/tuples/vectors (ressembling the Vetrices) faces is a list of lists/tuples referencing points from the points list to be using for each planar face''' shell=Part.Sh...
by shoogen
Wed Feb 29, 2012 8:08 am
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 48393

Re: Import CSG files from OpenSCAD.

What you need is to define a grammar for the SCAD file I found the following grouping statements for the 'subset' { } means only if applicable cgaladv.cc minkowski(convexity =) cgaladv.cc glide(path =) cgaladv.cc subdiv(level =) cgaladv.cc hull() color.cc color([r, g, b, a]) csgops.cc union() csgop...
by shoogen
Tue Feb 28, 2012 4:22 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 48393

Re: Import CSG files from OpenSCAD.

So I think it fair to say CSG is a subset without some of the language features like functions etc it seems to bee a dump of thier in memory tree structure. As there is practicaly no documentaion on this subset, we might have to get through every 'toString()' Method in OpenSCAD. cgaladv.cc color.cc...
by shoogen
Tue Feb 28, 2012 3:44 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 48393

Re: Import CSG files from OpenSCAD.

keithsloan52 wrote: Thats the OpenSCAD language. I am going to try and import CSG file which is not the same thing.
I'm sorry I don't see the difference.
by shoogen
Tue Feb 28, 2012 9:37 am
Forum: Developers corner
Topic: Adding ability to process OpenSCAD files.
Replies: 14
Views: 3564

Re: Adding ability to process OpenSCAD files.

I'd recommend to so this in python. There is some info in the Wiki and in the source of src/Mod/TemplatePyMod. But i would recomment to look at the sourcecode of an existing import function. In src/Mod/Draft you will find the Draft Module. It includes the import functions for DXF files. As DXF impor...
by shoogen
Tue Feb 28, 2012 7:04 am
Forum: Developers corner
Topic: Adding ability to process OpenSCAD files.
Replies: 14
Views: 3564

Re: Adding ability to process OpenSCAD files.

I have thought about 3 ways. 1. Render a STL-File, import and work on the mesh. (should work out of the box; mentioned above) 2. Parse the OpenSCAD file and create a static BRep structure. (no tessellation of circles) 2a. Parse the OpenSCAD file and use FreeCAD Parametric objects. 3. Parse the OpenS...
by shoogen
Fri Feb 24, 2012 3:30 pm
Forum: Developers corner
Topic: face union
Replies: 142
Views: 25327

Re: face union

Would the following do the job?

Code: Select all

git checkout tanderson-merge-faceunioncylindrical
git pull --rebase master
git push
EDIT:
this just does the rebase
you still have to apply it to the master

Code: Select all

checkout master
merge tanderson-merge-faceunioncylindrical