Share your favourite scripts, macros and plug-ins

@Rhino_Bulgaria I’ve been told that the better way to run scripts is with _-ScriptEditor _Run, otherwise things can be weird sometimes. But, I’ve fixed that issue by adding #! python 3 as the first line of code, so this version should work regardless. Let me know if it works in V7.

ProjectObjects.py (20.9 KB)

You can also macro a second button (or right-mouse button) that will redo the last ProjectObjects that you ran, but with whatever geometry changes you’ve made:

_-ScriptEditor _Run “(full path)” R Enter

Update: changed the script to Python 2 so that it should run in Rhino 7

Rhinoceros v7 can use only Python 2.7

#! python 2

For some reason my Rhino 7 still can’t use this script.

Warning message
> ---------------------------
> Exception Occured
> ---------------------------
> Message: Non-ASCII character '\xe2' in file D:\PROGRAMI\Rhinoceros 7\Добавки\Project objects\ProjectObjects.py on line 80, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
> 
>   File "D:\PROGRAMI\Rhinoceros 7\Добавки\Project objects\ProjectObjects.py", line 80
> 
> SyntaxError: Non-ASCII character '\xe2' in file D:\PROGRAMI\Rhinoceros 7\Добавки\Project objects\ProjectObjects.py on line 80, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
> ---------------------------
> OK   
> ---------------------------

Looks like this issue was with em-dashes in the comments in the script. Here is a version that I tested in Rhino 7 (I didn’t think I still had it installed!)

ProjectObjects.py (20.8 KB)

(looks like you do have to use RunPythonScript in Rhino 7.)

Thanks! This latest version finally works in Rhino 7.

By the way, is it possible to have density of 50 for both X and Y by default, instead of the current density of 4? With density of 4 the deviation is way too big when the objects are projects onto a curved surface, hence they can’t be combined together or used as an accurate negative part.

While a density of 50 takes a few extra seconds to calculate, I find it far more useful, because I work with a file tolerance of 0,001 mm and only density of 40 and beyond is able to achieve a tolerance of 0,001 mm or less.

Density 4:

Density 20:

Density 50:

@Rhino_Bulgaria It’s just a text file, so it’s easy to change yourself - the variables are xDen and yDen, so if you open it in a text editor and change those numbers, the defaults will change.

Thanks! I found it and it works wonderfully after I changed the values to 50. Here is the modified version.
ProjectObjects.py (20.8 KB)

It’s this portion of the code somewhere in the middle.

Bobi, are you sure 50 is enough, this number is too far from 0.0000 for your taste :slightly_smiling_face:

Peter, This script is great, adding it to my tools.

Thanks guys,

G

that looks so cool

Ha-ha, that was a nice joke! :smiley: In fact, I tried a value of 100, but it produced a nearly identical result while taking significantly longer time to calculate (my Rhino 7 literally froze for a few seconds). This is why I thought that a value of 50 is a nice compromise.

Тhe good thing about this script is that the high value does not add a gazillion number of control points, but rather uses some under-the-hood calculation and then produces fairly clean surfaces with 7 control points in the curved direction and 4 control points in the opposite straight direction (for the tested model from my screen-shots above). For comparison, a value of 4 produces surfaces with 4x4 control points in either direction.

On some highly-curved surfaces the difference between density 50 and density 100 is significant, but the latter sometimes may cause freezing of Rhino.

Density: 100 (2-3 seconds of freezing of Rhino 7):

Density: 1000 (about 10 seconds of freezing of Rhino 7; more complex models crash the program):

That’s excellent, I need to try this with some more complex projections we do.

What is this sorcery, SDF modeling? :

I’d be great to have an SDF modeler inside Rhino.

G

Yes, several SDF modelers are already on the market, including a few free ones, plus a blender plug-in, but their UI is too different from Rhino’s UI. The most user-friendly for learning is the “SDF Modeler by Sascha Rode”. This is the future of hobby 3d printing.

However, I would love to have a native SDF tool set inside Rhino. It would be a nice addition to SubD, especially in a combination with “QuadRemesh”.

Not exclusively. There’s a common misconception by 3D developers and 3D power users of more ‘professional’ tools and workflows, that the ‘loose stuff’ is for hobbyists.

People have been saying the same thing about designing and modeling in SubD for the last 25 years. In the meantime we have designed infotainment dashboards for Ferrari, audio for Bose and McIntosh, medical equipment for Philips, industrial for Olympus, etc., etc, etc.

SFD will be another tool for early design living in the front end way before we are refining in fully detailed Class-xNurbs. In the same way we use both Chavant clay and CNC for models.

What’s the best 3D tool for the job? it depends on the job, and in your discipline, comfort and motivation to always pick the best tool, not the one you have at hand.

Would I like SDF in Rhino? Someday, but now I rather see them focusing on making a really good SubDmodeler, the current one is ok, not great. There’s so much work to do for it, and same for Nurbs modeling.

I prefer seeing a Rhino plugin for it, but that crazy one you linked looks bloaded and scary.

in the meantime we started exploring ConjureSDF in Blender. It’s nice, but developing slowly: https://youtu.be/Sdz_9Vbbi3k?si=BOWN3Ir5GIemAL9Z

G

I have seen this video before, but the plug-in is for Blender, and I’m super confused by their UI since the beginning.
Some industries benefit from tools like these, especially in the early conceptual stage. SubD in Rhino is great for that purpose. However, SFD is the superior technology when it comes to combining multiple objects with editable blending and modify the Boolean operations in real-time.

SDF is amazing for real-time iteration, but only works for exploration as long as primitives with blends and booleans are your only tools, and that works for your design. The primitives-only approach is limiting, but still very useful for many types of form development.

Put this on top of the script:

# -*- coding: utf-8 -*-

I think yes but have you already tried WOMP?
It look super fast SDF modeling system, with great rendering capabilty and ready for 3DPrinting.

They just added AI imageto3D.