Skip Menu |

This queue is for tickets about the CAD-Drawing CPAN distribution.

Report information
The Basics
Id: 57701
Status: open
Priority: 0/
Queue: CAD-Drawing

People
Owner: Nobody in particular
Requestors: schroete [...] iup.physik.uni-bremen.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Error in load() and save() function.
Date: Fri, 21 May 2010 10:29:55 +0200
To: bug-CAD-Drawing [...] rt.cpan.org
From: Heiko Schröter <schroete [...] iup.physik.uni-bremen.de>
Hello Eric, using the CAD::Drawing module i get IO Errors when calling $drw->load or $drw->save. Example (from CAD::Drawing module): #!/usr/bin/perl -w use strict; eval "use CAD::Drawing"; if($@) { print "CAD::DRAWING not found.\n"; exit; } my $drw = CAD::Drawing->new; # $drw->load("/tmp/file.dxf"); my %opts = ( layer => "smudge", height => 5, ); $drw->addtext([10, 2, 5], "Kilroy was here", \%opts); $drw->save("file.ps"); The file "/tmp/file.dxf" exists and is a valid dxf file from qcad. Either way, loading or saving does not work and gives the following error: Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/site_perl/5.8.8/CAD/Drawing/IO.pm line 392. could not save file.ps as type: at cad_draw.pl line 20 As fas as i can see the $type var at line 392 is not set. Is this a bug or what do i miss ? All related and dependent packages for CAD::Drawing are downloaded and installed today, latest versions. Perl: v5.8.8 CAD-Calc-0.27 Math-MatrixReal-2.05 Math-Geometry-Planar-GPC-1.04 Stream-1.00 CAD-Drawing-0.26 Math-Round-Var-v1.0.0 Math-Geometry-Planar-Offset-1.05 YAML-0.71 Math-Geometry-Planar-1.17 Math-Vec-1.01 Thanks and Regards Heiko -- ----------------------------------------------------------------------- Dipl.-Ing. Heiko Schröter Institute of Environmental Physics (IUP) phone: ++49-(0)421-218-62092 Institute of Remote Sensing (IFE) fax: ++49-(0)421-218-4555 University of Bremen (FB1) P.O. Box 330440 email: schroete@iup.physik.uni-bremen.de Otto-Hahn-Allee 1 28359 Bremen Germany -----------------------------------------------------------------------
Subject: Re: [rt.cpan.org #57701] Error in load() and save() function.
Date: Fri, 21 May 2010 16:37:54 -0700
To: bug-CAD-Drawing [...] rt.cpan.org
From: Eric Wilhelm <enobacon [...] gmail.com>
# from Heiko Schröter via RT # on Friday 21 May 2010 01:30: Show quoted text
>$drw->save("file.ps");
Hi Heiko, I seem to recall that this needs to be called as $drw->save("file.ps", {type => 'ps'}); I don't think there's any support for file extension detection in the save() process. Thanks, Eric -- "Matter will be damaged in direct proportion to its value." --Murphy's Constant --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------
Subject: Re: [rt.cpan.org #57701] Error in load() and save() function.
Date: Wed, 26 May 2010 12:35:57 +0200
To: bug-CAD-Drawing [...] rt.cpan.org
From: Heiko Schröter <schroete [...] iup.physik.uni-bremen.de>
Am Samstag 22 Mai 2010, um 01:38:07 schrieben Sie: Hi Eric, thanks for your reply. Sorry to say that the prob remains. It looks like that the parameter 'type' is still not recognized. Thanks and Regards Heiko Using: #!/usr/bin/perl -w use strict; eval "use CAD::Drawing"; if($@) { print "CAD::DRAWING not found.\n"; exit; } use CAD::Drawing; my $drw = CAD::Drawing->new; $drw->load("test.dxf", {type => 'dxf'}); my %opts = ( layer => "smudge", height => 5, ); $drw->addtext([10, 2, 5], "Kilroy was here", \%opts); $drw->save("file.dxf", {type => 'dxf'}); Gives: cluster1 ~ # perl cad_draw.pl explicit type 'dxf' bypassed... exhaustive checks now at /usr/lib64/perl5/site_perl/5.8.8/CAD/Drawing/IO.pm line 366. Use of uninitialized value in concatenation (.) or string at /usr/lib64/perl5/site_perl/5.8.8/CAD/Drawing/IO.pm line 392. could not load test.dxf as type: at cad_draw.pl line 15 Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=57701 > > > # from Heiko Schröter via RT > # on Friday 21 May 2010 01:30: >
> >$drw->save("file.ps");
> > Hi Heiko, > > I seem to recall that this needs to be called as > > $drw->save("file.ps", {type => 'ps'}); > > I don't think there's any support for file extension detection in the > save() process. > > Thanks, > Eric >
-- ----------------------------------------------------------------------- Dipl.-Ing. Heiko Schröter Institute of Environmental Physics (IUP) phone: ++49-(0)421-218-62092 Institute of Remote Sensing (IFE) fax: ++49-(0)421-218-4555 University of Bremen (FB1) P.O. Box 330440 email: schroete@iup.physik.uni-bremen.de Otto-Hahn-Allee 1 28359 Bremen Germany -----------------------------------------------------------------------
Subject: Re: [rt.cpan.org #57701] Error in load() and save() function.
Date: Wed, 26 May 2010 22:22:07 -0700
To: bug-CAD-Drawing [...] rt.cpan.org
From: Eric Wilhelm <enobacon [...] gmail.com>
# from Heiko Schröter via RT # on Wednesday 26 May 2010 03:36: Show quoted text
>It looks like that the parameter 'type' is still not recognized. >... >$drw->save("file.dxf", {type => 'dxf'}); > > >Gives: >explicit type 'dxf' bypassed... >  exhaustive checks now at > /usr/lib64/perl5/site_perl/5.8.8/CAD/Drawing/IO.pm line 366.
This may be a case of having no IO module which handles .dxf. The CAD::Drawing::IO::* classes are automatically loaded (if found) and each one declares which types it is able to save/load. Though I'm puzzled about how it managed to load and not save. Sorry I'm working from memory here and haven't had a chance to sit down with it and figure out what is actually happening -- I also have not used some of this code in quite a while. Which CAD::Drawing::IO::* classes do you have installed? Thanks, Eric -- "If you dig it, it's yours." --An old village poet (via Al Pacino) --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------
Subject: Re: [rt.cpan.org #57701] Error in load() and save() function.
Date: Thu, 27 May 2010 08:55:08 +0200
To: bug-CAD-Drawing [...] rt.cpan.org
From: Heiko Schröter <schroete [...] iup.physik.uni-bremen.de>
Am Donnerstag 27 Mai 2010, um 07:22:19 schrieben Sie: Hi Eric, huh, sorry for the trouble. I could only figure out that i need this IO Module: CAD-Drawing-IO-DWGI-0.12 The installation is a bit by try and error because of the upcoming dependencies. Are there any other Modules needed for CAD-Drawing ? Thanks for your patience. Regards Heiko Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=57701 > > > # from Heiko Schröter via RT > # on Wednesday 26 May 2010 03:36: >
> >It looks like that the parameter 'type' is still not recognized. > >... > >$drw->save("file.dxf", {type => 'dxf'}); > > > > > >Gives: > >explicit type 'dxf' bypassed... > > exhaustive checks now at > > /usr/lib64/perl5/site_perl/5.8.8/CAD/Drawing/IO.pm line 366.
> > This may be a case of having no IO module which handles .dxf. The > CAD::Drawing::IO::* classes are automatically loaded (if found) and > each one declares which types it is able to save/load. > > Though I'm puzzled about how it managed to load and not save. Sorry I'm > working from memory here and haven't had a chance to sit down with it > and figure out what is actually happening -- I also have not used some > of this code in quite a while. Which CAD::Drawing::IO::* classes do > you have installed? > > Thanks, > Eric >