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 12: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
ActiveTool = cdrToolPick

End Sub

shelbym 02-10-2017 10:55

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


All times are GMT -5. The time now is 18:47.

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