OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   Macros/Add-ons (http://forum.oberonplace.com/forumdisplay.php?f=21)
-   -   Add nodes at intersects (http://forum.oberonplace.com/showthread.php?t=24800)

mtracy 25-09-2017 13:32

Add nodes at intersects
 
Select two shapes. Tested with X7.

Sub NodesToIntesects()
Dim s As Shape
Dim nr As New NodeRange
Dim cps As CrossPoints
Dim cp As CrossPoint
ActiveDocument.BeginCommandGroup "NodesToIntersects"
Set s = ActiveSelectionRange.Combine
Set cps = s.Curve.SubPaths(1).GetIntersections(s.Curve.SubPaths(2), cdrAbsoluteSegmentOffset)
For Each cp In cps
nr.Add s.Curve.SubPaths(1).AddNodeAt(cp.Offset, cdrAbsoluteSegmentOffset)
nr.Add s.Curve.SubPaths(2).AddNodeAt(cp.Offset2, cdrAbsoluteSegmentOffset)
Next cp
s.BreakApart
ActiveTool = cdrToolPick
ActiveSelectionRange.RemoveFromSelection
ActiveDocument.EndCommandGroup

End Sub

shelbym 02-10-2017 11:55

Intersects
 
You would need to add a loop to loop through all your shapes and check them for Intersects.

-Shelby


All times are GMT -5. The time now is 20:50.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com