cad 2d drawings
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 599
CAD::Drawing 0.26
CAD::Drawing is a Perl module with methods to create, load, and save vector graphics. more>>
CAD::Drawing is a Perl module with methods to create, load, and save vector graphics.
SYNOPSIS
The primary intention of this module is to provide high-level operations for creating, loading, saving and manipulating vector graphics without having to be overly concerned about smile floormats. As the code has seen more use, it has also drifted into a general purpose geometry API.
The syntax of this works something like the following:
A simple example of a (slightly misbehaved) file converter:
use CAD::Drawing;
$drw = CAD::Drawing->new;
$drw->load("file.dwg");
my %opts = (
layer => "smudge",
height => 5,
);
$drw->addtext([10, 2, 5], "Kilroy was here", %opts);
$drw->save("file.ps");
This is a very basic example, and will barely scratch the surface of this modules capabilities. See the details for each function below and in the documentation for the backend modules.
<<lessSYNOPSIS
The primary intention of this module is to provide high-level operations for creating, loading, saving and manipulating vector graphics without having to be overly concerned about smile floormats. As the code has seen more use, it has also drifted into a general purpose geometry API.
The syntax of this works something like the following:
A simple example of a (slightly misbehaved) file converter:
use CAD::Drawing;
$drw = CAD::Drawing->new;
$drw->load("file.dwg");
my %opts = (
layer => "smudge",
height => 5,
);
$drw->addtext([10, 2, 5], "Kilroy was here", %opts);
$drw->save("file.ps");
This is a very basic example, and will barely scratch the surface of this modules capabilities. See the details for each function below and in the documentation for the backend modules.
Download (0.039MB)
Added: 2007-04-24 License: Perl Artistic License Price:
925 downloads
CAD::Drawing::IO 0.26
CAD::Drawing::IO are I/O methods for the CAD::Drawing module. more>>
CAD::Drawing::IO are I/O methods for the CAD::Drawing module.
This module provides the load() and save() functions for CAD::Drawing and provides a point of flow-control to deal with the inheritance and other trickiness of having multiple formats handled through a single module.
Utility Functions
These are simply inherited by the CAD::Drawing module for your direct usage.
outloop
Crazy new experimental output method. Each entity supported by the format should have a key to a function in %functions, which is expected to accept the following input data:
$functions{$ent_type}->($obj, %data);
The %data hash is passed verbatim to each function.
$count = $drw->outloop(%functions, %data);
In addition to each of the $ent_type keys, functions for the keys before and after may also be defined. These (if they are defined) will be called before and after each entity, with the same arguments as the $ent_type functions.
is_persistent
Returns 1 if $filename points to a persistent (directory / db) drawing.
$drw->is_persistent($filename);
<<lessThis module provides the load() and save() functions for CAD::Drawing and provides a point of flow-control to deal with the inheritance and other trickiness of having multiple formats handled through a single module.
Utility Functions
These are simply inherited by the CAD::Drawing module for your direct usage.
outloop
Crazy new experimental output method. Each entity supported by the format should have a key to a function in %functions, which is expected to accept the following input data:
$functions{$ent_type}->($obj, %data);
The %data hash is passed verbatim to each function.
$count = $drw->outloop(%functions, %data);
In addition to each of the $ent_type keys, functions for the keys before and after may also be defined. These (if they are defined) will be called before and after each entity, with the same arguments as the $ent_type functions.
is_persistent
Returns 1 if $filename points to a persistent (directory / db) drawing.
$drw->is_persistent($filename);
Download (0.039MB)
Added: 2006-10-25 License: Perl Artistic License Price:
1096 downloads
CAD::Drawing::IO::Split 0.26
CAD::Drawing::IO::Split is a Perl module that allows fast distributed text file methods. more>>
CAD::Drawing::IO::Split is a Perl module that allows fast distributed text file methods.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "split" or $filename is a directory (need a tag?)
$fact = check_type($filename, $type);
Load/Save Methods
Concept here is to strip data down to the absolute bare minumum in an effort to find a generic and extensible incarnation of same.
save
Saves data into $toplevel_directory under a directory for each layer, each type, and a file for each id.
save($drw, $toplevel_directory, %options);
Requires that the directory already exists.
Selective saves not yet supported.
Unfortunately, the file-formats are rather primitive and the code needs refactoring. These are nowhere near stable, so dont expect version compatibility yet!
Needs a clear_all_like => $regex option.
load
load($drw, $toplevel_directory, %options);
%options may include selective-load arguments
Naming Functions
_dir_list
@list = _dir_list($dir);
_sp_filename
Creates nested directories which are required to save %obj and returns the filename which should be saved into.
_sp_filename(%obj, %data);
Inherited Methods
clear_dir
Removes layers (and items) from the split directory $dir.
Defaults to removing all.
$drw->clear_dir($dir, %options);
Available options:
like => qr/regex/, # if regex matches layer name
not_like => qr/regex/, # negative of above (compounded)
check_select() options:
%options is passed through CAD::Drawing::Defined::check_select(), so the selections returned by it will be utilized here.
select_layers => @layer_list,
select_types => @types_list,
Returns the number of items removed or undef() if $dir does not exist.
<<lessRequisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "split" or $filename is a directory (need a tag?)
$fact = check_type($filename, $type);
Load/Save Methods
Concept here is to strip data down to the absolute bare minumum in an effort to find a generic and extensible incarnation of same.
save
Saves data into $toplevel_directory under a directory for each layer, each type, and a file for each id.
save($drw, $toplevel_directory, %options);
Requires that the directory already exists.
Selective saves not yet supported.
Unfortunately, the file-formats are rather primitive and the code needs refactoring. These are nowhere near stable, so dont expect version compatibility yet!
Needs a clear_all_like => $regex option.
load
load($drw, $toplevel_directory, %options);
%options may include selective-load arguments
Naming Functions
_dir_list
@list = _dir_list($dir);
_sp_filename
Creates nested directories which are required to save %obj and returns the filename which should be saved into.
_sp_filename(%obj, %data);
Inherited Methods
clear_dir
Removes layers (and items) from the split directory $dir.
Defaults to removing all.
$drw->clear_dir($dir, %options);
Available options:
like => qr/regex/, # if regex matches layer name
not_like => qr/regex/, # negative of above (compounded)
check_select() options:
%options is passed through CAD::Drawing::Defined::check_select(), so the selections returned by it will be utilized here.
select_layers => @layer_list,
select_types => @types_list,
Returns the number of items removed or undef() if $dir does not exist.
Download (0.039MB)
Added: 2007-03-16 License: Perl Artistic License Price:
952 downloads
CAD::Drawing::IO::Tk 0.04
CAD::Drawing::IO::Tk is a Perl module with GUI I/O methods for CAD::Drawing. more>>
CAD::Drawing::IO::Tk is a Perl module with GUI I/O methods for CAD::Drawing.
This module is considered extremely pre-ALPHA and its use is probably deprecated by the time you read this.
Methods
There is no constructor for this class, its methods are inherited via CAD::Drawing::IO
Thoughts
Need to re-structure the entire deal to have its own object which belongs to the drawing object (or does the drawing object belong to this object?) Either way, we need to be able to build-up into interactive commands (possibly using eval("$drw->$command"); ?)
Ultimately, the focus here will likely drift toward supporting perlcad and enabling use of perlcad from within CAD::Drawing scripts. However, the nature of lights-out scripting vs the nature of on-screen drafting is quite different, so there will be some tricks involved. Once each entity has its own class, the ability to install callbacks and the resolution of notifications should get easier. But, there will still be the issue that a debug popup does not know it will appear when the entities are created, while a drafting viewport does (or does it?)
Possibly, adding a list of tk-ids to each $obj as it is drawn would be a good starting point, but this gets us into trouble with multiple viewports.
show
Creates a new window (no options are required.)
$drw->show(%options);
Available Options
forkokay => bool -- Attempt to fork the new window
window => MainWindow -- Use the pre-existing Tk object
stl => Message -- Use pre-existing Message widget
size => [W,H] -- Specify window size in pixels
width => W -- alias to size
height => H -- ditto
center => [X,Y] -- Center the drawing at (X,Y)
scale => factor -- Zoom by factor (default to fit)
bgcolor => color -- defaults to "white"
hang => boolean -- if not, you just get the canvas widget
items => @list -- sorry, not compatible with select_addr :(
Draw
Draws geometry on the Tk canvas $cnv. List of items to draw must be specified via addresses stored in $options{items}.
The newest fad (:e) is the $options{tag} argument, which uses addr_to_tktag() to tag the item.
$drw->Draw($cnv, %options);
tkbindings
Setup the keybindings.
$drw->tkbindings($mw, $cnv);
text_size_reset
text_size_reset($cnv);
free_dist
free_dist();
windowzoom
Creates temporary bindings to drawing a rubber-band box.
windowzoom($cnv);
tksetview
No longer used
$drw->tksetview($cnv, %options);
scalebox
Returns the scaling required to create a view which most closely matches @ext to @size of canvas.
$scale = $drw->scalebox(@size, @ext);
dsp subroutine refs
each of these should do everything necessary to draw the item on the canvas (but they might like to have a few options available?) and then return a list of the Tk ids of the created items. Caller will then assign identical tags to each id which is returned by each per-entity call.
tkpoint
Returns only the first and second element of an array reference as a list.
@xy_point = tkpoint(@pt);
addr_to_tktag
Returns a stringified tag of form: ### ###
my $tag = $drw->addr_to_tktag($addr);
tktag_to_addr
Returns an anonymous hash reference which should serve as an address, provided that $tag is a valid < layer >###< type >###< id > tag (and that the entity exists in the $drw object (check this yourself.)
my $addr = $drw->tktag_to_addr($tag);
<<lessThis module is considered extremely pre-ALPHA and its use is probably deprecated by the time you read this.
Methods
There is no constructor for this class, its methods are inherited via CAD::Drawing::IO
Thoughts
Need to re-structure the entire deal to have its own object which belongs to the drawing object (or does the drawing object belong to this object?) Either way, we need to be able to build-up into interactive commands (possibly using eval("$drw->$command"); ?)
Ultimately, the focus here will likely drift toward supporting perlcad and enabling use of perlcad from within CAD::Drawing scripts. However, the nature of lights-out scripting vs the nature of on-screen drafting is quite different, so there will be some tricks involved. Once each entity has its own class, the ability to install callbacks and the resolution of notifications should get easier. But, there will still be the issue that a debug popup does not know it will appear when the entities are created, while a drafting viewport does (or does it?)
Possibly, adding a list of tk-ids to each $obj as it is drawn would be a good starting point, but this gets us into trouble with multiple viewports.
show
Creates a new window (no options are required.)
$drw->show(%options);
Available Options
forkokay => bool -- Attempt to fork the new window
window => MainWindow -- Use the pre-existing Tk object
stl => Message -- Use pre-existing Message widget
size => [W,H] -- Specify window size in pixels
width => W -- alias to size
height => H -- ditto
center => [X,Y] -- Center the drawing at (X,Y)
scale => factor -- Zoom by factor (default to fit)
bgcolor => color -- defaults to "white"
hang => boolean -- if not, you just get the canvas widget
items => @list -- sorry, not compatible with select_addr :(
Draw
Draws geometry on the Tk canvas $cnv. List of items to draw must be specified via addresses stored in $options{items}.
The newest fad (:e) is the $options{tag} argument, which uses addr_to_tktag() to tag the item.
$drw->Draw($cnv, %options);
tkbindings
Setup the keybindings.
$drw->tkbindings($mw, $cnv);
text_size_reset
text_size_reset($cnv);
free_dist
free_dist();
windowzoom
Creates temporary bindings to drawing a rubber-band box.
windowzoom($cnv);
tksetview
No longer used
$drw->tksetview($cnv, %options);
scalebox
Returns the scaling required to create a view which most closely matches @ext to @size of canvas.
$scale = $drw->scalebox(@size, @ext);
dsp subroutine refs
each of these should do everything necessary to draw the item on the canvas (but they might like to have a few options available?) and then return a list of the Tk ids of the created items. Caller will then assign identical tags to each id which is returned by each per-entity call.
tkpoint
Returns only the first and second element of an array reference as a list.
@xy_point = tkpoint(@pt);
addr_to_tktag
Returns a stringified tag of form: ### ###
my $tag = $drw->addr_to_tktag($addr);
tktag_to_addr
Returns an anonymous hash reference which should serve as an address, provided that $tag is a valid < layer >###< type >###< id > tag (and that the entity exists in the $drw object (check this yourself.)
my $addr = $drw->tktag_to_addr($tag);
Download (0.008MB)
Added: 2007-03-17 License: Perl Artistic License Price:
952 downloads
CAD::Drawing::IO::PgDB 0.03
CAD::Drawing::IO::PgDB is a Perl module with PostgreSQL save / load methods. more>>
CAD::Drawing::IO::PgDB is a Perl module with PostgreSQL save / load methods.
This module is considered pre-ALPHA and under-documented. Its use is strongly discouraged except under experimental conditions. Particularly susceptible to change will be the table structure of the database, which currently does not yet even have any auto-create method.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "circ" or $filename is a directory containing a ".circ" file.
$fact = check_type($filename, $type);
Back-End Input and output methods
The functions load() and save() are responsible for determining the filetype (with forced types available via $opt->{type}.) These then call the appropriate load< thing > or save< thing > functions.
load
Loads a CAD::Drawing object from an SQL database. $spec should be of the form required by the database driver.
$opts->{auth} = ["username", "password"] may be required to create a connection.
$drw->load($spec, $opts);
save
$drw->save($spec, $opts);
cleardb
Deletes the drawing and all of its entities from the database.
$drw->cleardb();
Internals
parse_options
Allows options to come in through the $spec or %opts.
%options = parse_options($spec, %opts);
sort_addr
Sorts through @addr_list and returns a hash of array references for each entity type.
%these = sort_addr($layer, @addr_list);
<<lessThis module is considered pre-ALPHA and under-documented. Its use is strongly discouraged except under experimental conditions. Particularly susceptible to change will be the table structure of the database, which currently does not yet even have any auto-create method.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "circ" or $filename is a directory containing a ".circ" file.
$fact = check_type($filename, $type);
Back-End Input and output methods
The functions load() and save() are responsible for determining the filetype (with forced types available via $opt->{type}.) These then call the appropriate load< thing > or save< thing > functions.
load
Loads a CAD::Drawing object from an SQL database. $spec should be of the form required by the database driver.
$opts->{auth} = ["username", "password"] may be required to create a connection.
$drw->load($spec, $opts);
save
$drw->save($spec, $opts);
cleardb
Deletes the drawing and all of its entities from the database.
$drw->cleardb();
Internals
parse_options
Allows options to come in through the $spec or %opts.
%options = parse_options($spec, %opts);
sort_addr
Sorts through @addr_list and returns a hash of array references for each entity type.
%these = sort_addr($layer, @addr_list);
Download (0.008MB)
Added: 2007-03-17 License: GPL (GNU General Public License) Price:
952 downloads
CAD::Drawing::IO::Image 0.02
CAD::Drawing::IO::Image is a Perl module with output methods for images. more>>
CAD::Drawing::IO::Image is a Perl module with output methods for images.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "img" or $filename matches one of the ImageMagick type extensions.
$fact = check_type($filename, $type);
Methods
load
Requires vectorization...
load();
save
save();
image_color
image_color($color, $data);
<<lessRequisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "img" or $filename matches one of the ImageMagick type extensions.
$fact = check_type($filename, $type);
Methods
load
Requires vectorization...
load();
save
save();
image_color
image_color($color, $data);
Download (0.005MB)
Added: 2007-03-17 License: Perl Artistic License Price:
952 downloads
CAD::Drawing::IO::Compressed 0.26
CAD::Drawing::IO::Compressed is a Perl module to load and save compressed data. more>>
CAD::Drawing::IO::Compressed is a Perl module to load and save compressed data.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "compressed" or $filename has a ".gz" extension (probably the best way.)
$fact = check_type($filename, $type);
Compressed I/O functions
These use File::Temp and compression modules to create a compressed version of most supported I/O types (FIXME: need a tar scheme for directory-based formats (currently unsupported))
save
$drw->save($filename, %opts);
load
$drw->load($filename, %opts);
<<lessRequisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "compressed" or $filename has a ".gz" extension (probably the best way.)
$fact = check_type($filename, $type);
Compressed I/O functions
These use File::Temp and compression modules to create a compressed version of most supported I/O types (FIXME: need a tar scheme for directory-based formats (currently unsupported))
save
$drw->save($filename, %opts);
load
$drw->load($filename, %opts);
Download (0.039MB)
Added: 2007-03-16 License: Perl Artistic License Price:
953 downloads
CAD::Drawing::IO::PostScript 0.03
CAD::Drawing::IO::PostScript is a Perl module with PostScript output methods. more>>
CAD::Drawing::IO::PostScript is a Perl module with PostScript output methods.
I would like this module to both load and save PostScript vector graphics, but I have not yet found a suitable PostScript parsing package.
This module should be considered pre-ALPHA and untested. Some features rely on the authors hacks to PostScript::Simple, which may or may not have been incorporated into the CPAN distribution of PostScript::Simple. For bleeding-edge code, see http://ericwilhelm.homeip.net.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "circ" or $filename is a directory containing a ".circ" file.
$fact = check_type($filename, $type);
Methods
load
load();
save
$drw->save($filename, %opts);
PostScript::Simple::setpscolor
PostScript::Simple::setpscolor();
<<lessI would like this module to both load and save PostScript vector graphics, but I have not yet found a suitable PostScript parsing package.
This module should be considered pre-ALPHA and untested. Some features rely on the authors hacks to PostScript::Simple, which may or may not have been incorporated into the CPAN distribution of PostScript::Simple. For bleeding-edge code, see http://ericwilhelm.homeip.net.
Requisite Plug-in Functions
See CAD::Drawing::IO for a description of the plug-in architecture.
check_type
Returns true if $type is "circ" or $filename is a directory containing a ".circ" file.
$fact = check_type($filename, $type);
Methods
load
load();
save
$drw->save($filename, %opts);
PostScript::Simple::setpscolor
PostScript::Simple::setpscolor();
Download (0.008MB)
Added: 2007-03-17 License: Perl Artistic License Price:
952 downloads
CAD::Drawing::Manipulate 0.26
CAD::Drawing::Manipulate is a Perl module to manipulate CAD::Drawing objects. more>>
CAD::Drawing::Manipulate is a Perl module to manipulate CAD::Drawing objects.
Move, Copy, Scale, Mirror, and Rotate methods for single entities and groups of entities.
Group Methods
These methods are called with required values, followed by a hash reference of option values. Note the difference between this and the individual entity manipulation syntax shown below. The absence of an %options hash reference implies everything in the drawing.
For details about each of the group manipulation methods, see the corresponding individual entity manipulation method.
Options
The $opts value shown for each of the group manipulation methods is fed directly to CAD::Drawing::select_addr(). See the documentation for this function for additional details.
One of the most common methods of selection (after the implicit all) may be the explicit list of addresses. This is done by simply passing an array reference rather than a hash reference.
GroupMove
Move selected entities by @dist.
$drw->GroupMove(@dist, $opts);
GroupCopy
Returns a list of addresses for newly created entities.
@new = $drw->GroupCopy(@dist, $opts);
GroupClone
Returns a list of addresses for newly created entities.
@new = $drw->GroupClone($dest, $opts);
place
Clones items from $source into $drw and moves them to @pt. Selects items according to %opts and optionally rotates them by $opts{ang} (given in radians.)
$drw->place($source, @pt, %opts);
GroupMirror
Mirrors the entities specified by %options (see select_addr()) across @axis.
@new = $drw->GroupMirror(@axis, %options);
GroupScale
Sorry, @pt is required here.
$drw->GroupScale($factor, @pt, %opts);
GroupRotate
Rotates specified entities by $angle. A center point may be specified via $opts{pt} = @pt.
$drw->GroupRotate($angle, %opts);
Individual Methods
Move
Moves entity at $addr by @dist (@dist may be three-dimensional.)
$drw->Move($addr, @dist);
Copy
$drw->Copy($addr, @dist);
Clone
Clones the entity at $addr into drawing $dest.
$drw->Clone($addr, $dest, %opts);
%opts may contain:
to_layer => $layer_name, # layer to clone into
Mirror
Mirrors entity specified by $addr across @axis.
Returns the address of the manipulated entity. If $opts{copy} is true, will clone the entity, otherwise modify in-place.
$drw->Mirror($addr, @axis, %opts);
Scale
$drw->Scale($addr, $factor, @pt);
Rotate
Rotates entity specified by $addr by $angle (+ccw radians) about @pt. Angle may be in degrees if $angle =~ s/d$// returns a true value (but I hope the "d" is the only thing on the end, because Im not looking for anything beyond that.) $angle = "45" . "d" will get converted, but $angle = "45" . "bad" will be called 0. Remember, this is Perl:)
$drw->Rotate($addr, $angle, @pt);
Internal Functions
pointrotate
Internal use only.
($x, $y) = pointrotate($x, $y, $ang, $xc, $yc);
pointmirror
@point = pointmirror($axis, $pt);
angle_of
angle_of(@segment);
Polygon Methods
These dont do anything yet and need to be moved to another module anyway.
CutPline
$drw->CutPline();
IntPline
$drw->IntPline();
intersect_pgon
intersect_pgon();
<<lessMove, Copy, Scale, Mirror, and Rotate methods for single entities and groups of entities.
Group Methods
These methods are called with required values, followed by a hash reference of option values. Note the difference between this and the individual entity manipulation syntax shown below. The absence of an %options hash reference implies everything in the drawing.
For details about each of the group manipulation methods, see the corresponding individual entity manipulation method.
Options
The $opts value shown for each of the group manipulation methods is fed directly to CAD::Drawing::select_addr(). See the documentation for this function for additional details.
One of the most common methods of selection (after the implicit all) may be the explicit list of addresses. This is done by simply passing an array reference rather than a hash reference.
GroupMove
Move selected entities by @dist.
$drw->GroupMove(@dist, $opts);
GroupCopy
Returns a list of addresses for newly created entities.
@new = $drw->GroupCopy(@dist, $opts);
GroupClone
Returns a list of addresses for newly created entities.
@new = $drw->GroupClone($dest, $opts);
place
Clones items from $source into $drw and moves them to @pt. Selects items according to %opts and optionally rotates them by $opts{ang} (given in radians.)
$drw->place($source, @pt, %opts);
GroupMirror
Mirrors the entities specified by %options (see select_addr()) across @axis.
@new = $drw->GroupMirror(@axis, %options);
GroupScale
Sorry, @pt is required here.
$drw->GroupScale($factor, @pt, %opts);
GroupRotate
Rotates specified entities by $angle. A center point may be specified via $opts{pt} = @pt.
$drw->GroupRotate($angle, %opts);
Individual Methods
Move
Moves entity at $addr by @dist (@dist may be three-dimensional.)
$drw->Move($addr, @dist);
Copy
$drw->Copy($addr, @dist);
Clone
Clones the entity at $addr into drawing $dest.
$drw->Clone($addr, $dest, %opts);
%opts may contain:
to_layer => $layer_name, # layer to clone into
Mirror
Mirrors entity specified by $addr across @axis.
Returns the address of the manipulated entity. If $opts{copy} is true, will clone the entity, otherwise modify in-place.
$drw->Mirror($addr, @axis, %opts);
Scale
$drw->Scale($addr, $factor, @pt);
Rotate
Rotates entity specified by $addr by $angle (+ccw radians) about @pt. Angle may be in degrees if $angle =~ s/d$// returns a true value (but I hope the "d" is the only thing on the end, because Im not looking for anything beyond that.) $angle = "45" . "d" will get converted, but $angle = "45" . "bad" will be called 0. Remember, this is Perl:)
$drw->Rotate($addr, $angle, @pt);
Internal Functions
pointrotate
Internal use only.
($x, $y) = pointrotate($x, $y, $ang, $xc, $yc);
pointmirror
@point = pointmirror($axis, $pt);
angle_of
angle_of(@segment);
Polygon Methods
These dont do anything yet and need to be moved to another module anyway.
CutPline
$drw->CutPline();
IntPline
$drw->IntPline();
intersect_pgon
intersect_pgon();
Download (0.039MB)
Added: 2007-03-17 License: Perl Artistic License Price:
953 downloads
CAD::Drawing::GUI::View 0.01_01
CAD::Drawing::GUI::View are 2D graphics for CAD built on Tk::Zinc. more>>
CAD::Drawing::GUI::View are 2D graphics for CAD built on Tk::Zinc.
This module provides methods to turn a CAD::Drawing object into a Zinc canvas.
Overridden Methods
These make me behave like a Tk widget.
ClassInit
$view->ClassInit();
InitObject
$view->InitObject();
configure
$view->configure(%args);
args_filter
Filters configure arguments and adds non-tk args to our private data.
%args = $view->args_filter(%args);
<<lessThis module provides methods to turn a CAD::Drawing object into a Zinc canvas.
Overridden Methods
These make me behave like a Tk widget.
ClassInit
$view->ClassInit();
InitObject
$view->InitObject();
configure
$view->configure(%args);
args_filter
Filters configure arguments and adds non-tk args to our private data.
%args = $view->args_filter(%args);
Download (0.011MB)
Added: 2006-10-25 License: Perl Artistic License Price:
1094 downloads
File::Drawing 0.01
File::Drawing release, revise and retrieve contents to/from a drawing program module. more>>
File::Drawing release, revise and retrieve contents to/from a drawing program module.
SYNOPSIS
##########
# Subroutine interface
#
use File::Drawing qw(
dod_date dod_drawing_number number2pm pm2number obsolete
broken backup);
$date = dod_date($sec, $min, $hour, $day, $month, $year);
$drawing_number = dod_drawing_number( );
$pm = number2pm($drawing_number, $repository);
$drawing_number = pm2number($drawing_number, $repository);
$old_value = config( $option );
$old_value = config( $option => $new_value);
(@all_options) = config( );
obsolete($drawing_number, $repository);
broken($drawing_number, $repository);
($file, $backup_file) = backup($drawing_number, $repository, $dir);
######
# Class Interface
#
use File::Drawing;
$default_options = defaults(@options);
$old_value = $default_options->config( $option );
$old_value = $default_options->config( $option => $new_value);
(@all_options) = $default_options->config( );
$drawing = new File::Drawing($contents, $white_tape, $pod, $file_contents, $drawing_number, $repository);
$drawing = File::Drawing->retrieve($drawing_number, @options);
$error = $drawing->release(@options);
$error = $drawing->revise(@options);
$date = $drawing->dod_date($sec, $min, $hour, $day, $month, $year);
$drawing_number = $$drawing->dod_drawing_number( );
$pm = $drawing->number2pm($drawing_number, $repository);
$drawing_number = $drawing->pm2number($drawing_number, $repository);
$drawing->obsolete($drawing_number, $repository);
$drawing->broken($drawing_number, $repository);
($file, $backup_file) = $drawing->backup($drawing_number, $repository, $dir);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
The File::Drawing program module uses American National Standards for drawings as a model for storing data. Commercial, governement and casual orgainizations have stored information over the centuries as drawings. Drawings probably evolved from the census that the Romans rulers, started back when Rome was a little frontier town. In other words, the practices of the drafting displines have evolved over time and have stood the test of time.
Any deviation must be a crystal clear advantage. Many of the practices are in place to avoid common and costly human mistakes that obviously a computerize drafting system will not make. A good approach is to make the computerized data structure optimum for computers and have the computer render the computerized data into a form that meets the drafting standards.
The File::Drawing program module, uses the Perl program module name as a drawing repository, drawing number combination. The contents of the drawing is contained in the program module file. The < File::Drawing > program module established methods to retrieve contents from a program module drawing file, create an Perl drawing object with the contents, and methods to release and revise the contents in a program module drawing file from a Perl drawing object. Other popular methods for computerize date are the SQL and XML. Perl has a wide range of program modules using these approach.
In this time in history, the Drawings are highly standardize and even subject to Internationl standarization agreements. The Drawing Sheet Size and Format conform to ANSI Y14.1-1975 or its successor. The drawing has a box with zone numbers running right to left alon the top and bottom, and zone letters running bottom to top along the sides. There is a section inside the box, lower right corner with the blocks for such things as the title, drawing number, current revision, authoriztion, and sheet number. There is an expandable four column table in the top right corner to record the revision history.
<<lessSYNOPSIS
##########
# Subroutine interface
#
use File::Drawing qw(
dod_date dod_drawing_number number2pm pm2number obsolete
broken backup);
$date = dod_date($sec, $min, $hour, $day, $month, $year);
$drawing_number = dod_drawing_number( );
$pm = number2pm($drawing_number, $repository);
$drawing_number = pm2number($drawing_number, $repository);
$old_value = config( $option );
$old_value = config( $option => $new_value);
(@all_options) = config( );
obsolete($drawing_number, $repository);
broken($drawing_number, $repository);
($file, $backup_file) = backup($drawing_number, $repository, $dir);
######
# Class Interface
#
use File::Drawing;
$default_options = defaults(@options);
$old_value = $default_options->config( $option );
$old_value = $default_options->config( $option => $new_value);
(@all_options) = $default_options->config( );
$drawing = new File::Drawing($contents, $white_tape, $pod, $file_contents, $drawing_number, $repository);
$drawing = File::Drawing->retrieve($drawing_number, @options);
$error = $drawing->release(@options);
$error = $drawing->revise(@options);
$date = $drawing->dod_date($sec, $min, $hour, $day, $month, $year);
$drawing_number = $$drawing->dod_drawing_number( );
$pm = $drawing->number2pm($drawing_number, $repository);
$drawing_number = $drawing->pm2number($drawing_number, $repository);
$drawing->obsolete($drawing_number, $repository);
$drawing->broken($drawing_number, $repository);
($file, $backup_file) = $drawing->backup($drawing_number, $repository, $dir);
Generally, if a subroutine will process a list of options, @options, that subroutine will also process an array reference, @options, [@options], or hash reference, %options, {@options}. If a subroutine will process an array reference, @options, [@options], that subroutine will also process a hash reference, %options, {@options}. See the description for a subroutine for details and exceptions.
The File::Drawing program module uses American National Standards for drawings as a model for storing data. Commercial, governement and casual orgainizations have stored information over the centuries as drawings. Drawings probably evolved from the census that the Romans rulers, started back when Rome was a little frontier town. In other words, the practices of the drafting displines have evolved over time and have stood the test of time.
Any deviation must be a crystal clear advantage. Many of the practices are in place to avoid common and costly human mistakes that obviously a computerize drafting system will not make. A good approach is to make the computerized data structure optimum for computers and have the computer render the computerized data into a form that meets the drafting standards.
The File::Drawing program module, uses the Perl program module name as a drawing repository, drawing number combination. The contents of the drawing is contained in the program module file. The < File::Drawing > program module established methods to retrieve contents from a program module drawing file, create an Perl drawing object with the contents, and methods to release and revise the contents in a program module drawing file from a Perl drawing object. Other popular methods for computerize date are the SQL and XML. Perl has a wide range of program modules using these approach.
In this time in history, the Drawings are highly standardize and even subject to Internationl standarization agreements. The Drawing Sheet Size and Format conform to ANSI Y14.1-1975 or its successor. The drawing has a box with zone numbers running right to left alon the top and bottom, and zone letters running bottom to top along the sides. There is a section inside the box, lower right corner with the blocks for such things as the title, drawing number, current revision, authoriztion, and sheet number. There is an expandable four column table in the top right corner to record the revision history.
Download (0.063MB)
Added: 2006-06-22 License: Perl Artistic License Price:
1219 downloads
CAD::Drawing::Manipulate::Graphics 0.26
CAD::Drawing::Manipulate::Graphics - Gimp meets CAD. more>>
CAD::Drawing::Manipulate::Graphics - Gimp meets CAD.
Methods
All of these are CAD::Drawing methods (I force my own inheritance:)
image_init
Initialize the image at $addr based on the value at the fullpath key. This establishes the contained Image::Magick object and loads the image into memory in the image_handle key.
$drw->image_init($addr);
image_crop
Crops an image and its definition (actually, changes its insert point) according to the points given by @crop_points (which maybe had better be within the object (but I dont really sweat that.))
@crop_points should be in world coordinates as follows:
@crop_points = (
[$lower_left_x , $lower_left_y ],
[$upper_right_x, $upper_right_y],
);
# note that you can get these as
# ($drw->getExtentsRec($something))[0,2]
$drw->image_crop($addr, @crop_points);
image_scale
Scales both the image and the definition by $scale, starting at @base_point.
$drw->image_scale($addr, $scale, @base_point);
image_rotate
This leaves the definition orthoganal, expands the underlying image object, and resets the insert point and size properties accordingly.
$drw->image_rotate($addr, $angle, @point);
The current implementation does not handle the change to the image clipping boundary.
image_swap_context
This involves a scaling of the image (the contexts should be aligned over each other at this point or everything will go to hell.) Do your own move / rotate / crop before calling this, because all this does is to scale the underlying image object such that the vec property of the image definition at $dest_addr can be used correctly.
Note that this does not "swap" the image to $dest_addr, rather it uses the image definition of $dest_addr to change the image object and definition at $source_addr.
Also note that the image must fit completely inside (I think) of the destination in order for the composite to work correctly.
$drw->image_swap_context($source_addr, $dest_addr);
<<lessMethods
All of these are CAD::Drawing methods (I force my own inheritance:)
image_init
Initialize the image at $addr based on the value at the fullpath key. This establishes the contained Image::Magick object and loads the image into memory in the image_handle key.
$drw->image_init($addr);
image_crop
Crops an image and its definition (actually, changes its insert point) according to the points given by @crop_points (which maybe had better be within the object (but I dont really sweat that.))
@crop_points should be in world coordinates as follows:
@crop_points = (
[$lower_left_x , $lower_left_y ],
[$upper_right_x, $upper_right_y],
);
# note that you can get these as
# ($drw->getExtentsRec($something))[0,2]
$drw->image_crop($addr, @crop_points);
image_scale
Scales both the image and the definition by $scale, starting at @base_point.
$drw->image_scale($addr, $scale, @base_point);
image_rotate
This leaves the definition orthoganal, expands the underlying image object, and resets the insert point and size properties accordingly.
$drw->image_rotate($addr, $angle, @point);
The current implementation does not handle the change to the image clipping boundary.
image_swap_context
This involves a scaling of the image (the contexts should be aligned over each other at this point or everything will go to hell.) Do your own move / rotate / crop before calling this, because all this does is to scale the underlying image object such that the vec property of the image definition at $dest_addr can be used correctly.
Note that this does not "swap" the image to $dest_addr, rather it uses the image definition of $dest_addr to change the image object and definition at $source_addr.
Also note that the image must fit completely inside (I think) of the destination in order for the composite to work correctly.
$drw->image_swap_context($source_addr, $dest_addr);
Download (0.039MB)
Added: 2006-10-25 License: Perl Artistic License Price:
1094 downloads
CAD::Drawing::Manipulate::Transform 0.26
CAD::Drawing::Manipulate::Transform is a Perl module with Matrix methods for CAD::Drawing. more>>
CAD::Drawing::Manipulate::Transform is a Perl module with Matrix methods for CAD::Drawing.
Provides 3D transformation methods (based on traditional matrix algorithms) for Drawing.pm objects.
Coordinate System
All of these methods assume a RIGHT-HANDED coordinate system. If you are using a left-handed coordinate system, you are going to have trouble, trouble, trouble. We arent making video games here!
<<lessProvides 3D transformation methods (based on traditional matrix algorithms) for Drawing.pm objects.
Coordinate System
All of these methods assume a RIGHT-HANDED coordinate system. If you are using a left-handed coordinate system, you are going to have trouble, trouble, trouble. We arent making video games here!
Download (0.039MB)
Added: 2007-03-16 License: GPL (GNU General Public License) Price:
953 downloads
Eclipse 2D Game Engine 1.0
Eclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file. more>>
Eclipse is a set of C++ classes designed to give beginner developers a head start in developing their first games as well as more experienced developers who dont want to have to write code for mundane tasks like fonts, sprites, and image loading.
Eclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file support.
<<lessEclipse 2D Game Engine provides bitmap fonts, window management, audio capabilities, image loading, error logging, and zip file support.
Download (0.38MB)
Added: 2006-08-24 License: GPL (GNU General Public License) Price:
1166 downloads
PythonCAD DS1-R36
PythonCAD is a CAD package written, surprisingly enough, in Python. more>>
PythonCAD is a CAD package written, surprisingly enough, in Python. PythonCAD project aims to produce a scriptable, open-source, easy to use CAD package for Linux, the various flavors of BSD Unix, commercial Unix, and other platforms to which someone who is interested ports the program. Work began on PythonCAD in July, 2002, and the first public release was on December 21, 2002.
The twenty-fifth release of PythonCAD was made available May 26, 2005. This release fixes several compatibility issues found when running PythonCAD on PyGTK releseses prior than 2.4. Also, numerous changes to the event handling code have been applied to make the code better conform to GTK+/PyGTK conventions. Additionally a number of bug fixes and code improvements appear in this release as well.
Between the sixteenth and seventeenth releases of the program, the code was moved around internally to better cooperate with other Python programs. Unfortunately the Cocoa front-end code has suffered since then due to lack of maintainence and is currently not functional. Releases after the seventeenth release have attempted to improve the situation, but to no avail. A developer or team of developers running Mac OS X is needed to bring the Cocoa code into a usable state.
<<lessThe twenty-fifth release of PythonCAD was made available May 26, 2005. This release fixes several compatibility issues found when running PythonCAD on PyGTK releseses prior than 2.4. Also, numerous changes to the event handling code have been applied to make the code better conform to GTK+/PyGTK conventions. Additionally a number of bug fixes and code improvements appear in this release as well.
Between the sixteenth and seventeenth releases of the program, the code was moved around internally to better cooperate with other Python programs. Unfortunately the Cocoa front-end code has suffered since then due to lack of maintainence and is currently not functional. Releases after the seventeenth release have attempted to improve the situation, but to no avail. A developer or team of developers running Mac OS X is needed to bring the Cocoa code into a usable state.
Download (0.42MB)
Added: 2007-06-05 License: GPL (GNU General Public License) Price:
878 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above cad 2d drawings search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed