Barycenter of one or more objects

Bug #171331 reported by Bug Importer
4
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Alvin Penner

Bug Description

It would be nice a tool to point the barycenter of one
or more objects

Revision history for this message
Horkana-users (horkana-users) wrote :

Please try not to file anonymous requests. instead please
get an account and login so we can ask for follow up
information if necessary.

it might also be helpful explain your request in more detail
and possible provide examples of how you think it might look

Hystrix (hystrix-)
Changed in inkscape:
importance: Undecided → Wishlist
status: New → Incomplete
jazzynico (jazzynico)
tags: added: markers
removed: objects-markers
Kris (kris-degussem)
Changed in inkscape:
status: Incomplete → Won't Fix
Revision history for this message
Alvin Penner (apenner) wrote :

attached is a proposed modification of the measure.py extension that calculates center of mass. It adds this option to the two previous options that were length and area. Center of mass is plotted as a cross.
    for testing, this need to be saved in directory Inkscape\share\extensions\ or the Unix equivalent

Revision history for this message
Alvin Penner (apenner) wrote :

and the corresponding inx file

su_v (suv-lp)
Changed in inkscape:
status: Won't Fix → In Progress
assignee: Aaron C Spike (acspike) → Alvin Penner (apenner)
Revision history for this message
Alvin Penner (apenner) wrote :

committed to rev 13250

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.91
Revision history for this message
Alvin Penner (apenner) wrote :

@suv, thanks for fixing the makecheck. I knew I was contributing new text with this change, but unfortunately, I wasn't exactly sure what the consequences would be. Anyways, thanks!

Alvin Penner (apenner)
information type: Public → Private Security
information type: Private Security → Public
Revision history for this message
su_v (suv-lp) wrote :

@Alvin - np

Question/Notes wrt new feature:

- Better support to identify mass center symbol with object?
Maybe the inserted cross could use a custom id composed of a name describing its purpose, and the id of the path it originally applied to? 'MassCenter_path1234' for example would allow to find it by id of the original path (via 'Edit > Find').

- Better support for snapping?
Currently there is no node at the actual location of the mass center - it is at the intersection of two line segments (intersection is a costly snap target). I assume that one use case of the visualization of the mass center would be to be able to position the path such that the mass center aligns (snaps) with other elements on the canvas (or guides, or grid lines). This does not work if what ought to be snapping is actually an intersection of two paths (at least not in trunk, when dragging a group which contains the original path and the cross).
Would it make sense to either insert a node in the center of one of the two lines, or draw them differently [1], so that there is a node present which can be used for snapping while dragging a selection or group of the mass center and the original path?

[1] e.g. draw two 90° angled lines (3 nodes each) instead of 2 crossing lines (2 nodes each)

Revision history for this message
Alvin Penner (apenner) wrote :

yes, I think those should both be feasible, I'll take a look at them during the next week.

Revision history for this message
Alvin Penner (apenner) wrote :

changes committed to rev 13259

su_v (suv-lp)
tags: removed: markers
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
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.