GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CAD::Drawing::Manipulate(3) User Contributed Perl Documentation CAD::Drawing::Manipulate(3)

CAD::Drawing::Manipulate - Manipulate CAD::Drawing objects

Move, Copy, Scale, Mirror, and Rotate methods for single entities and groups of entities.

Eric L. Wilhelm <ewilhelm at cpan dot org>

http://scratchcomputing.com

This module is copyright (C) 2004-2006 by Eric L. Wilhelm. Portions copyright (C) 2003 by Eric L. Wilhelm and A. Zahner Co.

This module is distributed under the same terms as Perl. See the Perl source package for details.

You may use this software under one of the following licenses:

  (1) GNU General Public License
    (found at http://www.gnu.org/copyleft/gpl.html)
  (2) Artistic License
    (found at http://www.perl.com/pub/language/misc/Artistic.html)

This software is distributed with ABSOLUTELY NO WARRANTY. The author, his former employer, and any other contributors will in no way be held liable for any loss or damages resulting from its use.

The source code of this module is made freely available and distributable under the GPL or Artistic License. Modifications to and use of this software must adhere to one of these licenses. Changes to the code should be noted as such and this notification (as well as the above copyright information) must remain intact on all copies of the code.

Additionally, while the author is actively developing this code, notification of any intended changes or extensions would be most helpful in avoiding repeated work for all parties involved. Please contact the author with any such development plans.

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.

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.

Move selected entities by @dist.

  $drw->GroupMove(\@dist, $opts);

Returns a list of addresses for newly created entities.

  @new = $drw->GroupCopy(\@dist, $opts);

Returns a list of addresses for newly created entities.

  @new = $drw->GroupClone($dest, $opts);

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);

Mirrors the entities specified by %options (see select_addr()) across @axis.

  @new = $drw->GroupMirror(\@axis, \%options);

Sorry, \@pt is required here.

  $drw->GroupScale($factor, \@pt, \%opts);

Rotates specified entities by $angle. A center point may be specified via $opts{pt} = \@pt.

  $drw->GroupRotate($angle, \%opts);

Moves entity at $addr by @dist (@dist may be three-dimensional.)

  $drw->Move($addr, \@dist);

  $drw->Copy($addr, \@dist);

Clones the entity at $addr into drawing $dest.

  $drw->Clone($addr, $dest, \%opts);

%opts may contain:

  to_layer => $layer_name,  # layer to clone into

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);

  $drw->Scale($addr, $factor, \@pt);

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 I'm 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 use only.

  ($x, $y) = pointrotate($x, $y, $ang, $xc, $yc);

  @point = pointmirror($axis, $pt);

  angle_of(\@segment);

These don't do anything yet and need to be moved to another module anyway.

  $drw->CutPline();

  $drw->IntPline();

  intersect_pgon();
2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.