Welcome! Log In Create A New Profile

Advanced

OpenSCAD help needed

Posted by AgeingHippy 
OpenSCAD help needed
May 30, 2011 06:23AM
Hello All

Can anyone please explain how I can determine the z start and end points of an object, say a cylinder?

If I draw a cylinder with centre=true it seems to draw more of the cylinder at z>0 than it does at z<0??

Any advise would be appreciated.


[edit] seems I was mistaken. The piece I am trying to change consists of a number of cylinders with various translations... hence the centre not being where I expected it.

fwiw - does anyone know of a good resource for openscad scripting documentation/help? Also perhaps a forum of openscad users.

Edited 2 time(s). Last edit at 05/30/2011 06:33AM by AgeingHippy.
Re: OpenSCAD help needed
May 30, 2011 08:01AM
The manual is here: [en.wikibooks.org]

There is a mailing list here: [rocklinux.net]


[www.hydraraptor.blogspot.com]
Re: OpenSCAD help needed
August 27, 2012 07:15AM
Quote
Ageinghippy
fwiw - does anyone know of a good resource for openscad scripting documentation/help? Also perhaps a forum of openscad users.
Perhaps there ought to be an OpenScad sub forum here under Software?
Re: OpenSCAD file import help needed
January 02, 2013 09:28PM
I have been trying unccessfully to import files saved from inkscape as dxf into OpenSCAD.

Help or comments would be appreciate. I have read the manuel.

thanks
Attley abjamestown@yahoo.com
Re: OpenSCAD file import help needed
January 03, 2013 02:25AM
The .scad and .dxf files would let us help you with this problem.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: OpenSCAD file import help needed
January 03, 2013 11:05AM
Bob
Thanks for the response to my query.

I don't know how to include the inkscape .svg or the .dxf file in this document!
If you can advise me on how to do this I'd be glad to send it. It is essentially a
rectangle with a rectangular hole in it and and a truncateded cylinder on top of the rectangle.

The message I get in OpenSCAD is 'no top level geometry to render'
when I try to compile and render the file.

Here is the .scad code.


import(file="C:\Users\ATTLEY\Desktop\test_of_juice_top.dxf");

Thank you

Attley
Re: OpenSCAD file import help needed
January 03, 2013 02:20PM
Look at any of the provided examples (i.e. example007.scad)

You need to extrude the imported file to get any geometry.

-Rob A.
Re: OpenSCAD help needed
January 03, 2013 02:52PM
Thanks to ALL again for responding.

You are right. The new .scad file is:
linear_extrude(height = 100, convexity = 1) import(file="C:\Users\ATTLEY\Desktop\test_of_juice_top.dxf");

and I have attached the .dxf file as well.

The compile error is as shown below and the render output follows.

Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compilation finished.
Compiling design (CSG Products generation)...
ERROR: CSG generation failed! (no top level object found)
PolySets in cache: 2
Polygons in cache: 0
CGAL Polyhedrons in cache: 3
Vertices in cache: 0


Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compilation finished.
Rendering Polygon Mesh using CGAL...
PolySets in cache: 2
Polygons in cache: 0
CGAL Polyhedrons in cache: 3
Vertices in cache: 0
Total rendering time: 0 hours, 0 minutes, 0 seconds
WARNING: No top level geometry to render

Therefore I still do not get any geometry.

As before many and all help appreciated.

As you have probably noted I am new at this and my goal is to design,
model and eventaully print 3D objects. This is just a start.

Attley
Attachments:
open | download - test_of_juice_top.dxf (12.5 KB)
Re: OpenSCAD file import help needed
January 03, 2013 03:21PM
I think there are at least two problems:

1. path names should use unix convention forward slash (/) not backslash
2. your DXF contains a SPLINE which Openscad doesn't handle. You would need to convert the splines to line segments. I think this can be done with Inkscape.

Openscad is quite picky winking smiley
Re: OpenSCAD help needed
January 03, 2013 07:39PM
Bob,Roband Bob

Using input from each of you I have imported the Inkspace .dxf to OpenSCAD
successfully and it compiles with out errors however I do not get any graphics display.

I saved the .scad to the same directory as the .dxf file and imported it.
Then it compileded ok but no graphics. The original .dxf was sved with ' splines' as mentioned and I have changed that to 'line segments'. However the results are the same. The OpenSCAD response is as shown below.

Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compilation finished.
Compiling design (CSG Products generation)...
PolySets in cache: 24
Polygons in cache: 260
CGAL Polyhedrons in cache: 30
Vertices in cache: 308
Compiling design (CSG Products normalization)...
Normalized CSG tree has 1 elements
CSG generation finished.
Total rendering time: 0 hours, 0 minutes, 0 seconds

Polygons in cache: 260
CGAL Polyhedrons in cache: 30
Vertices in cache: 308
Top level object is a 3D object:
Simple: yes
Valid: yes
Vertices: 20
Halfedges: 60
Edges: 30
Halffacets: 24
Facets: 12
Volumes: 2
Total rendering time: 0 hours, 0 minutes, 0 seconds
Rendering finished.

I like the ease withwhich I was able draw and dimension the part in Inkscape and
OpenSCAD is recommended in a lot of the reading I have done but if the curvature
problem is going to be on going I'm open to suggestions for alternate software.

Thanks again everyone but I am still short of the GOAL!

Attley
Attachments:
open | download - test_of_juice_top.dxf (214.6 KB)
Re: OpenSCAD file import help needed
January 04, 2013 05:17AM
Your attached DXF still contains splines!


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: OpenSCAD help needed
January 05, 2013 05:31AM
Opening your DXF file with QCad I see that you have 2 layers, "0" and "Layer_1", you might need to tell OpenSCAD which layer you want to extrude.

From the manual:

import_dxf(file = "example009.dxf", layer = "plate");

Geoff




How often I found where I should be going only by setting out for somewhere else. - R. Buckminster Fuller

[apapageek.com]
Re: OpenSCAD help needed
January 06, 2013 09:13PM
Once again I thank eveyone for their input and I'll be back I'm sure
but for now I have a workable option using Sketchup, where it is easy to
dimension parts/models and import them to MakerWare or RplicatorG
to slice and dice for a 3D Pinter.

Regards
Attley
Sorry, only registered users may post in this forum.

Click here to login