[Plugin] TIG-weld

[Plugin] TIG-weld

Postby Photonix » Fri Mar 02, 2012 1:39 pm

Hey SU community,

I have the following problem using the weld.rb plugin:

I have to convert all edges of my model to closed polylines in a single step (the model is very complex) prior the dxf export for autocad.

Because I have nested geometries, the plugin does not work in the right way, I have added a simple test file. The plugin only works if I select the box and the text sequentially.

Is there a way to add some code to the weld.rb plugin to get it working with my geometry? My modell has ~4 million edges that have to get converted to closed curves (autocad polylines) with a single selection step.

Thanks in advance,

Marcel
2

Photonix 
 

Re: weld.rb problem

Postby mitcorb » Fri Mar 02, 2012 2:32 pm

Hi, Marcel:
Perhaps I did not understand your question.
I was able to close with weld the segments on the E and the S. Tracing over one of the segments on the E to form a face, I was able to extrude it up. The corners were hidden. I could trace along this corner, or use CTRL+Eraser+Shift to harden the edge. If you want to convert to polylines, you may want to try Fredo6's Bezier tool. With this tool, you should be able to right click on the welded figure, select convert to polyline, or several other possibilities.

EDIT: My apologies :oops: First of all, you posted in the Developer's Forum. I would not normally comment here. What you are requesting is an "en masse" welder. And one that dives down into nested groups and components. There may be technical issues here that I am not qualified on.
I can suggest ThomThom's Clean Up and Vertex Tools in the interim.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: weld.rb problem

Postby Photonix » Sat Mar 03, 2012 11:09 am

Thanks mitcorb,

you are right: I need "En Masse weld".

I already tried the plugins you proposed, without success.

Could anyone help please, its quite urgent.



@ forum moderator: could you please move the thread to the right forum section, thanks.


-
0

Photonix 
 

Re: weld.rb problem

Postby TIG » Sat Mar 03, 2012 12:18 pm

It is relatively simple to iterate a collection of edges and 'weld' them into connected curve 'sets', BUT if any of the edges 'branch' then 'weld' will fail to make a fully curve of all of the edges...
However, help might be at hand - have you looked at 'ReCurve' viewtopic.php?p=324196#p324196
This is perhaps more like you want ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: weld.rb problem

Postby Photonix » Mon Mar 05, 2012 10:17 am

I tried the recurve.rb plugin, without sucess.
It does not work with nested objects. Any other suggestion? Is anyone able to edit the weld.rb to run for nested closed lines as well?
0

Photonix 
 

[Plugin] TIG-weld

Postby TIG » Mon Mar 05, 2012 3:36 pm

Copyright 2004-2005 by Rick Wilson [in parts], and 2012-2017 (c) TIG.

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.
#
TIG-weld_code
#
Description:-
Joins selected edges into a 'curve' (~"polyline").
#
Author:-
TIG - based somewhat on RickW's 'weld.rb'...
[but it has no close/face options, and also made suitable to be called from
other methods].
#
Usage:-
Make a selection which includes the edges to be joined.
Run the script from the menu:
Tools > TIG-weld
or type in the Ruby Console:
TIG.weld +<enter>
or [recommended] set up a shortcut-key, say J [==Join?]
#
Selected edges will then be 'welded' into a curve wherever possible.
Disconnected edges or branching edges might give unexpected results.
A curve will be split where any 'branching' edge intersects it.
The process is one step undoable.

To use the tool run within another method include:
require('TIG-weld.rb')
*** >= v2.0 use:
require('TIG-weld/TIG-weld_code.rb')
to load it even if its extension is deactivated;
and later in the code use:
TIG.weld(true)***
use the 'true' to supress 'undo' complications.
It returns an array of the welded edges or 'nil' if none.
The calling method must make a selection of potential edges to
process, even if inside another context; perhaps iterated in turn,
see scripts like "TIG-weldall.rb" for an example of this...
#
Version:-
1.0 20120305 First public issue.
2.0 20160130 Made into Extension. Signed for v2016 full compatibility.
***Note: with v2.0 the alternative to TIG.weld() can be TIG::Weld.new()***
3.0 20170307 Signed for v2017 full compatibility.

Download

4
TIG
User avatar
TIG 
Global Moderator
 

Re: weld.rb problem

Postby Photonix » Mon Mar 05, 2012 4:22 pm

Thank You TIG,

it works fine, but needs a lot of time for my geometries.

Is it possible to speed it up or if not, to implement a progressbar?

It still runs 30mins for 200.000 edges, no end in sight. I will abort now.

I will try with 15.000 edges and post the needed time when its done.
0

Photonix 
 

Re: weld.rb problem

Postby TIG » Mon Mar 05, 2012 5:00 pm

If I could have sped it up I would have.
It has to iterate every edge in the model and all groups/definitions and then decide which go into which connected curve - it's complex stuff, I'd leave it running as long as you can - it'll beep when done.
A progress bar would only slow it further and as soon as it hits a limit it'll white-out anyway and stop updating it, giving the impression it's stalled when it is actually still processing...
The Task Manager will show if it's still doing its stuff...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: weld.rb problem

Postby matt.gordon320 » Sat Jun 15, 2013 12:00 am

Thanks TIG, we appreciate all your hard work!
0

matt.gordon320 
Premium Member
Premium Member
 

Re: weld.rb problem

Postby august0414 » Sat Aug 10, 2013 4:19 pm

Excuse me ,I would like to know,does this plugin merely fits for Windows?
0

august0414 
 

Re: weld.rb problem

Postby TIG » Sat Aug 10, 2013 6:58 pm

No. It works on MAC too... :roll:

Most Plugins work on PCs AND MACs...

If there are limitations like something is for PC only, OR for Pro only, then this is spelled out in the instructions on the download page...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: weld.rb problem

Postby jeichholz » Sun Oct 13, 2013 12:12 am

Hi Tig,
This may be a slightly different problem in that I am trying to use Sketchup 7. Is Tig-weld.rb supposed to work in that version of SU? I always get bugsplats.

Thanks

John E
0

jeichholz 
 

Re: weld.rb problem

Postby TIG » Sun Oct 13, 2013 11:19 am

It should work on all versions [7-13] and OSs.
Bugpslats can happen with several legit plugins.
These Bugsplats are not usually from the legit plugin itself, but rather from an observer [looking at definitions and entities ?] which is added by a 3rd party 'rogue' plugin, that then breaks [and splats] when the legit plugin does some simple operations on a temporary group it uses in its processes...
A few other rogues might ill-advisedly change base Ruby classes relating to groups etc, and thereby break the legit plugin's code - but the result of these is usually to put errors in the Ruby Console and just abort the operation - so they rarely lead to a full-blown splat...
The rogues are listed in a quarantined set - search SCF.
These include old-podium versions, some newer BIM tools and SketchyPhysics...
To test for adverse affects of plugins on legit ones, use the SketchUcation Plugins Manager to disable some suspects [Tip: use Sets to remember where you started from!], restart SketchUp and see if TIG-weld then works... If it doesn't re-enable the disabled ones, and disable some more and retry... Once you get a shortlist of culprits temporary load them one at a time until TIG-weld breaks again.
Then you know the culprit... :)
Let us know what 3rd party plugin is causing the issue... :roll:
If in the unlikely event that you find TIG-weld still crashes... then please post an example SKP of what it reacts badly to :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: weld.rb problem

Postby jeichholz » Mon Oct 14, 2013 5:07 am

Thanks Tig,

I'll try disabling plugins. I see that Tig-weld works in SU 2013 for which I've not installed many plugins yet. I'll let people know what I find.

John
1

jeichholz 
 

Re: weld.rb problem

Postby Grice » Wed Jan 20, 2016 4:45 pm

A bit peeved when I looked at the long list of incompatible plugins that no longer work for SU2016. This is a request to TIG to update this fantastic plugin which I use probably on every project. Please update it for SU2016.... PLEASE!
0

Grice 
Premium Member
Premium Member
 

Re: weld.rb problem

Postby TIG » Wed Jan 20, 2016 5:26 pm

Grice wrote:A bit peeved when I looked at the long list of incompatible plugins that no longer work for SU2016. This is a request to TIG to update this fantastic plugin which I use probably on every project. Please update it for SU2016.... PLEASE!
Where is this mythical list of incompatible plugins ?***

As far as I know weld.rb still works in v2016 [it's by RickW from Smustard.com] - have you tried it ?

My own take on it - TIG-weld.rb - which is available from the SCF PluginStore - also works just fine in v2016.

***I know many plugins are not yet signed [ the effort involved is somewhat disproportionate to its benefits - but complain to Trimble - not the authors - who have a life too ].
Signing allows them to work in all of v2016's Loading-Policies, BUT at the moment the shipped default Policy for v2016 is 'Unrestricted', which will then let ALL Plugins/Extensions load [just like they do in v2015] - even with 'Approve' you can choose to load an unsigned one.
So even when the RBZ has not been signed it will/can load...

So 'weld' [of both 'flavors' is NOT "incompatible"].
But if you find it's "not working", then please expand on the problems you've encountered...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: weld.rb problem

Postby Dave R » Wed Jan 20, 2016 7:06 pm

Grice wrote:A bit peeved when I looked at the long list of incompatible plugins that no longer work for SU2016. This is a request to TIG to update this fantastic plugin which I use probably on every project. Please update it for SU2016.... PLEASE!
I can attest to the fact that TIG's weld plugin does indeed work in SU2016. If it doesn't for you, you've either not installed it correctly or you're using it incorrectly.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: weld.rb problem

Postby juju » Thu Jan 21, 2016 12:07 pm

when you log into the EW it will list the plugins (my plugins section) you have / use that isn't compatible with 2016, they're under a separate heading. Although I don't quite get it as they seem to install and work fine...
0
Save the Earth, it's the only planet with chocolate.
User avatar
juju 
Premium Member
Premium Member
 

Re: weld.rb problem

Postby Dave R » Thu Jan 21, 2016 12:19 pm

juju wrote:when you log into the EW it will list the plugins (my plugins section) you have / use that isn't compatible with 2016, they're under a separate heading. Although I don't quite get it as they seem to install and work fine...


As TIG wrote, it only means they haven't been signed by Trimble which doesn't affect the way they work. He also has a good point about the time and effort on the part of the authors to get them signed by Trimble. The vast majority of plugin/extension authors aren't getting paid to make them and keep them up. They need to make a living, too.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: weld.rb problem

Postby Box » Thu Jan 21, 2016 12:23 pm

Not to mention that complaints about issues with the Extension Warehouse should be addressed to the Sketchup Forum where Trimble employees can see them.
Sketchucation released its plugin store before the EWarehouse and looks after the plugins there. Trimble is entirely responsible for the extension Warehouse.
1
User avatar
Box 
 

Re: weld.rb problem

Postby TIG » Thu Jan 21, 2016 10:02 pm

juju wrote:when you log into the EW it will list the plugins (my plugins section) you have / use that isn't compatible with 2016, they're under a separate heading. Although I don't quite get it as they seem to install and work fine...
That's because ANY extension/plugin which worked in v2015 will also work in v2016M0 in 'Unrestricted' its Loading-Policy - signed or unsigned.
So Trimble are [currently] being disingenuous in 'blacklisting' any 'unsigned' RBZs.
But they have thus far handled this whole issue very shoddily [IMHO].

It takes not inconsiderable effort for authors to recast their plugins/extensions to be fully v2016 compatible, and then to get their RBZs signed by Trimble via the Extension-Warehouse.
Many of these are 'free' so there's little incentive for a quick fix.
Many are also not available through the EW - but only through other trusted outlets like the SketchUcation's PluginStore [aka ExtensionStore³] or Smustard.com.
But... after considerable 'behind-the-scenes' pressure "they" have thus-far agreed to provide the [default] 'Unrestricted' Policy, which allows v2016 to work much as v2015 in this regard.

So any Plugin/Extension which worked with v2015 will [probably***] work with v2016M0.
***There are some observer changes, which could break a very few extensions - but these will probably have been updated anyway...


The whole question of what protection/comfort a 'signed' extension gives to a user is illusory.
Trimble's smoke-and-mirrors.
Previously if a user got an RBZ from the Extension-Warehouse, SketchUcation's PluginStore [aka ExtensionStore³] or Smustard.com [let's called the a 'trusted-source'], then they could be assured that the RBZ's contents were 'kosher'.
These were only lodged on these sites after checks...
Now for v2016 use [unrestricted by the current Loading-Policy] SketchUp v2016 expects a 'signed' HASH RBZ.
BUT if you get a 'signed' RBZ for v2016, it is NO different in effect...
What 'comfort' does a user get from this HASH - no more than they had before - because the were getting their RBZ from an already trusted source.
BUT Trimble now shoot itself in the foot.
In v2016 a signed plugin/extension will 'break' and not load if its HASH does not exactly match its RB/RBS/RBE files within the signed RBZ [and also several other files like HTM/MTML/JS/CSS].
The likelihood of this happening with a file from a 'trusted-source' is ZERO.
It is very unlikely to contain 'malicious content'.

BUT let's assume an alternative scenario...

Some hacker ['hacks_are_us'] gets an RBZ and he changes it.
If someone downloads that RBZ from 'hacks_are_us', then that version if it has changed the shipped content will fail.
At least until they learn to hack the signed HASH file !
BUT if they are circumspect it can be made to contain malicious content, even today.
It relates only to "Extensions" - plain vanilla "Plugisns" are [ironically] exempt from such hacking !

It relies on the EW signing regime.
You must submit a set of files in the RBZ in RB format.
Encrypted files - RBS and the new RBE - are NOT accepted.
This is so the checkers can easily read what you submit.
An extension must specify the path to the file it first loads.
E.G. Aardvark.rb has a subfolder containing the main code,
E.G "Aardvark/Aardvark_code.rb"
This works if the file is NOT to be encrypted.
It is necessary when submitting RBZs to the EW, otherwise the not-yet-encrypted files will NOT load.
So authors will ship the RBZ with Aardvark.rb specifying the paths
"Aardvark/Aardvark_code"
Sketchup is clever enough to find a file that is .RB or .RBS and load that.
If the author chooses to do no encryption all is well [their IP is exposed, but they probably don't care that much].
If the author chooses to encrypt as .RBE [suitable for >= v2016] then in >=v2016, that RBE loads in preference to all other files it finds using the same 'basename'.
The newer RBE is strongly encrypted, and thus far it is un-hacked and protects authors' IP - but this protection is at the limitation of only working in >= v2016 - with the downside being that it limits the potential user-base...
BUT if the author chooses to encrypt as RBS [a format will limited protection from IP hacking. BUT on the up-side compatible with ALL SketchUp versions - including v2016 (despite what the signing-portal says!)] then it will load OK in all current versions of SketchUp.
It's susceptible to hacking, but if the extension is old its IP is already compromised !

Now the problem.
SketchUp - including v2016 - has a loading precedence - when a extension looks for Aardvark/Aardvark_code it finds a match.
Perhaps in >= v2016 it finds Aardvark_code.rbe, and loads that - in preference to all others.
But in v2016 [when there's no RBE], or other earlier versions, it finds Aardvark_code.rbs, and loads that.
BUT now the rub...
If there is a file named Aardvark_code.rb it loads that in preference to the RBS file that might be there.
But why would both files exist ?
When an author submits an RBZ for signing, then it is returned to him with either ALL RB files kept in the subfolder [no encryption], or ALL RB files in the subfolder encrypted as RBS*** - as he chose.
The signed HASH file reflects this, so ANY alterations to those files in that subfolder are flagged, and it is deemed invalid.
However, if the subfolder contains RBS files, the HASH checker [currently] has no way for spotting that a new RB file has been added to the RBZ and the 'loader' will load that instead.
So if my RBZ 'Aardvark.rbz' contained Aardvark.rbto load it and it's encrypted by EW to have Aardvark/Aardvark_code.rbs, then if a hacker adds Aardvark/Aardvark_code.rb then that loads in preference.
The added Aardvark_code.rb is not spotted in the [current] HASH check.
It can contain 'malicious content', the it can load Aardvark_code.rbs.
This the user has no idea what's happened - the tools works exactly as advertised.
BUT it could have done something bad in the background - hacking their system, passing details to unauthorized 3rd-parties etc...

This 'loophole' is a poor show by Trimble.
It'd be easily fixed if the SketchUp extension loader code only only allowed the files listed in the HASH to load - currently it does not.

Changing the load order to RBS before RB is of no real benefit either, because an RBS format file is easily made, and if added to the RBZ it would then supersede the RB [albeit in un-encrypted low-value plugins' RBZs]...

***An RBE file does load first, so that avoids the hacking issue, but limits authors to >=v2016 users only...

So the only supposed benefit of a signed RBZ is that it gives you comfort that it is 'genuine'.
But that is "illusory".
Getting it from a trusted source gives you that confidence.
Getting a signed RBZ from a dodgy site means nothing - unless it is only suited to >-v2016, then it could be hacked - but still seem to be perfect.
So sensible users, who getting their RBZs from trusted sources, have no more comfort than they had before [which was always 'considerable'].
BUT stupid users, who get their RBZs from less reputable sources. will only have themselves to blame, if they contain 'malware' etc: the signing process offers no real protection for them for that [<v2016 or in v2016's Unrestricted Policy].
BUT that begs the question, "Why do we worry about 'protecting' them anyway?"

It's a mess.
1
TIG
User avatar
TIG 
Global Moderator
 

Re: weld.rb problem

Postby Grice » Sat Jan 30, 2016 7:55 am

I take it all back... despite Trimble's plugin warehouse listing this plugin as not compatible with SU2016, I installed it anyway and it is working fine...

Looks like Trimble need to up their game in terms of keeping their customers satisfied. Isn't that what we pay our yearly subscription fees for?
0

Grice 
Premium Member
Premium Member
 

Re: [Plugin] TIG-weld

Postby TIG » Sat Jan 30, 2016 10:11 pm

Here's v2.0

Download


It's made into an extension and is also signed, so it's fully compatible with all of v2016's 'Loading Policies'.

Note:
Because it needed a name change when becoming a compatible extension, note that if you have a old shortcut key set you to 'Tools/Weld' you need to reset it to it's new persona = 'Tools/TIG-weld'...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] TIG-weld

Postby ericbartha » Tue Mar 07, 2017 5:28 am

Hi - new to sketch up and SketchuNation. Trying to install your Weld extension, but I am getting an "Outdated Signature" error. Even in unrestricted mode it will not load, and my Google search did not help much. Any thoughts?
0

ericbartha 
 

Re: [Plugin] TIG-weld

Postby TIG » Tue Mar 07, 2017 12:18 pm

I should load in Unrestricted mode.
It installed and runs just fine for me too [PC v2017]
It's one of the one's that's not yet been re-signed for full v2017 compatibility.
Thanks for the reminder.
I'll get it re-signed and posted in the PluginStore...
Watch for an update today...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] TIG-weld

Postby TIG » Tue Mar 07, 2017 12:29 pm

Here's v3.0

Download

It be re-signed for full v2017 compatibility in all loading-policies.
1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] TIG-weld

Postby rastamannichk » Thu Jun 01, 2017 7:21 am

It doesnt work in SK 2k15.

How do I install this .rb file?
I try to use the simple plugin installer but wont work and does appear in tool or extension the weld
0

rastamannichk 
 

Re: [Plugin] TIG-weld

Postby TIG » Thu Jun 01, 2017 12:45 pm

rastamannichk wrote:It doesnt work in SK 2k15.
How do I install this .rb file?
I try to use the simple plugin installer but wont work and does appear in tool or extension the weld
Use the Dowmload link button, that's just two posts ago - this goes to its entry in the SketchUcation PluginStore.
Then Download its latest RBZ file from there.

It should work in v2015...

Use Preferences > Extensions > Install Extension... button
[Note that in v2017 this has changed to Window > Extension Manager... etc]

Find the downloaded RBZ and install it.

When it's installed 'TIG-weld' is an extension.
Check that it is activated in the Extensions dialog...

When installed and activated it has a menu item under:

Tools > TIG-weld

There is no Toolbar or context-menu entry for this tool.

You refer to a .rb file - if you mean the customized example RB attached to an earlier post please ignore that and get the last v3.0 RBZ from the link...
You should always get the latest RBZ from the PluginStore...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] TIG-weld

Postby laughcry » Fri Sep 29, 2017 4:26 am

Usefull and smart
0

laughcry 
 

Re: [Plugin] TIG-weld

Postby laughcry » Fri Sep 29, 2017 4:29 am

just tell me where i can download this usefull thing?
0

laughcry 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: tamim and 9 guests

Visit our sponsors: