Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using angular dimension, message using linear #18

Open
huanmario7 opened this issue Jul 19, 2022 · 1 comment
Open

Error using angular dimension, message using linear #18

huanmario7 opened this issue Jul 19, 2022 · 1 comment

Comments

@huanmario7
Copy link

Started getting this error while trying to apply angular dimension

Traceback (most recent call last): File "C:\Users\buszt\AppData\Roaming\inkscape\extensions\inkscapeDimensions\dimensions.py", line 896, in <module> dimension.run() File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 231, in run self.save_raw(self.effect()) File "C:\Users\buszt\AppData\Roaming\inkscape\extensions\inkscapeDimensions\dimensions.py", line 246, in effect self.drawAngDim(root_layer, element, label='Dim', invertAngle=so.ANGinvertAngle, textType=so.AngContents_subtab, File "C:\Users\buszt\AppData\Roaming\inkscape\extensions\inkscapeDimensions\dimensions.py", line 334, in drawAngDim if auxElemType == '3points': UnboundLocalError: local variable 'auxElemType' referenced before assignment

Also this message while using linear dimension, though it creates the dimension
<frozen importlib._bootstrap>:671: ImportWarning: DynamicImporter.exec_module() not found; falling back to load_module() <frozen importlib._bootstrap>:671: ImportWarning: DynamicImporter.exec_module() not found; falling back to load_module() C:\Users\buszt\AppData\Roaming\inkscape\extensions\textext\base.py:415: DeprecationWarning: inkex.deprecated.main.transform_imul -> Use @= operator instead full_layer_transform *= layer.transform C:\Users\buszt\AppData\Roaming\inkscape\extensions\textext\base.py:419: DeprecationWarning: inkex.deprecated.main.transform_mul -> Use @ operator instead tt_node.transform = (-full_layer_transform * # map to view coordinate system

@fsmMLK
Copy link
Owner

fsmMLK commented Aug 7, 2022

The first error appears when your line segment contains a number of vertices different than 3 or 4.

The second warning is related to textext extension. I have no control over it, but you can manually fix that by going to base.py, line 419 and replace tt.node.transform = ( [LOTS of ARGUMENTS ])
by

                 tt_node.transform = (-full_layer_transform @               # map to view coordinate system
                                     Transform(translate=view_center) @    # place at view center
                                     Transform(scale=user_scale_factor) @  # scale
                                     Transform(translate=-node_center) @   # place node at origin
                                     tt_node.transform                     # use original node transform
                                     )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants