Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5777

Make2d speed test

$
0
0

Hello ,

I made a python script for rhino5 which uses scripted make2d command.
Since Rhino 7 is out I have adopted the script and it now scripts make2d under rhino7

However, it turns out that scripted make2d in Rhino7 much slower than it was in Rhino5.

The script works in a loop and does a lot of make2d, one after another, each consists of a solid and multiple curves

speed difference goes up to 5-6x depending on the objects selected for make2d

here are the both scripted commands, the rest of the script is identical so no side effects should influence the result

Rhino 5 version:

start = time.time()
                        
rs.Command ("-Make2D DrawingLayout=CurrentCPlane ShowTangentEdges=No CreateHiddenLines=Yes MaintainSourceLayers=Yes Enter ", echo=False)
                        
print time.time()-start

Rhino 7 version:

start = time.time()
                        
rs.Command("-_Make2D Layout=CPlane Properties=MaintainSourceLayers CreateHiddenLines=Yes ShowTangents=No CreateSceneSilhouette=No GroupOutput=No Enter Enter", False)
                        
print time.time()-start

I know that Rhino 7 has api for make2d, but I was looking for the “quick” solution to translate the script from v5 to v7

any guidelines?

If I create a “proper” script using api in rhino 7, can I expect speed increase?

thanks in advance
Aleksandar

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5777

Trending Articles