_PointDeviation command (v7, windows)

Hi to all,

I’ve got a scripting problem (RhinoPython) where I simply hope that you can help. In a script I would like to check 2 surfaces if they are geometrically the same. They are the same if the’ve got the same naked edges (boundary) as well as there is no significant surface deviation. In progamming the last criterion the command _PointDeviation can be used. srf1 and srf2 are guids of the surfaces; srf1 is the reference surface (named RefSurface) and srf2 is the one to be checked (it was a copy of srf1, just the upper right corner – control points – have been slightly moved in y direction in the accompanying Rhino-file rhino1.3dm).
To execute the _PointDeviation command the control string is built up:

str = ‘!-_PointDeviation Visible None _SelID ’ + srf1 + ’ _Enter’ +
’ _SelID ’ + sfr2 + ’ _Enter _Enter’

rs.command(str)

A test macro is stored in rhino1.3dm under File>Remarks.

It works so far, but how can I adjust the goodPoint-, badPoint-, and Ignore-option before testing?

How can the statistics reported in the pop-up panel (in my case just the maximum distance is needed) be analysed by RhinoPython script?

Additionally, how can I make the command _PointDeviation working more fine/coarse-grained (more/less test points)?

And finally, I cannot use the English words like Visible and also not _Visible, instead I have to use the German one Sichtbar.

It would be fine if you could help me … thanks.

Best regards,

Björn Reder


rhino1.3dm (105.7 KB)

1 Like

Why not just create your own grid of points on one surface in the script, pull those points to the other surface, loop through the two lists of points synchronously and check the distance between each pair of points?

Thanks, you’re quite right, but I wanted to avoid this more easy way of solving the problem but instead making full use of the compact and convinient command _PointDeviation (at least it seems to me). It has to be described anywhere in full but I haven’t found it yet, and the annotation/usage in the context of RhinoPython is deeply interesting. So maybe there’s somebody out there who knows it and could add this missing knowledge snippet.

Well, I assumed you just wanted to check if two surfaces are “identical” with your criteria - if the edges are the same and all the points are within a certain tolerance, the check returns True.

A dialog-only based command like PointDeviation is difficult to include in a script. It does not appear to have a command line only interface that could be scripted, and I don’t see right off a quick/compact method for doing so in RhinoCommon (other than doing something similar to what I suggested above).

I see … so I’m going to try your suggested way - thanks a lot!