CAD-Drawing-IO-DWGI
view release on metacpan or search on metacpan
lib/CAD/Drawing/IO/DWGI.pm view on Meta::CPAN
=cut
=head2 writeCircle
Writes a circle to the object structure.
$d->writeCircle({"pt"=>[$x,$y,$z], "rad"=>$rad, "color"=>$color});
=cut
=head2 getEllipse
Reads an ellipse from the current entity.
$el = $d->getEllipse();
print "center: ", join(",", @{$el->{pt}}), "\n";
print "offset: ", join(",", @{$el->{off}}), "\n";
print "minor / major ratio: $el->{ratio}\n";
print "start / end: ", join(",", @{$el->{angs}}), "\n";
There is (as usual) some discrepency between the odwg docs and the adesk
dxf ref as to wtf this parameter thing is. There are some undocumented
functions in the toolkit, which seem to only reduce the arc-angles.
NOTE that the angles given are relative to the baseline described by the
vector stored in $el->{off}.
=cut
=head2 getArc
Reads an arc from the current entity.
$arc = $d->getArc();
print "point: ", join(",", @{$arc->{pt}}), "\n";
print "rad: $arc->{rad}\n";
print "radian angles: ", join(",", @{$arc->{angs}}), "\n";
=cut
=head2 writeArc
Writes an arc to the object structure.
%ArcOpts = (
"pt" => [$x,$y,$z],
"rad" => $rad,
"angs" => [$start, $end],
"color" => $color,
);
$d->writeArc(\%ArcOpts);
=cut
=head2 getLine
Reads a line from the current entity.
$line = $d->getLine();
print "endpoints: ",
join("\n",
map({join(",", @{$_})}
@{$line->{pts}}
)
), "\n";
=cut
=head2 writeLine
Writes a line to the object structure.
%LineOpts = (
"pts" => [ [$x1,$y1,$z1], [$x2,$y2,$z2] ],
"color" => $color,
);
$d->writeLine(\%LineOpts);
=cut
=head2 getText
$text = $d->getText();
print "point: ", join(",", @{$text->{pt}}), "\n";
print "string: ", $text->{string}, "\n";
print "height: ", $text->{height}, "\n";
=cut
=head2 writeText
%TextOpts = (
"pt" => [$x, $y, $z],
"string" => $string,
"height" => $height,
"color" => $color,
);
$d->writeText(\%TextOpts);
=cut
=head2 getSolid
experimental
=cut
=head2 getPoint
$point = $d->getPoint();
print "point: ", join(",", @{$point->{pt}}), "\n";
=cut
=head2 writePoint
%PointOpts = (
"pt" => [$x, $y, $z],
"color" => $color,
( run in 1.672 second using v1.01-cache-2.11-cpan-9581c071862 )