![](https://secure.gravatar.com/avatar/c2febf73be0c418034ebcccf56a94c5a.jpg?s=120&d=mm&r=g)
I'm looking for a way to draw a shape, then for each object I have selected, intersect it with that shape. I would do it by hand, but I'm looking at around 1700 objects (I think they are all paths, so no worries there)
Jeff
![](https://secure.gravatar.com/avatar/bb65b6b3a109d97cf9f8d6c014ede042.jpg?s=120&d=mm&r=g)
On 1/17/06, Jeffrey Brent McBeth <mcbeth@...1493...> wrote:
I'm looking for a way to draw a shape, then for each object I have selected, intersect it with that shape. I would do it by hand, but I'm looking at around 1700 objects (I think they are all paths, so no worries there)
If these 1700 objects do not intersect, you can do it by selecting them all, Path>Combine, then Path->Intersect with the cutter shape, then Path>Break Apart.
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
![](https://secure.gravatar.com/avatar/c2febf73be0c418034ebcccf56a94c5a.jpg?s=120&d=mm&r=g)
On Tue, Jan 17, 2006 at 10:34:35PM -0400, bulia byak wrote:
On 1/17/06, Jeffrey Brent McBeth <mcbeth@...1493...> wrote:
I'm looking for a way to draw a shape, then for each object I have selected, intersect it with that shape. I would do it by hand, but I'm looking at around 1700 objects (I think they are all paths, so no worries there)
If these 1700 objects do not intersect, you can do it by selecting them all, Path>Combine, then Path->Intersect with the cutter shape, then Path>Break Apart.
Wow, that is great. I'll have to keep that tool stashed in my head. Unfortunately, for this task, they do overlap and intersect. Is this something I should start looking at extensions for (perhaps even figuring out how to write one?). Is it at all like GIMP extensions?
Jeff
![](https://secure.gravatar.com/avatar/650e8f686572eb00b7b445fe657f222a.jpg?s=120&d=mm&r=g)
Duplicate (ctrl+d) then union (ctrl+ plus) then intersect, If your not fussed about keeping the 1700, skip the duplication step.
Cheers
Sim
--- Jeffrey Brent McBeth <mcbeth@...1493...> wrote:
On Tue, Jan 17, 2006 at 10:34:35PM -0400, bulia byak wrote:
On 1/17/06, Jeffrey Brent McBeth <mcbeth@...1493...> wrote:
I'm looking for a way to draw a shape, then for each object I
have selected,
intersect it with that shape. I would do it by hand, but I'm
looking at
around 1700 objects (I think they are all paths, so no worries
there)
If these 1700 objects do not intersect, you can do it by selecting them all, Path>Combine, then Path->Intersect with the cutter shape, then Path>Break Apart.
Wow, that is great. I'll have to keep that tool stashed in my head. Unfortunately, for this task, they do overlap and intersect. Is this something I should start looking at extensions for (perhaps even figuring out how to write one?). Is it at all like GIMP extensions?
Jeff
--
----------------------------------------------------------------------------
Computer Science is as much about computers as astronomy is about telescopes -- Edsger Wybe Dijkstra (1930-2002)
----------------------------------------------------------------------------
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
![](https://secure.gravatar.com/avatar/15f5e6abf26f57e1838c29a8356ce7f8.jpg?s=120&d=mm&r=g)
On Tue, 17 Jan 2006, Jeffrey Brent McBeth wrote:
Wow, that is great. I'll have to keep that tool stashed in my head. Unfortunately, for this task, they do overlap and intersect. Is this something I should start looking at extensions for (perhaps even figuring out how to write one?). Is it at all like GIMP extensions?
That is definitely something that could be implemented with extensions. Unfortunately the internal functions in Inkscape aren't exported (thinks like intersect) so the only extension method available is using C++. This isn't impossible, but increases the complexity. If you are interested you can look at bluredge.cpp in the code base for an example. This sounds like something that could be a very useful extension.
As always, feel free to ask more questions :)
--Ted
![](https://secure.gravatar.com/avatar/82c0f6eed0ee59676eb45aadd66dac57.jpg?s=120&d=mm&r=g)
ted@...10... wrote:
On Tue, 17 Jan 2006, Jeffrey Brent McBeth wrote:
Wow, that is great. I'll have to keep that tool stashed in my head. Unfortunately, for this task, they do overlap and intersect. Is this something I should start looking at extensions for (perhaps even figuring out how to write one?). Is it at all like GIMP extensions?
That is definitely something that could be implemented with extensions. Unfortunately the internal functions in Inkscape aren't exported (thinks like intersect) so the only extension method available is using C++. This isn't impossible, but increases the complexity. If you are interested you can look at bluredge.cpp in the code base for an example. This sounds like something that could be a very useful extension.
Another option would be to let the intersection of a group and a path do something more interesting than complain that one of the objects isn't a path. I'd say it would be pretty intuitive if the intersection of a path and a group would yield a group containing the intersections of all objects in the group and the path. Most other operations would also seem reasonable to me.
Theoretically something similar could be done for group/group operations, but I'm not sure what would be the most intuitive option (and to be honest I really wouldn't know when you'd want to use it).
![](https://secure.gravatar.com/avatar/15f5e6abf26f57e1838c29a8356ce7f8.jpg?s=120&d=mm&r=g)
Quoting Jasper van de Gronde <th.v.d.gronde@...226...>:
Another option would be to let the intersection of a group and a path do something more interesting than complain that one of the objects isn't a path. I'd say it would be pretty intuitive if the intersection of a path and a group would yield a group containing the intersections of all objects in the group and the path. Most other operations would also seem reasonable to me.
Hmm, I can definitely see that making sense for difference and maybe intersection. I'm not _quite_ sure what the expected result for union should be though.
Still, I like the idea. Anyone up for implementing?
-mental
participants (5)
-
unknown@example.com
-
bulia byak
-
Jasper van de Gronde
-
Jeffrey Brent McBeth
-
John Cliff