Search found 961 matches

Go to advanced search

by keithsloan52
Sat Mar 24, 2012 9:29 am
Forum: Developers corner
Topic: Export FreeCAD to OpenSCAD CSG.
Replies: 28
Views: 3760

Re: Export FreeCAD to OpenSCAD CSG.

Yes I corrected the float bug when you mentioned it. Relevant bits of ExportCSG.py here ( The forum won't let me upload a py ot txt file ) def vector2d(v): return [v[0],v[1]] def vertexs2polygon(vertex): pointstr=','.join(['[%f, %f]' % tuple(vector2d(v.Point)) for v in vertex]) return 'polygon ( poi...
by keithsloan52
Sat Mar 24, 2012 5:50 am
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 24655

Re: Import CSG files from OpenSCAD.

Questions for shoogen. I see you have code for fustrum both a Class and a Loft implementation and currently the loft implementation is enabled. Surely there is a disadvantage for the loft version in that it exposes two polygons that the user can edit and if they change the number of sides to be diff...
by keithsloan52
Fri Mar 23, 2012 11:40 pm
Forum: Developers corner
Topic: Export FreeCAD to OpenSCAD CSG.
Replies: 28
Views: 3760

Re: Export FreeCAD to OpenSCAD CSG.

Okay I am now outputing the vertexes for the wire, but they all look as though they need scaling. They are floating point numbers // CSG file generated from FreeCAD Export 0.1c group() { group(){ linear_extrude(height = 20.0, center = true, convexity = 10, twist = 0, slices = 2, $fn = 0, $fa = 12, $...
by keithsloan52
Fri Mar 23, 2012 11:31 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 24655

Re: Import CSG files from OpenSCAD.

Agreed it needs some documentation that states that $fn=0 get converted to circle, cylinder etc and $fn != 0 is converted to polygon.
Plus it needs some documentation in general.
by keithsloan52
Fri Mar 23, 2012 6:24 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 24655

Re: Import CSG files from OpenSCAD.

I had a relook at the OpenSCAD documentation and if I was intending on creating somethings with a circle I would code $fn=0 or let it default If I knew I wanted a polygon I would code $fn=value where value is the number of sides of the regular polygon. If I wanted to control the actual accuracy that...
by keithsloan52
Fri Mar 23, 2012 6:08 pm
Forum: Developers corner
Topic: Export FreeCAD to OpenSCAD CSG.
Replies: 28
Views: 3760

Re: Export FreeCAD to OpenSCAD CSG.

Okay I have an extruded polygon. FreeCAD has the polygon as a Wire.

Any ideas how I access the vertix of the Wire?
Are they held in the Shape and again how do I access.
Or do I have to convert to a mesh?
by keithsloan52
Fri Mar 23, 2012 5:35 pm
Forum: Developers corner
Topic: App.FeaturePython has no attribute start.
Replies: 0
Views: 591

App.FeaturePython has no attribute start.

I have a file that I created with verion 12 ( Could not create it in latest 13 as bugs). Its basically a polygon ( wire ) that has been extruded. When I load the file into version 13. I get an error message onChange ( Wire ) App.FeaturePython has no attribute start. otherwise file seems to load okay...
by keithsloan52
Fri Mar 23, 2012 4:58 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 24655

Re: Import CSG files from OpenSCAD.

trying to import as closely to the OpenSCAD spec as possible was the goal. Not my goal or intent My motivation is that lots of people in the RepRap community use OpenSCAD. OpenSCAD is basically 3D programming. I want to be able to take an OpenSCAD design and load it into a 3D CAD package so that I ...
by keithsloan52
Fri Mar 23, 2012 4:47 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 24655

Re: Import CSG files from OpenSCAD.

Maybe I need some dialog box for the user to set a value under which things get treated as polgons and over the value as circles.
Probably better as a parameter in the parameter editor.
Which raises the question Can one add custom parameters to the parameters editor and if so how do you code this.
by keithsloan52
Fri Mar 23, 2012 4:41 pm
Forum: Developers corner
Topic: Import CSG files from OpenSCAD.
Replies: 207
Views: 24655

Re: Import CSG files from OpenSCAD.

Keith, unfortunately the handling of $fn = 0 to give a real circle is not OpenSCAD's behavior. In fact OpenSCAD doesn't seem to have the ability to make a real circle? Importing to FreeCAD is noticeably faster using real circles that a 100-sided prism though, even for my simple shape, so I wonder i...

Go to advanced search