Wrong curve length measurements in Inkscape

General discussions about Inkscape.
gerardin37
Posts: 2
Joined: Wed Mar 14, 2012 9:02 am

Wrong curve length measurements in Inkscape

Postby gerardin37 » Wed Mar 14, 2012 10:09 am

Hello, I'm new in this forum and hope to ask in the right place.

I'm using Inkscape since 2007 and I think is a wonderfull software, but there is somethig I have to complain.

I'm starting to use some scripts in Inkscape for the garment industry specially for pattern draft. One script example is the following:

http://www.sew-brilliant.org/2010/08/29/manually-added-seam-allowance/

For pattern draft I need to measure curve lengths, and measurements needs to be as precise as posible (+/-3 mm deviation is OK). To clear things a little bit, the curve length measure of arm scye in a pattern is used to draft the sleeve in a shirt or a coat, but inkscape measuremet tool is not precise, there is a big deviation in cetimeters (not milimiters or even inches).

I think this is not a bug, this is the way the code of the program was written to measure paths, but curve measurement path is wrong.

I use Illustrator and CorelDraw a lot also, but none of them has Inkscape's flexibility.
CorelDraw measure paths vertical, horizontal and diagonal, but not curves. while Illustrator has an ifo window showing all path information and the wrigth curve length, but can not use scripts like Inkscape does.

Solving this issue will help to finish my project, because my intention is to use Inkscape and Base-Libre Office to speed up some processes in the Fashion industry, about Product Specifications.
By the way I'm not only asking for a solution, I'm involved promoting the use of GPL software in schools and within industry and doing donations to Inkscape, the Gimp and Libre Office foundations for every training curse I teach, because this is my way of living, training people and schools in the fashion industry. I think everyone using this software should donate to help develop more efficient software tools.

Thank you.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Wrong curve length measurements in Inkscape

Postby brynn » Wed Mar 14, 2012 11:02 am

Image
Welcome to InkscapeForum!

I know that a measuring tool has been a much requested new feature. I found this info on the Google+ and it looks like it's already being built, and expected possibly as soon as 0.49 (next year). https://plus.google.com/u/0/s/inkscape%20measure%20tool Maybe there will be some more helpful info for you there? (I did not read it all.)

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Wrong curve length measurements in Inkscape

Postby ~suv » Wed Mar 14, 2012 6:25 pm

gerardin37 wrote:For pattern draft I need to measure curve lengths, and measurements needs to be as precise as posible (+/-3 mm deviation is OK). To clear things a little bit, the curve length measure of arm scye in a pattern is used to draft the sleeve in a shirt or a coat, but inkscape measuremet tool is not precise, there is a big deviation in cetimeters (not milimiters or even inches).

I think this is not a bug, this is the way the code of the program was written to measure paths, but curve measurement path is wrong.
I don't really understand the second paragraph of the quote - would you be willing to share the SVG file, and explain the steps you did to measure which path?

The current measurement tool in stable Inkscape ('Extensions > Visualize Path > Measure…') is a python-based script extension which does not have access to Inkscape's internal functions - it calculates the length (or enclosed area) of the selected path in a separate process, based on the raw SVG data, with its own routines. The script could be improved by anyone with moderate python and math skills, if it really is incorrectly converting the px (aka SVG user unit)-based result for the length/area into various other units.

Having access to your SVG file would allow to get further insight about the issue:
  • is the path possibly inside a scaled group (or layer group), or
  • is a viewBox attribute set for the top-level <svg> node the document [1],
  • how was the overall working scale/units of the drawing defined,
  • etc.
Which version of Inkscape on which OS/platform are you using?

OTOH, based on the instructions on the mentioned web page
  1. select all points that aren’t corners and set to auto-smooth. Set points at the waist line and elbows to symmetrical.
  2. set Inkscape Preferences/Steps to 56.25px (5/8″) for Outset to equal a standard seam allowance.
  3. select the pattern outline
  4. copy then paste in place
  5. select Path/Outset
this might not actually be about the measurement tool at all, but about the path inset/outset commands, the 'steps' value and its unit as set in the preferences, and overall known limitations of using 'real' or absolute units in a scalable file format like SVG, with all path data based on the 'SVG user unit' (px), and the SVG specification only recommending (but not enforcing) its basic size in SVG renderers (Inkscape currently uses hardcoded 90 ppi for 'px').
You might have used a formula for the inset/outset step value which does not actually represent what you think it does with regard to units conversion, or maybe are misinterpreting the outset/inset commands to provide more geometric precision than what they are able to? (see e.g. this recent summary by RobA)

brynn wrote:(…) a measuring tool has been a much requested new feature. I found this info on the Google+ and it looks like it's already being built, and expected possibly as soon as 0.49 (next year)
The new Measure Tool in the development branch does not duplicate the existing extension (which calculates the length/area of selected objects and inserts the results as text labels). As shown in the video, the new tool works by dragging a measurement baseline across objects on-canvas and measuring the intersections of the paths with this measurement line: the tool displays the relative distances and the overall distance of those intersections, as well as the angle of the measurement baseline, temporarily on-canvas (while the tool is active). It does not create dimensioning lines nor insert text objects with the measured distances.

gerardin37
Posts: 2
Joined: Wed Mar 14, 2012 9:02 am

Re: Wrong curve length measurements in Inkscape

Postby gerardin37 » Sat Mar 17, 2012 4:24 am

Thanks for the replies.

Well, I'm using several OSes even different computers from Mac to PC with different hardware configurations (CPU, Video cards, RAM, etc.), because this is customer's hardware.
Inkscape version: the latest 0.48.2.1, but even with olther versions, the problem is the same.

Now I know this measuring tool is not Inkscape's internal function, yes it is python script! fNow I'm starting to study python and reading my math books to improve the scripts myself, but I don't know how long it will take me.

About the mentioned web page: http://www.sew-brilliant.org/2010/08/29 ... allowance/
those scripts needs also more work to be polished, because Armcye is totally erroneous (you can see better Armcye draft in this link: http://sewing.patternreview.com/SewingD ... opic/15531), but the script is a very good starting point for draftting patterns so fast.

The inset and outset functions are not so important at this moment, because the pattern will be read by Professional CAD Pattern making software (Accumark by Gerber or Diamino-Modaris by Lectra), and this software packages has several functions for this task. The main task I have to concentrate is on "Drafting Accurate Patterns", because this way customers will never have to invest on a Digitazing Table for Patterns ($4,000.00 USD), and the workflow will be so fast, saving more than 10 minuts on digitazing each pattern (30 days of work a year! that is a lot of wasted money in a factory).

I don't know where to start on math, because all I have found is about areas under curves. Any suggestion is very welcome. Meanwhile If I find the solution to my problem I will post the sript.


Return to “General Discussions”