Quantcast

Rendering problems with QCAD-created DXF file (was Re: CSG rendering broken in latest Mac OS X)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rendering problems with QCAD-created DXF file (was Re: CSG rendering broken in latest Mac OS X)

Ethan Dicks
On Tue, Jan 5, 2010 at 4:15 PM, Andrew Plumb <[hidden email]> wrote:
> The DXF import capability is very picky about overlapping lines,
> duplicate shapes, points, etc.

I'm sure.  For one of the elements, I do get a warning about "WARING:
Open paths in dxf_liniear_extrude(file="b3.dxf"..."

(speaking of which, there are a number of typos in diagnostic messages)

I'm not shocked there's an open path - I made that layer of a series
of lines that are *supposed* to snap to the grid, not three
overlapping triangles or some such.

> Are you able to extrude the "M6_Nut.dxf" file in that multinozzle zip
> file I uploaded earlier?  That's drawn in QCad.

It seems so - I see a 4-lobed device with a hollow to capture a hex nut.

I subbed my file in there and got nothing where the nut used to
render.  I have three named layers in my DXF file.  None produce
anything.

I'm attaching the DXF file and the .scad file from my attempts.  What
I'm trying to do is first extrude the 'ellipse1' layer into a
cylinder.  The eventual item would be, say 5mm thick of 'ellipse1',
with a 2.5mm-thick 'ellipse2' carved from it, and a 3mm-thick
'martini' coming out of the hollow from 'ellipse1' - 'ellipse2'.  Not
a horribly complex shape, but I can't get any of the elements to
extrude.

This is with openscad-2009.11.win32, BTW.

Thanks for having a look.

-ethan

b3.dxf (24K) Download Attachment
badge1.scad (267 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rendering problems with QCAD-created DXF file (was Re: CSG rendering broken in latest Mac OS X)

Clifford Wolf
Hi,

On Tue, Jan 05, 2010 at 05:14:58PM -0500, Ethan Dicks wrote:
> On Tue, Jan 5, 2010 at 4:15 PM, Andrew Plumb <[hidden email]> wrote:
> > The DXF import capability is very picky about overlapping lines,
> > duplicate shapes, points, etc.
>
> I'm sure.  For one of the elements, I do get a warning about "WARING:
> Open paths in dxf_liniear_extrude(file="b3.dxf"..."

The layers "ellipse1" and "ellipse2" both only contain asingle ellipse
entity. When trying to extrude those you should get an error
message like:

        WARNING: Unsupported DXF Entity `ELLIPSE' (1x) in layer `ellipse2' of `b3.dxf'.

A (clean) patch for dxfdata.cc to also support the DXF ELLIPSE entity would
be welcome.

The layer "martini" produces the follwing error messages:

        WARING: Open paths in dxf_liniear_extrude(file = "b3.dxf", layer = "martini"):
            15.83700  -11.02500 ...   14.21700  -19.26200
            14.40000  -18.98700 ...   16.00000  -11.00000

Just zoom to the coordinates 15.83700 / -11.02500 and 14.21700 / -19.26200
and you will see that there is a line in your dxf that does not correctly
connect to the other lines of the path.

A pitfall with this is that OpenSCAD caches the results of parsing a DXF
file. So you will see the error message only the first time you compile the
design. When you recompile it there won't be an error message unless the
timestamp and/or size of the DXF file has been changed.

> (speaking of which, there are a number of typos in diagnostic messages)

patches (or simple lists with corrections) are very welcome.  ;-)

yours,
 - clifford

--
"I think I left it in the basement. I'll go upstairs and get it."
 - M.C. Escher

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rendering problems with QCAD-created DXF file (was Re: CSG rendering broken in latest Mac OS X)

Ethan Dicks
On Tue, Jan 5, 2010 at 10:09 PM, Clifford Wolf <[hidden email]> wrote:
> Hi,

Thanks for taking the time to have a look.

> The layers "ellipse1" and "ellipse2" both only contain asingle ellipse
> entity. When trying to extrude those you should get an error
> message like:
>
>        WARNING: Unsupported DXF Entity `ELLIPSE' (1x) in layer `ellipse2' of `b3.dxf'.

I have seen that error but it wasn't consistent (see below).

> A (clean) patch for dxfdata.cc to also support the DXF ELLIPSE entity would
> be welcome.

I don't know if I understand the environment well enough, but I'm
willing to at least look at the code.  I won't be able to build it to
test changes anytime soon though, due to limitations in what
environments I have to work with right now.

> The layer "martini" produces the follwing error messages:
>
>        WARING: Open paths in dxf_liniear_extrude(file = "b3.dxf", layer = "martini"):
>            15.83700  -11.02500 ...   14.21700  -19.26200
>            14.40000  -18.98700 ...   16.00000  -11.00000
>
> Just zoom to the coordinates 15.83700 / -11.02500 and 14.21700 / -19.26200
> and you will see that there is a line in your dxf that does not correctly
> connect to the other lines of the path.

I suspected as much, but I didn't "see" anything when I looked it over
in QCAD.  I certainly was _trying_ to make a closed path.  I'll see
what I can do to close that shape up and play with extruding that.

> A pitfall with this is that OpenSCAD caches the results of parsing a DXF
> file. So you will see the error message only the first time you compile the
> design. When you recompile it there won't be an error message unless the
> timestamp and/or size of the DXF file has been changed.

That makes sense from what I've observed - I occasionally saw errors,
but couldn't pin down how/where/when.

>> (speaking of which, there are a number of typos in diagnostic messages)
>
> patches (or simple lists with corrections) are very welcome.  ;-)

That I'm sure I can help with.  I can do context diffs easily.  Should
I post them or send them to you directly or is there another preferred
technique?

Thanks,

-ethan

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rendering problems with QCAD-created DXF file (was Re: CSG rendering broken in latest Mac OS X)

Clifford Wolf
Hi,

On Tue, Jan 05, 2010 at 10:19:15PM -0500, Ethan Dicks wrote:
> > A (clean) patch for dxfdata.cc to also support the DXF ELLIPSE entity would
> > be welcome.
>
> I don't know if I understand the environment well enough, but I'm
> willing to at least look at the code.  I won't be able to build it to
> test changes anytime soon though, due to limitations in what
> environments I have to work with right now.

There is a good chance that marius will implement this soon..

> > A pitfall with this is that OpenSCAD caches the results of parsing a DXF
> > file. So you will see the error message only the first time you compile the
> > design. When you recompile it there won't be an error message unless the
> > timestamp and/or size of the DXF file has been changed.
>
> That makes sense from what I've observed - I occasionally saw errors,
> but couldn't pin down how/where/when.

I've adding caching for error messages along with the synthesis results to
the todo list.

> That I'm sure I can help with.  I can do context diffs easily.  Should
> I post them or send them to you directly or is there another preferred
> technique?

diffs mailed to this list would be perfect.

yours,
 - clifford

--
there's no place like 127.0.0.1
until we found ::1 -- which is even bigger

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rendering problems with QCAD-created DXF file (was Re: CSG rendering broken in latest Mac OS X)

clothbot
In reply to this post by Ethan Dicks
Hey Ethan,

In QCAD the Select Contour [tc] command is handy for catching open  
paths and their location.  Then you can use the Trim [tm] command to  
join things up.

See the attached b3.dxf for the fixed martini part.

Andrew.



On 5-Jan-10, at 10:19 PM, Ethan Dicks wrote:

> On Tue, Jan 5, 2010 at 10:09 PM, Clifford Wolf  
> <[hidden email]> wrote:
>> Hi,
>
> Thanks for taking the time to have a look.
>
>> The layers "ellipse1" and "ellipse2" both only contain asingle  
>> ellipse
>> entity. When trying to extrude those you should get an error
>> message like:
>>
>>        WARNING: Unsupported DXF Entity `ELLIPSE' (1x) in layer  
>> `ellipse2' of `b3.dxf'.
>
> I have seen that error but it wasn't consistent (see below).
>
>> A (clean) patch for dxfdata.cc to also support the DXF ELLIPSE  
>> entity would
>> be welcome.
>
> I don't know if I understand the environment well enough, but I'm
> willing to at least look at the code.  I won't be able to build it to
> test changes anytime soon though, due to limitations in what
> environments I have to work with right now.
>
>> The layer "martini" produces the follwing error messages:
>>
>>        WARING: Open paths in dxf_liniear_extrude(file = "b3.dxf",  
>> layer = "martini"):
>>            15.83700  -11.02500 ...   14.21700  -19.26200
>>            14.40000  -18.98700 ...   16.00000  -11.00000
>>
>> Just zoom to the coordinates 15.83700 / -11.02500 and 14.21700 /  
>> -19.26200
>> and you will see that there is a line in your dxf that does not  
>> correctly
>> connect to the other lines of the path.
>
> I suspected as much, but I didn't "see" anything when I looked it over
> in QCAD.  I certainly was _trying_ to make a closed path.  I'll see
> what I can do to close that shape up and play with extruding that.
>
>> A pitfall with this is that OpenSCAD caches the results of parsing  
>> a DXF
>> file. So you will see the error message only the first time you  
>> compile the
>> design. When you recompile it there won't be an error message  
>> unless the
>> timestamp and/or size of the DXF file has been changed.
>
> That makes sense from what I've observed - I occasionally saw errors,
> but couldn't pin down how/where/when.
>
>>> (speaking of which, there are a number of typos in diagnostic  
>>> messages)
>>
>> patches (or simple lists with corrections) are very welcome.  ;-)
>
> That I'm sure I can help with.  I can do context diffs easily.  Should
> I post them or send them to you directly or is there another preferred
> technique?
>
> Thanks,
>
> -ethan
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
--

"The future is already here.  It's just not very evenly distributed"  
-- William Gibson




b3.dxf (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rendering problems with QCAD-created DXF file (was Re: CSG rendering broken in latest Mac OS X)

Ethan Dicks
On Wed, Jan 6, 2010 at 12:09 AM, Andrew Plumb <[hidden email]> wrote:
> Hey Ethan,
>
> In QCAD the Select Contour [tc] command is handy for catching open paths and
> their location.  Then you can use the Trim [tm] command to join things up.

I'll look into those.  I still have to tweak the angles slightly.

> See the attached b3.dxf for the fixed martini part.

Yes!  That's great!  I just got a gorgeous extrusion from that.  A
couple of ellipses from now and it should look perfect.

Thank you for the assistance!

-ethan

Loading...