Extension Visualize path gives weird results

Bug #1654749 reported by ivan louette
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

This is the first time I use the Center of Mass feature in the Vizualize path extension.

I use Inkscape Trunk on Kubuntu 14.04

I have thought that Extension/Vizualize Path/Measure Path/Center of Mass could help me to locate the hanging hole in flat shapes designed for an hanging mobile. But in some cases it gives weird results. It seems this is not related to the fact that the shape is a composite path or not.

I attach an example of what occurs in some cases.

Thanks for any help !

ivan

Revision history for this message
ivan louette (ivan-louette) wrote :
su_v (suv-lp)
tags: added: extensions-plugins
Revision history for this message
su_v (suv-lp) wrote :

Attaching proposal to fix insertion of 'center of mass' symbol in transformed layers - please review.

Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.91 r13725 and lp:inkscape/0.92.x r15309 on OS X 10.7.5.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Needs fixes for other use cases of center of mass too (to position text labels for length and area) - updated patch later.

Revision history for this message
su_v (suv-lp) wrote :

Updated proposal, includes fixes for text labels inserted at path start or center of mass, if selected path is inside transformed (translated) group or layer.

Revision history for this message
ivan louette (ivan-louette) wrote :

My question was also why the center of mass location is so far outside the object and far from the potential center of gravity of the shape (assuming it has an homogenous weight everywhere on its surface).

My goal is to insert an hanging hole somewhere on its balance line.

Revision history for this message
su_v (suv-lp) wrote :

ivan - the answer to the question «why the center of mass location is so far outside the object» is that the extension currently does not correctly take the translate() transformation of the parent layer group into account when drawing the path to symbolize the center of mass:

  <g
     transform="translate(1575,2067.6377)"
     id="layer1"
     inkscape:groupmode="layer"
     inkscape:label="Layer 1">

Revision history for this message
su_v (suv-lp) wrote :

@ivan - a quick workaround in any affected file is to
1) add a new layer
2) move the path to the new layer
3) apply the extension

Revision history for this message
ivan louette (ivan-louette) wrote :

Ok the workaround works very well ! Thanks a lot and sorry for my misunderstanding.

I will try the result on paper shapes soon.

Hachmann (marenhachmann)
summary: - Extension Vizualize path gives weird results
+ Extension Visualize path gives weird results
Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP (32-bit), lp:inkscape/0.92.x rev. 15309.

Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.93
status: Confirmed → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested quickly with the SVG file attached comment #1. Looks perfect, but needs some more tests.

Changed in inkscape:
assignee: nobody → su_v (suv-lp)
status: Triaged → In Progress
Revision history for this message
su_v (suv-lp) wrote :

Minor correction of v2.

Revision history for this message
su_v (suv-lp) wrote :

Deleting the attached diffs - I am revoking my pending patches provided in this bug tracker for issues with python-based extensions distributed with Inkscape.

Changed in inkscape:
assignee: su_v (suv-lp) → nobody
status: In Progress → Confirmed
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :
Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.