Hi,
try this macro.
ENTITY $ent = $entity('Toolpath','')
IF $ent.Strategy == "drill" {
OBJECT LIST $startPoints = {}
INT $segmentsCount = $toolpath_component_count($ent, 'segments')
WHILE $segmentsCount > 0 {
$segmentsCount = $segmentsCount - 1
REAL $sgmPointCount = $segment_point_count( $ent, $segmentsCount)
IF $sgmPointCount > 1 {
OBJECT $pntStart = segment_get_point( $ent, $segmentsCount, 0)
BOOL $matchStart = 0
FOREACH $obj IN $startPoints {
IF $round($obj.Position.X,3) == $round($pntStart.Position.X,3) AND $round($obj.Position.Y,3) == $round($pntStart.Position.Y,3) AND $round($obj.Position.Z,3) == $round($pntStart.Position.Z,3) {
$matchStart = 1
BREAK
}
}
IF $matchStart {
EDIT TPSELECT ; TPLIST UPDATE\r $segmentsCount NEW
DELETE TOOLPATH ; SELECTED
} ELSE {
INT $i = $add_last($startPoints, $pntStart)
}
}
}
}