Hi Bro!
how to know distance between 2 surfaces parallel.
Please help me!
Hello,
Assuming the surfaces are offset from one another do you want the diagonal distance between closest points or the perpendicular distance (a) ?
a
<------>
|
|
|
|
|
|
|
Set a CPlane to one of the two surfaces. Then using Distance, measure the distance from some point on that surface to any point on the other surface. Look at the “CPlane angles and deltas” in the command line, the “dz” value will be the distance between your two (infinite) planes.
i know that but I want to choose the surface one after another to return the result of the distance by python script
Have you tried coding this? It’s shouldn’t be too hard. You can get the plane of one of the surfaces - maybe both and check if they are really parallel - then get a point on the second surface and use the rs.DistanceToPlane() method from the point to the first plane. There are also lots of other methods to get the same result.
Are the surfaces always planar?
-Pascal
That right! They are different in shape but always flat and parallel
Hello - then as @Helvetosaur suggests - get a plane from each - you can get that with Surface.FrameAt(u,v) The u and v could be simply the mid parameter of each surface (Surface.Domain()) then use the origin of one of the planes:
plane1.ClosestPoint(plane2.Origin).DistanceTo(plane2.Origin)
should do it.
But, better to post these questions on the scripting forum…
-Pascal
You can draw normal line between these surfaces (Line command > Normal option, Near), and then use Length command to measure its length.