Does anybody have a script that can take all points in a file and convert them into (preferably) a cross or if easier a square or circle?
I am a sailmaker and often need to place markers on a file for grommet holes or other markers, I often use points to define this, but the plotting machine we use doesn’t recognise DXF points, so we need to convert them into a curve of some sort .
Obviously a cross is ideal as the centre is marked, but I realise this could be a harder thing to define than a square etc.
If anyone already has something or doesn’t mind writing something for this, it would be very handy - thanks.
! _NoEcho _-Runscript (
Sub main
Pts=rhino.selectedobjects
if isnull(Pts) then Pts=rhino.getobjects("Points ?",1)
obs=rhino.getobjects("Objects ?")
rp=rhino.getpoint("Reference point ?")
rhino.enableredraw vbfalse
for each pt in Pts
if rhino.ispoint(pt) then
xyz=rhino.pointcoordinates(pt)
rhino.unselectallobjects
rhino.selectobjects obs
rhino.copyobjects obs,rp,xyz
End If
next
rhino.unselectallobjects
rhino.enableredraw vbtrue
end sub
main
)
So tou ca choose a curve or curves to be copied to the points.
HTH
Indeed it’s not obvious at all.
Try if this doc can get you started.
You’ll need to add a new button to a toolbar and copy-paste the code as posted above.