Code Monkey home page Code Monkey logo

inkscapedimensions's People

Contributors

fsmmlk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

inkscapedimensions's Issues

Only the pixel values are shown, even if changed to mm in Inkscape

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.

Can't make it run

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 !

Dimensions error

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.

Rearrange config tab contents

What do you think of rearranging the config tab contents?

Now:

Config:

  • Text color
  • Line color

Style

  • Linear dimension marker style
  • Marker sizes ...

My suggestion:

Style:

  • Text color
  • Line color
  • Linear dimension marker style

Sizes

  • Marker sizes ...

Would then look something iike this way:

Screenshot_2021-04-24_10-30-46

Screenshot_2021-04-24_10-31-00

Dimensions instance has no attribute 'userUnit2unit'

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.

Error using angular dimension, message using linear

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

Arrow length

How do you managed this that the horizontal line is always as long as your text? Or is that only possible if using Latex?

If I do that it looks like this:

Screenshot_2021-04-24_10-44-40
or
Screenshot_2021-04-24_10-45-04

Maybe an option would be to right align the text as it is a common method I think:

Screenshot_2021-04-24_10-45-26

What do you think about that?

No longer works with latest Inkscape (1.3)

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:

  • in inkscapeDimensions.inx, there is a dependency on inkex.py coded in. The extensions-errors.log showed that a dependency couldn't be loaded. Just commenting out that line made the entry no longer be greyed out. It seems modern Inkscape versions include that file in the Python installation directory? At least I can import it just fine from the command line. So that seems to be no longer needed.
  • Then I got a deprecation warning about OptionsParser. In Dimensions.init(), I had to change all OptionsParser.[something, forgot what it was called] to arg_parser.add_argument.
  • Then I got a message about string not being callable. I had to change the type option to add_argument from string to the actual type, e.g. "string" to str, "float" to float etc.

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?

Gigantic dimensions

I am using Inkscape 1.1.1 under Linux Mint 20.2 Cinnamon. I just installed dimensions.

I drew a line and opened the dimensions extension. This is what I get:

image

How do I get something more reasonable?

unable to draw linear dimensions

I installed the dimensions package with all dependencies and it worked for several days but I am now getting the following error when trying to apply linear dimensions:

ValueError: need more than 0 values to unpack

This is a screenshot of the full error:

image

Syntax Error | Inkscape 1.0

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."

Error using inkscapeDimensions extension

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

Dimensions error
dimensions extension

Dimension wrong in metric drawing

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
image

Incorrect Dimensions with Non-Pixel User Unit

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:

value = self.userUnit2unit(value, unit)

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

Dimension arrow of the previously created disappears

when I first created a linear linear, everything worked fine. But when I then create a linear dimensions, the dimension arrow of the previously created disappears.
Can you fix this?
Also, can the annotated arrows be the same as linear linears?
Thanks
Peek 2019-05-24 20-32

Displaced dimension

Everytime I create a dimension it's not placed correctly but shifted:
screenshot
Any idea?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.