Can’t seem to find _Inset tool in RhinoScriptSyntax
Is it possible to call it using RhinoCommon ?
Note: _Inset is found under Mesh Tools, and it works with both Meshes and Surfaces. It creates a border of a specified distance around a mesh face or surface.
But it turns out I’m a bad programmer and I don’t know how to setup inputs for RhinoCommon methods.
Coud you please write a simple tuturial on how to use this method ?
Thank you!
the rs.coercebrep converts the object id directly to a brep Geometry which is what the InsetFaces method requires as first argument.
isinstance is a build in function of python. It basically ensures that the returned value of InsetFaces method is of the required type Brep. You could also write like below but it just checks if the returned value is not None:
if new_brep is not None:
# do something here
The Replace method is documented in the RhinoCommon docs. It replaces the brep you picked with the one which now has inset faces.
Redraw() just refreshes the views. In RhinoScriptSyntax this usually happens automatically but in RhinoCommon it is only done when requested.
btw. one way to understand how rs works under the hood is to look into the python files located here:
I see,
I’m confused because RhinoCommon methods require Geometry while rhinoscriptsyntax works with object_id. Am I correct?
And where’s the documentation for scriptcontext ?