CAD::Drawing::Manipulate

CAD::Drawing::Manipulate is a Perl module to manipulate CAD::Drawing objects.
Download

CAD::Drawing::Manipulate Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Eric L. Wilhelm
  • Publisher web site:
  • http://search.cpan.org/~ewilhelm/Date-Piece-v0.0.2/lib/Date/Piece.pm

CAD::Drawing::Manipulate Tags


CAD::Drawing::Manipulate Description

CAD::Drawing::Manipulate is a Perl module to manipulate CAD::Drawing objects. 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 MethodsThese 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.OptionsThe $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.GroupMoveMove selected entities by @dist. $drw->GroupMove(@dist, $opts);GroupCopyReturns a list of addresses for newly created entities. @new = $drw->GroupCopy(@dist, $opts);GroupCloneReturns a list of addresses for newly created entities. @new = $drw->GroupClone($dest, $opts);placeClones 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);GroupMirrorMirrors the entities specified by %options (see select_addr()) across @axis. @new = $drw->GroupMirror(@axis, %options);GroupScaleSorry, @pt is required here. $drw->GroupScale($factor, @pt, %opts);GroupRotateRotates specified entities by $angle. A center point may be specified via $opts{pt} = @pt. $drw->GroupRotate($angle, %opts);Individual MethodsMoveMoves entity at $addr by @dist (@dist may be three-dimensional.) $drw->Move($addr, @dist);Copy $drw->Copy($addr, @dist);CloneClones the entity at $addr into drawing $dest. $drw->Clone($addr, $dest, %opts);%opts may contain: to_layer => $layer_name, # layer to clone intoMirrorMirrors 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);RotateRotates 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 FunctionspointrotateInternal use only. ($x, $y) = pointrotate($x, $y, $ang, $xc, $yc);pointmirror @point = pointmirror($axis, $pt);angle_of angle_of(@segment);Polygon MethodsThese don't do anything yet and need to be moved to another module anyway.CutPline $drw->CutPline();IntPline $drw->IntPline();intersect_pgon intersect_pgon();Requirements:· Perl Requirements: · Perl


CAD::Drawing::Manipulate Related Software