CreateRefinedLoopMesh, CreateRefinedCatmullClarkMesh bugs

Hi @dale,

i’ve tried to use Rhino.Geometry.Mesh.CreateRefinedLoopMesh using a simple quad or mesh plane. The result is always that some vertices are converged at the world origin, regardless of the loop formula used.

Using Rhino.Geometry.Mesh.CreateRefinedCatmullClarkMesh, i provided the settings for NakedEdgeMode like below:

Rhino.PrivateMeshCommands.MeshTypes.CreaseEdges.CornerFixedOtherCreased

the result is always that the corner faces are missing. My guess is both methods need further investigation. Could these 2 methods preserve mesh texture coordinates in the future ?

_
c.

Hi @clement,

This isn’t anything I know about. @piac, is this something you can help with?

– Dale

Those methods are not currently for public consumption.
In fact, they do not autocomplete. They may be changed or removed without warning in any SR.
I am not sure why they appear in the help, but they should not.

@will do you know how to remove them?

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Potentially by adding the <exclude /> tag to the XML comments for the methods that you want to hide.

1 Like

:crying_cat_face: So sad, i really was pleased to see them and would have a lot of use for it. But i’ve found more bugs, eg. when using Mesh.ClosestPoint on the resulting meshes when they are in memory and not created in the document…

Will try to do access wb now to create the subdivided meshes i need.

thanks,
c.

Did you find this method through our API documentation or through python’s autocomplete?

Sorry, I apologize for the mistake.

You can do that both from NodeInCode in C#, and from Python with ghpythonlib (extremely easy).

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

thanks @piac, i had bookmarked the example @Jess provided but i have this problem: If GH has not been opened and the example script is run the first time, i get this:

then this:

> Grasshopper has started loading all component libraries
>  * Loading Grasshopper core assembly…
>  * Loading CurveComponents assembly…
>  * Loading FieldComponents assembly…
>  * Loading GalapagosComponents assembly…
>  * Loading IOComponents assembly…
>  * Loading Kangaroo2Component assembly…
>  * Loading MathComponents assembly…
>  * Loading ScriptComponents assembly…
>  * Loading SurfaceComponents assembly…
>  * Loading TriangulationComponents assembly…
>  * Loading VectorComponents assembly…
>  * Loading XformComponents assembly…
>  * Loading Firefly assembly…
>  * Loading Firefly_Kinect assembly…
>  * Loading Firefly_X assembly…
>  * Loading KUKAprcNEW assembly…
>  * Loading Cocoon assembly…
>  * Loading Exoskeleton2 assembly…
>  * Loading Plankton assembly…
>  * Loading goat_includes assembly…
>  * Loading goat_main assembly…
>  * Loading HoopSnake assembly…
>  * Loading GH_Kangaroo0080 assembly…
>  * Loading Weaverbird.Gh.CommonSdk assembly…
>  * Loading GhPython assembly…
>  * Loading Blend Curve G1 user object…
>  * Loading GraftMultiple user object…
>  * Loading Interpolate (3 colors) user object…
>  * Loading MeshFromPoints_1 user object…

then this:
grafik

After clicking on No, my script runs. But above takes quite a while to complete. I do not get the errors if GH has been opened and closed at least once, Is there a way to avoid that or is opening GH a precondition to access the WB features ?

_
c.

Importing ghpythonlib in the Rhino editor is not supposed to do any of these. However, it seems you have a lot of plug-ins, and some may expect Grasshopper to be loaded to do some ‘tricks’, like adding menus, or other unspecified operations that are not necessarily ‘allowed’.

ghpythonlib and NodeInCode require Grasshopper to open. I would like to investigate what plug-in/plug-ins cause this. Would you be helpful and try disabling some of the add-ons (MeshFromPoints_1 as a test) and the Arduino one (what is that one called?).

It’s also allowed to add references to Weaverbird.CommonSdkSupport.dll (provided that you do not distribute it). It’s not so straightforward, but then you can execute WB operations without loading GH.

1 Like

HI @piac, yes it does this too if i try to use NodeInCode. I’ll have no idea how to disable certain plugins and think this is not a good idea as i have no clue if my client likes this behavior (the loooong load times together with the disabling of plugins).

How would you use the FindComponent method to access “wbCatmullClark” ? I always get None. The helpfile mentions to use a library name and period, i’ve tried all possible combinations but could not access it.

Thank you, i can try this, but i need to redistribute my scripts to my clients. Thats why i have been exited to see a CatmullClark method in RhinoCommon. I could use it at least in V6 without further hassle. I have one script which does CC as well, but it is not as fast as the C# version. All in all, it’s pretty cumbersome to make this work on all platforms and V5 + V6 using the same code , the subdivision i need is only done in memory and the meshes should never be added to the doc…

_
c.

Both, it autocompletes in the python editor and was listed in the online docs.
_
c.

I just meant to temporarily uninstall them from your machine. See if the problem for the Arduino one goes away. If you then report that plug-in name to me, I will contact the developers and see with them a way to improve their plug-in or Rhino so that they work with one another :wink: .

You can write down a list of all functions you have with:
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_NodeInCode_NodeInCodeTable_GetDynamicMemberNames.htm

A = Rhino.NodeInCode.Components.NodeInCodeFunctions.GetDynamicMemberNames();

The “.” is only for Python.

Just as a comment, NodeInCode in C# and ghpythonlib essentially work in the same manner. The same error dialogs will be present also in C#, unless we fix them. I can tell you that I fixed the first one today, and the fix will be included in Rhino 6 SR7. With your help, also the next two will be fixed, soon. Thanks!

Hi @piac,

using the dll works flawless, no error messages and no load messages are printed to the commandline. I just need a way to find out if the file location i use on my system can be found on other systems. It is currently the best of all methods as it works with V5 and V6 in the same way.

Regarding the NodeInCode problem, i guess the arduino.exe error comes from the FireFly plugin. I’ve not installed any plugins in GH for RH6 myself, they where all automagically migrated from my GH installation i use in RH5. When i disable that plugin (3 entries under Preferences / Solver / Plug-In Loading) by adding the load protection, the error message dialog does not come up again but i get these instead:

grafik
grafik
grafik

When calling NodeInCode i do get this one from goat too:

grafik

I’ve checked this “Do not show this warning message again” numerouos times, but after reopening GH in RH6, it comes up again. When i add the loadprotection (2 entries) i get this everytime:

grafik
grafik

All the plugin load messages are still printed to the command line though. After all this, i can select the mesh and continue. Note this only happens once and only if GH has not been opened yet. Does this help ?

_
c.

If you do it in Python, then just clr.AddReference("Weaverbird.CommonSdkSupport") will necessarily work if WB is installed correctly. In C#, just adding the reference and using it from a specific method will work, again if WB is installed in Rhino.

Thanks; this is helpful.

The “automagical” migration was something that was discussed.

Regarding all these dialogs, I think @DavidRutten might want to chime in regarding the reasons why the dialogs should appear every time.

EDIT: I just remembered about the _GrasshopperIgnorePlugin command, that can be used to remove “automagically migrated” plug-ins from V6. See more info.

1 Like

Thanks, i can confirm this works from RH6 without a path where i have WB installed in GH. But i do not have it in V5 so there i get the message:

Could not add reference to assembly Weaverbird.CommonSdkSupport

So basically i need to know the default paths for V5 and V6 to verify i can add the reference, i guess i will just put it into a try / except block…

After using the command for all 3 firefly gha files and the two goat gha files, i can call NodeInCode without error dialogs popping up. Only the loading messages are printed to the commandline and i notice the loading time.
_
c.

1 Like

Yes, Rhino automatically looks for .dlls in all plug-in locations. So, if WB is not installed, the .dll might not be found.

Great!