fix small bugs in isometric projection
This commit is contained in:
parent
4de1090640
commit
865510ce33
@ -8,7 +8,7 @@
|
||||
<option value="right">Dimetric right-hand side</option>
|
||||
</param>
|
||||
<param name="reverse" type="bool" gui-text="Reverse transformation">false</param>
|
||||
<param name="orthoangle" type="float" precision="3" min="0.000" max="90.000" gui-text="Orthographic angle">15.000</param>
|
||||
<param name="orthoangle" type="float" precision="3" min="0.001" max="90.000" gui-text="Orthographic angle">15.000</param>
|
||||
<effect>
|
||||
<object-type>all</object-type>
|
||||
<effects-menu>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<option value="right">Isometric right-hand side</option>
|
||||
</param>
|
||||
<param name="reverse" type="bool" gui-text="Reverse transformation">false</param>
|
||||
<param name="orthoangle" type="float" precision="3" min="0" max="90" gui-text="Orthographic angle">30.000</param>
|
||||
<param name="orthoangle" type="float" precision="3" min="0.001" max="90.000" gui-text="Orthographic angle">30.000</param>
|
||||
<effect>
|
||||
<object-type>all</object-type>
|
||||
<effects-menu>
|
||||
|
@ -67,6 +67,9 @@ class IsometricProjection(inkex.EffectExtension):
|
||||
self.arg_parser.add_argument('--orthoangle', type=float, default=15.0, help='Isometric angle in degrees')
|
||||
|
||||
def __initConstants(self, angle):
|
||||
if angle == 0:
|
||||
inkex.utils.debug("angle is set to 0°. This is not supported")
|
||||
return
|
||||
# Precomputed values for sine, cosine, and tangent of orthoangle.
|
||||
self.rad = math.radians(angle)
|
||||
self.cos = math.cos(self.rad)
|
||||
|
Loading…
Reference in New Issue
Block a user