[REQ] Optimizing plugin
-
Just asking if it's possible to optimize the plugin; "Convert DWG Layer Names to Materials" to run faster?
-
Yes it is (uses slow
typename
and recurses over all entities in the model).It applies to each entity a material matching the entity's layer (name, random color). It may depend on the input data whether it could skip some recursion (Does the imported model not have any materials, and are all entities in a component on the same layer as the component?).
But please, let's clarify first publicly who is going to do it. Is Al Hart here?
-
Al's is a modified version of this, although it's later update by Didier is a rbs...
@unknownuser said:Copyright 2006, Didier Bur
Permission to use, copy, modify, and distribute this software for
any purpose and without fee is hereby granted, provided that the above # copyright notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Name : layers_materials.rb
Description : manages layers and materials like the "color by layer" mode
Author : Didier Bur CRAI-MAP CNRS 694. ENSA Nancy.
Usage : See below
Date : 27.Sept.2006
Type :Tool
History: 1.0 (27.Sept.2006) - first version.
john
-
Didier's version is better.
Al's doesn't claim copyright, but neither does it eschew it - it does recognize Didier's earlier version.Didier did agree that I could update/overhaul his scripts that were in the SCF PluginStore, but this one is not.
He won't be doing much on his own because of work-pressures...I might have a go doing my own version...
What do you think ? -
That would be great.
-
I've created a new toolset, which I think does what you wanted.
It's now in the PluginStore.
http://sketchucation.com/pluginstore?pln=TIG_layer_material_tools -
Thanks. I'm out of town for the weekend but I will test it asap.
-
We've been toying with an idea of providing automatic feedback to developers when they upload to extensions to EW. We could scan the RB files and detect use of typename and warn developers of the potential performance hit. The typename usage is the most common performance issue we see around.
Advertisement