fsmmlk / inkscapedimensions Goto Github PK
View Code? Open in Web Editor NEWInkscape extension to assist creating dimension annotations.
License: GNU General Public License v3.0
Inkscape extension to assist creating dimension annotations.
License: GNU General Public License v3.0
I'm trying to use the Dimensions extensions, but whenever I want to use e.g. the "mm" value (which is selected in Inkscape) the Dimensions extension is only showing the pixel equivalent.
Example, I've drawn a line with 30.235px, I changed the length indicator to mm witch is exactly 8mm. Then I've added the linear Dimension for this line and got ->30.235<-
BUT I want -> 8 <- !!!
What may be wrong? I'm sorry, if I missuse this issue field.
Hi
I installed https://github.com/fsmMLK/inkscapeMadeEasy, as I should.
the following files are not in the extension folder after this (as you write in
https://github.com/fsmMLK/inkscapeDimensions) :
|-- drawAmpOp.py
|-- drawArrows.py
|-- drawDiodes.py
|-- drawRLC.py
|-- drawSignals.py
|-- drawSources.py
|-- drawSwitches.py
|-- drawTransistors.py
|-- textextLib
| |-- CircuitSymbolsLatexPreamble.tex <-- add this file to textextLib subdirectoy
I receive following message by using extensions>fsmMLK>Dimensions on a sinlge selected path:
C:\Program Files (x86)\Inkscape.48.5-32\share\extensions\textextLib\textext.py:63: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import os, sys, tempfile, traceback, glob, re, md5, copy
Traceback (most recent call last):
File "dimensions.py", line 907, in
dimension.affect()
File "C:\Program Files (x86)\Inkscape.48.5-32\share\extensions\inkex.py", line 215, in affect
self.effect()
File "dimensions.py", line 245, in effect
invertTextSide=so.LINinvertTextSide, smallDimension=so.LINsmalDimStyle)
File "dimensions.py", line 822, in drawLinDim
textColor=self.textColor, LatexCommands=' ', angleDeg=angle)
File "C:\Program Files (x86)\Inkscape.48.5-32\share\extensions\inkscapeMadeEasy_Draw.py", line 1247, in latex
tempFilePath], output=False)
File "C:\Program Files (x86)\Inkscape.48.5-32\share\extensions\inkex.py", line 215, in affect
self.effect()
File "C:\Program Files (x86)\Inkscape.48.5-32\share\extensions\textextLib\textext.py", line 125, in effect
% ';\n'.join(converter_errors))
RuntimeError: No Latex -> SVG converter available:
PstoeditPlotSvg: Command pstoedit -help failed: [Error 2] Das System kann die angegebene Datei nicht finden;
SkConvert: Command pstoedit failed: [Error 2] Das System kann die angegebene Datei nicht finden;
Pdf2Svg: Command pdf2svg failed: [Error 2] Das System kann die angegebene Datei nicht finden
Do I have to install so many other extensions?
Thanks for any help !
Hi,
I installed most of your extensions and they all work but Dimensions, it shows this error when previewing or applying:
Traceback (most recent call last):
File "dimensions.py", line 832, in <module>
dimension.affect()
File "C:\Program Files\Inkscape\share\extensions/inkex.py", line 283, in affect
self.effect()
File "dimensions.py", line 193, in effect
[P1,P2] = self.getPointsLinDim(element,so.LINdirection)
File "dimensions.py", line 784, in getPointsLinDim
[P1,P2] = self.getPoints(element)
ValueError: too many values to unpack
Windows 7 Pro 64 bits, Python 2.7.15, all packages installed according to your instructions, InkscapeMadeEasy seems to be working since the other extensions work.
This is a really great project!
Ubuntu 18.0.4; Inkscape 0.92.3
I am getting the following error report when I attempt to add a linear dimension
Traceback (most recent call last):
File "dimensions.py", line 838, in <module>
dimension.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
self.effect()
File "dimensions.py", line 202, in effect
horizontalText=so.LINhorizontalText,invertTextSide=so.LINinvertTextSide,smallDimension=so.LINsmalDimStyle)
File "dimensions.py", line 603, in drawLinDim
value=self.userUnit2unit(value,self.documentUnit)
AttributeError: Dimensions instance has no attribute 'userUnit2unit'
When I run it with 'Custom' set I get a dimensional arrow with 'value' on it, so I think I have things set up correctly in general (i.e. my installation can access required LaTeX components, etc.)
Probably this is some silly configuration issue, but I can't find any suggestions elsewhere online as to what the possible problem might be.
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
Out of the box, the 'Dimensions' entry in the fsmMLK submenu is greyed out. I fixed that (and a few other issues) before I started getting so deep in that I didn't really know what I was doing any more:
That's when I gave up, I got errors about there being too many arguments to unpack for inkDraw.color.parseColorPicker() but that required me to understand too much of the internal API. Is this still maintained?
Actually when having the preview enabled it only updates the dimension when making changes in the "linear" or "angular" tab.
It would be nice if this could be also done when making changes in the style- (font size e.g.) or configuration-tab.
I get the following syntax error when running in Inkscape 1.0
Traceback (most recent call last):
File "dimensions.py", line 7, in <module>
import inkscapeMadeEasy_Draw as inkDraw
File "C:\Users\Erik Scott\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy_Draw.py", line 44, in <module>
import textextLib.textext as textext
File "C:\Users\Erik Scott\AppData\Roaming\inkscape\extensions\textextLib\textext.py", line 120
except StandardError, e:
^
SyntaxError: invalid syntax
I have both the dimensions and InkscapeMadeEasy files installed in the user extensions directory. Error occurs when hitting "apply" or "live preview."
MY APOLOGIES, I HAVE SOLVED THIS "PROBLEM" .... IT WAS A NEW USER PROBLEM. I COULD NOT FIND A WAY OF DELETING THE ISSUE, HENCE THIS NOTE.
Excellent Extension, well done.
I have just installed the latest version of Inkscape (inkscape-1.1-x64.exe), InkscapeDimensions (inkscapeDimensions-master 1.0), Miktex (basic-miktex-21.6-x64.exe), LaTex. TexText (TexText-Windows-1.4.0.exe) on Windows 10 and ran into the following error when trying to use the installed dimensions extension (see attachments). Any help would be appreciated. NOTE I am a beginner trying to install extensions and get them working.
Inkscape Extensions folder structure after installation of all components (installed in C:\Users\xxx\AppData\Roaming\inkscape\extensions)
┣━extensions
┣━━ inkscapeMadeEasy <-- inkscapeMadeEasy folder
┃ ┣━━ inkscapeMadeEasy_Base.py
┃ ┣━━ inkscapeMadeEasy_Draw.py
┃ ┣━━ inkscapeMadeEasy_Plot.py
┃ ┗━━ basicLatexPackages.tex
┃ ┣━━_pycache_
| ┣━━ inkscapeMadeEasy_Base.cpython-38.pyc
| ┗━━ inkscapeMadeEasy_Draw.cpython-38.pyc
|
┣━━ textext <-- textext folder
|
┣━━ dimensions <--dimensions folder
┃ ┣━━ dimensions.inx
┃ ┗━━ dimensions.py
Hi
I created an new document on A4 (297 x 210 mm) with scale 1.0 so the viewbox is the same (297 x 210).
Then I draw a box and a line to have the dimensions.
Rather then drawing 2 cm on the 2 cm line it annotates with 0.53 cm
(scale is 1.0 and unit is cm)
Is this an error or do I overlook something?
regards
Just installed this extension on 0.92.3 and was getting some incorrect labels. I often make documents using inches with a scale of 1:1. With a test document w/ display units in inches and scale of 1, I made a reference 4in line. This yielded dimension of 0.0416666682292. Oddly this equals 4in/96px so I gathered the extension thought the document was still using pixel units.
I traced it down to this line of code I think:
inkscapeDimensions/dimensions.py
Line 659 in 897a76a
I also noticed that if the document scale is changed it will scale the labeled dimension. For example changing the scale from 1 to 2, a 4in line becomes 0.083.
FYI, this seems to fix things for me:
try:
elem = self.getElemFromXpath('/svg:svg/sodipodi:namedview')
doc_scale = self.getElemAtrib(elem, 'scale-x')
doc_scale = float(doc_scale)
except:
doc_scale = 1
value = self.unit2unit(value, self.documentUnit, unit) / doc_scale
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.