[Plugin] xLine2Line
-
Thanks Tig.
-
Thank you TIG.
-
@unknownuser said:
On behalf of all those who downloaded and forgot to thank you I'll offer some thanks.
Thanks TIG
Ditto 'me wee lad...' 105 downloads and 3 replies.....
I must have missed this one, thanks TIG; I'd download it now!!!
-
So we must used the Rick's plug first before use your?
-
The plugin, "xline.rb", changes lines to Xline and Xlines to lines by the context menu. This plugin works great for me.
Header of the Plugin, so credit is given correctly to each script writer.
Name : xlines.rb 1.0Description : Convert selected edges to construction lines
Author : Rick Wilson
Usage : 1. Install into the plugins directory or into the
Plugins/examples directory and manually load from the
ruby console "load 'examples/xlines.rb'"
2. Select "Convert to xLine" from the context menu after
selecting an edge.
Date : 2008-01-21
Type : Tool
History:
1.2 (2006-07-06) - Modified by D. Bur, Lines stipple supported. Back converter integrated.
1.1 (2008-01-21) - updated to put resultant geometry in the same entity space as the original
1.0 (2004-08-20) - first version
-
xLIne2Line
Don't work for these guides lines
-
@unknownuser said:
xLIne2Line
Don't work for these guides lines
[attachment=0:2ggms2o7]<!-- ia0 -->dont_work.png<!-- ia0 -->[/attachment:2ggms2o7]That's because they are not clines - they are cpoints! - note the point on the start position...
Replace them with clines to see the difference... -
This plugin, as well as the original xLine processes the entire selection in its context handler.
def xLine2Line_validate_selection Sketchup.active_model.selection.each {|e| return true if e.class == Sketchup;;ConstructionLine} return nil end
This can lead to severe lag on large selection sets. As I mentioned in my thread about the topic, http://forums.sketchucation.com/viewtopic.php?f=180&t=31788 , I am currently looking for best practice methods to provide context menus for the selection. At the moment I'm adding a limit to how large selections I process - if the selection is larger than 1000 I assume there is something in the selection of interest.
-
@thomthom said:
This plugin, as well as teh original xLine processes the entire selection in its context handler.
> def xLine2Line_validate_selection > Sketchup.active_model.selection.each {|e| return true if e.class == Sketchup;;ConstructionLine} > return nil > end >
This can lead to severe lag on large selection sets. As I mentioned in my thread about the topic, http://forums.sketchucation.com/viewtopic.php?f=180&t=31788 , I am currently looking for best practice methods to provide context menus for the selection. At the moment I'm adding a limit to how large selections I process - if the selection is larger than 1000 I assume there is something in the selection of interest.
It breaks once it finds something matching so on average it'll only iterate half of the selection ?
If you want to 'extract' something from a selection then what other may is there but sift through it ?
Wouldselection.to_a
be quicker ? -
@tig said:
It breaks once it finds something matching so on average it'll only iterate half of the selection ?
Or it could be last in the stack...
@tig said:
Would selection.to_a be quicker ?
No.
The whole issue is that when you have a large selection 100K+ processing every entity is going to give a performance hit. One plugin add some lag, and when you combine all plugins installed you have many second lag before the context menu appear.
What I do at the moment, is that if there is more than 1000 entities I just assume there is something of interest in the selection and show the menu item. Then make sure the method that processes the selection filters out the entities of interest. It's better that the processing method does the work rather than the context handler.
I timed the lag I had with the plugins installed to 5-10 second for a particular selection of 100K. For larger meshes the times just got silly. Once I modified the various plugins or disabled them I got it down to a few milliseconds.
-
So if you just add the context-item without a selection search pre-check it's much quicker but the menu list gets stupidly long !
-
Yea - that's the downside with that. So I'm still looking for a better solution. I'm currently wondering if such menu items is not fit for a context menu.
The drawback of slowing down the menu is too big. Ideally, context menus should be optional. (Though I have a few plugins myself where they are not optional - simply because they where made to just do a specific job and adding UI to make it an option is an hazzle.)But I'd like an conversation to this topic, because processing the whole selection simply becomes to expensive when you add it all up.
-
Is there a Plugin that converts infinitely long Clines into Lines on a selected face only (so that it automatically deletes the clines past the face's bounding edges and leaves lines within the selected face only). I would like to select a face or the bounding edges, execute the plug-in and have a face with lines on it and all the clines gone.
-
No, this one here makes all clines into edges unless they are infinite rays or clines...
You could take the code and rework it to do the calculation to project the 4 planes through the sides of the screen and the camera and intersect those with the cline to get the extents and draw a new line between those and erase the cline... -
freakin awesome thanks.
-
thx tig
-
THX TIG
Advertisement