Triangle Generator Extension
Bug #226001 reported by
inductiveload
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Wishlist
|
inductiveload |
Bug Description
I have written an extension to render at triangle, based on one of the following options:
1)From three sides
2)From two sides and the included angle
3)From two sides and an opposite angle
4)From one side, one adjacent, and one opposite side
5)From one sides and the two adjacent angles
These are the only possible ways to define a triangle by side lengths and angles. All measurments are in px.
This extension will also print a warning if an invalid set of values is given, such as triangle with sides of 100, 100, 500. If ambiguous values that can produce two triangles are given, both triangles are generated.
To post a comment you must log in.
Nice work inductive! 3 comments at this stage
First, to get this to work in 0.46 devel or later, you have to add the xml namespace lines to the top; extension> www.inkscape. org/namespace/ inkscape/ extension">
replace;
===
<inkscape-
===
with
===
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://
===
Second, once I do that, it gets this error using default values and the third mode (sides a,b, angle a);
===
Traceback (most recent call last):
File "D:\Download\ Multimedia\ Image\Inkscape\ compiling\ SVN\trunk\ inkscape\ share\extension s\triangle. py", line 197, in <module>
e.affect()
File "D:\Download\ Multimedia\ Image\Inkscape\ compiling\ SVN\trunk\ inkscape\ share\extension s\inkex. py", line 154, in affect
self.effect()
File "D:\Download\ Multimedia\ Image\Inkscape\ compiling\ SVN\trunk\ inkscape\ share\extension s\triangle. py", line 155, in effect
error=false
NameError: global name 'false' is not defined
===
Third, I noticed there's no GPL2 or better statement in the .py file like in your grid extensions. Are you happy for that to go in?
Once we get those sorted out, we (I) will also add entries to /share/ extensions/ Makefile. am and /po/POTFILES.in
Sas might also like to check the xml. He had some very slight corrections to the two grid*.inx files. You can see the latest versions of them here; inkscape. svn.sourceforge .net/viewvc/ inkscape/ inkscape/ trunk/share/ extensions/
http://