[Plugin] 2D Tools

Re: [Plugin] 2D Tools

Postby TIG » Thu Dec 04, 2014 12:34 pm

@Joseph

To get the settings dialog to open you need to right-click in 'empty-space'.
If there is any object, like a large face-plane, below the cursor you will get the context-menu instead.
If necessary orbit so you are looking at the 'empty sky' or well to one side of any existing geometry.

The color options should include a sorted list of all of all existing Materials and the built-in SketchUp colors [which include 'Goldenrod'].
Type/copy+paste this into the Ruby Console to see all of the colors...
Sketchup::Color.names.sort.each{|e|puts e};puts
The list is often longer than the height of the screen, so to navigate further down type the first letter of the color - like 'W' for 'White' - this jumps down to the first 'W' is 'Wheat', use the up/down arrows to step through the list to 'White' [this is explained in the Help pages].

You can customize the line of widths to exclude or include whatever you like: the default 'inch' set is available in the file ../Plugins/2DTools/2DlinestyleTool.rb.
You can edit that file using Notepad.exe or an equivalent plain-text editor like Notepad++ or TextWrangler[MAC] [but NOT a wordprocessor].
Line #103 says:
widths="0.05|0.1|0.2|0.25|0.5|0.75|1.0|1.5|2.0|3.0|4.0|5.0|6.0|8.0|9.0|10|12|18|20|24|25|36|48|50|60|72|75|84|96|100|108|120|132|144"
Simply delete unwanted entries or add new ones as desired, each width needs to be separated by a '|'; so e.g. if you don't want 132" delete it, and if you want 200" add it on the end as ...|108|120|144|200"
Save your changes and restart Sketchup to load the new setup...
There is also a separate 'metric' [mm] list, just below that on laine #105, so if you use mm and want to adjust that list's contents you can edit that too.

Since SketchUp's Curves are made from segments of edges any styling applies to those edges, so the styling will appear in those pieces - it would be possible, BUT very convoluted, to get a different result...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby dlp » Fri Feb 20, 2015 5:55 am

I trying to add text to surfaces on my model using the 2D text tool but I get the spinning beach ball (Mac 10.8.5) for 10-20 seconds before it places the text. I am using Sketchup Pro 2015.3.329. Any ideas why?
0

dlp 
 

Re: [Plugin] 2D Tools

Postby TIG » Fri Feb 20, 2015 1:51 pm

Have you upgraded to MAC OS 'Yosemite' recently?
That has had some ttf 3dText-font issues [also used by 2dText via the API]...
Do it occur with all fonts ?
How does the native 3dText tool compare ?
From what you say I assume it is placing the expected text - albeit after some seconds delay...
Does the Editing work the same way ?
If you run 2dText with the Ruby Console open do you see any error messages ?
Have you adjusted your installed fonts away from the standard list ?
Have you adjusted the 2dTools/Fonts.txt list ?
Are all of those fonts listed still available on your MAC ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby driven » Fri Feb 20, 2015 4:54 pm

TIG wrote:Are all of those fonts listed still available on your MAC ?

NO...
the missing ones cause a 'reference to deleted' error...
the SU 'font issue' was with v2013/4 on Yosemite...

I tend to check what is there with...
Code: Select all
fontname = 'Arial Bold Italic.ttf'
%x(mdfind -onlyin /Library/Fonts 'kMDItemKind  == "TrueType font" && kMDItemDisplayName  == "#{fontname}"')
/Library/Fonts/Arial Bold Italic.ttf


john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [Plugin] 2D Tools

Postby TIG » Fri Feb 20, 2015 5:53 pm

The 'Yosemite font issue' was also still seen in early v2015 versions, but it's now fixed since M2 ?
I am puzzled as to why the 'standard list' of fonts shipped with 2dText has non-MAC fonts in it - I compiled it ages ago to include just those ttf fonts common to PC and MAC !

I'll look at your coding idea... but does it also include for any fonts in the MAC user's fonts folder ?
Also the ttf file name does not always reflect the font's name ?
I do need to resolve this available font issue on another [non-public] tool on MACs too...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby driven » Fri Feb 20, 2015 6:09 pm

I am puzzled as to why the 'standard list' of fonts shipped with 2dText has non-MAC fonts in it - I compiled it ages ago to include just those ttf fonts common to PC and MAC !
Apple change the supplied fonts every release, some go, some come back, some switch Libraries...
TIG wrote: but does it also include for any fonts in the MAC user's fonts folder ?

if you use -onlyin you look at one at a time but can also look in ~/Library/Fonts, /System/Library/Fonts
Also the ttf file name does not always reflect the font's name ?
thats why I used kMDItemDisplayName thats the name on the tin
I do need to resolve this available font issue on another [non-public] tool on MACs too...

I have a very good simple tool to do it with, but not for general release plugins...
I do use it in TT's 3DText Tool...
john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [Plugin] 2D Tools

Postby billsmith011683 » Thu Mar 26, 2015 9:35 pm

Howdy there, I am using the 2D Tools plugin and am having difficulty using the "2D Line Style". My difficulty is with trying to select multiple items at once. Under help it says to hold the mouse button to select multiple items. I assume this means you would hold down the mouse left mouse button then hover over the lines you would like to change the style of, release the button and then those lines would change. Is this the correct procedure? If so it does not seem to be working for me. any help?? I have a section cut face that I am trying to show dashed lines in for a demolition plan and selecting each individual line is becoming a chore....

- Bill
0

billsmith011683 
 

Re: [Plugin] 2D Tools

Postby TIG » Fri Mar 27, 2015 2:03 pm

As you have Pro why now do this in Layout?

With 2dLineStyle you can work with lines by preselecting them then running the tool.
You can also click on a line while the tool is active.
You can also 'wipe over' several lines, whilst holding the mouse-button down.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby billsmith011683 » Fri Mar 27, 2015 7:52 pm

I have found success by clicking a line, letting it change and then while still holding down the button flying over other lines and having them change.

I could not preselect the lines then click the tool, once I clicked on the tool the lines no longer were active.

Is it possible to change the lines in layout? I was not able to find a way to change individual line in layout to be dashed, center lines, etc.... Any help you could give me in that direction would be extremely grateful. I am in 2015 Pro

- Bill
0

billsmith011683 
 

Re: [Plugin] 2D Tools

Postby TIG » Sat Mar 28, 2015 1:05 pm

You can recreate the SKP's lines withinin Layout [use a preset scene tab, draw new lines over vertices in the SKP's viewport: if it's a loop set Layouts shape to have no fill - unless of course you want that to obscure something in the SKP/viewport] and set them up, or edit them later, as desired -e.g. width, color, line-style etc.
Arrange the 'draw-order' so the viewport remains behind the new lines/shapes.
Assign layers and lock viewport/new-lines layers in place.

If you want to hide the SKP edges that you've over-drawn then assigned them to a SKP-layer that is OFF, update the Scene--tab and reload the SKP into Layout.

You can also copy edges within the SKP and paste them directly into the Layout, but that requires more practice to get them right - see Nick Sonder's videos for more details...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby billsmith011683 » Mon Mar 30, 2015 1:33 pm

Thanks for the help, I just kind of see it as doing the work twice, I have already drawn the lines in sketchup and with you tool I can make the lines dashed therefore, I don't have to re-trace the lines in layout and make those dashed and then worry about stacking and locking viewports. I would much rather prefer to set everything up as close to perfect in sketchup then have to depend on redoing work in layout.
0

billsmith011683 
 

Re: [Plugin] 2D Tools

Postby spookydd » Mon May 04, 2015 11:58 pm

Hi all,
I can't get this plug-in to work at all.
I'm on OSX 10.8.5 (I won't upgrade), but I don't think this would make a difference.
Tried it in SU 2014 and 2015, with no results.
It simply doesn't even load, it's like it's not even in the plug-ins folder at all.
Tried manually putting the whole folder in the SU plug-ins folder, nothing registers.
Tried using the SU plugin/Ruby Resources, with the "load single plugin" and "load plugins (entire folder)". Didn't work at all, didn't load it or install it. Tried using this with the "SketchUcation Plugin Index", and couldn't install from there either.
None of the automated methods to install it worked and the manual install didn't change anything, as its presence won't make it work.
I don't know what else to try. I pulled up the ruby console, but I don't know what to do with it, as it's totally spartan.
All I wanted to do was to draw dashed lines.
What Am I missing?
Thanks
0

spookydd 
 

Re: [Plugin] 2D Tools

Postby TIG » Tue May 05, 2015 12:25 pm

You seem to be making this more complicated than it is...
You download '2Dtools' from here http://sketchucation.com/pluginstore?pln=2Dtools
You should now have an RBZ file.

Open any version of SketchUp >=v8M2 and use...
SketchUp > Preferences > Extensions > Install... button
Chose the RBZ and answer in the affirmative to any dialogs.
It should now be installed and available to you.
It appears in the 'Draw' menu, with a '2D Tools' submenu listing the various tools.
It also appears as a '2D Tools' Toolbar - which you might have to activate the first time you install it.
There are also some context-menus which appear to Edit selected '2Dtext' and '2DlineStyles'...

The only known issue on a MAC is sometimes with '2Dtext'.
There is a file named '2DtextTool_Fonts.txt' in the ../Plugins/2DTools subfolder, it's the list of fonts available for use with '2Dtext'.
It contains the font names common to PC and MAC.
Unfortunately on newer MAC OSs Apple have removed a few 'standard' fonts and added others.
A PC it can cope with a missing font - it simply reverts to 'Arial', BUT a MAC with 'BugSplat' if you try to use a listed font that is not installed.
You can edit that text file to remove the few fonts that are not installed [or you know you will never use]; you can also add fonts as desired.
Just make sure that the list only includes installed font names.

To open you Plugins folder use this copy+paste + <enter> in the Window > Ruby Console.
UI.openURL("file:///#{Sketchup.find_support_file('Plugins')}")
You can then open the '2DTools' subfolder and find that text file...

Alternatively to open the file in your Text-Editor use this in the Ruby Console...
UI.openURL("file:///#{Sketchup.find_support_file('Plugins/2DTools/2DtextTool_Fonts.txt')}")
Edit and save.
Restart SketchUp to ensure the changes are registered with the tool.
To see a list of your MAC's installed fonts... use the 'Font Book', which you can open from your MAC's 'Applications'.
1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby Chistabo » Wed Jun 24, 2015 11:33 pm

If only line style window (Edit line style) would remember last used settings (line width, line style, color), it would be awesome. Still this tool saves a lot of time. THUMBS UP.
Thank you for sharing,
Simon
0

Chistabo 
 

Re: [Plugin] 2D Tools

Postby TIG » Thu Jun 25, 2015 3:02 pm

Chistabo wrote:If only line style window (Edit line style) would remember last used settings (line width, line style, color), it would be awesome. Still this tool saves a lot of time. THUMBS UP.
Thank you for sharing,
Simon
But it does remember the last used values - at least during a session - on PC anyway...
Do you have the latest version of the Tooslet installed ?
What is your OS and SUp version? - it is missing from your User details.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Wed Nov 11, 2015 6:41 pm

TIG,

As I have stated in the SketchUp forum I get bug splats when I perform 2D Tools - Fillet.

I do not know exact trigger, but I am able to replicate the result with just two lines.

the steps would be:

- draw two lines
- fillet with 5000mm radius
- fillet the same two line with 2000mm radius
- undo
- fillet the same two line with 3000mm radius
- undo

either the first undo, or second, you will crash the sketchup and get bug splat.

Thank you for putting effort in this plugin, it really is a great one otherwise.
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby TIG » Wed Nov 11, 2015 7:43 pm

@JK

I have replicated your actions in v2015.
BUT I get no splats [or any other RC errors] when I Undo these Fillets.
This is using exactly the values you suggested...
My two edges are 'flat' on the ground and their z=0.
Are your values different ?
:?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Wed Nov 11, 2015 8:27 pm

Let me save up a file and send you to make sure we have identical setup.
Thank you for looking into this.
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby TIG » Wed Nov 11, 2015 11:54 pm

@JK

Please attach your files :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Thu Nov 12, 2015 10:20 am

@TIG

sorry, I actually have posted one with attachments, but realized the same steps weren't producing the bug splat. (with rate of 2 out of 5)

Its so strange I get this but splat in multiple machines, but i cannot nail down the exact steps to reproduce.
I crashed it with the same steps more than 5 times, but once it won't.
I suppose you have to try couple of times if it doesn't give you the splat.

Steps that I found are:

Open "TEST.skp"
activate Fillet - 2D Tools
The input radius should already be set to 2000mm (seems like this saves with the file)
fillet all four corners as shown in "TEST.jpg"
undo.
undo.
undo.
Crash.

In my case, the crash will happen at first undo most of the time.
if it doesn't crash, it would actually undo all fine.

Can you repeat this steps couple times just in case it doesnt crash the first time?
I was able to crash 4 out of 5.

I'm starting to think it might have to do with my clicks (maybe mis-clicking the edge and clicking on the face) or the set of orbits or zooms I do in between commands.
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby TIG » Thu Nov 12, 2015 4:10 pm

I can't get it to crash at all it undoes just fine.
I tried all permutations I could think of - clicking the pairs of edges of the 4 corners in all of the permutations I could think of, deliberately mis-picking and missing an edge, then finding it etc etc.
That's a lot of times, >16 !
Every time it worked fine and undid without a mishap.
:?
Can anyone else test this to see if they can break it ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Thu Nov 12, 2015 4:13 pm

I suppose I can make some kind of GIF or video of crashing. But I think it won't help much as you won't be able to get to the bottom of it?

Would it be better if i can send you the error log?
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby TIG » Thu Nov 12, 2015 4:53 pm

You ought to submit the Bugsplat to SketchUp.
Explain the background and what happens.

The error-log is somewhat arcane...

E.G. It might be a clash with another loaded script having a flaky entities observer etc...

Can I suggest you also try this...
Use the SketchUcation Plugins Manager to make a Set of your current set up [blue button], so it's easy to revert later.
Then select all of the listed Plugins, except 2d tools and the shipped-extensions "su_..." ones - which will get reinstalled by SketchUp anyway; and then Disable them [red button].
Restart SketchUp and use 2d tools again to do/undo the fillets - does it still break on undo ???
If not then one of the now disabled plugins is the one doing something bad...
You can revert the Plugins Managers set up by re-applying the saved Set.
Hopefully you now know that a third-party is involved in breaking the fillet tool...
To try and uncover the rogue plugin try disabling about a half of the plugins again and restart, retest the filleting. If the splat recurs then you know the culprit in in the enabled half, try disabling half of those again until you zoom in on the plugin. Alternatively if it doesn't recur try disabling the currently enabled files [sparing 2d tools and su_...] and re-enabling half of what was disabled until you find it that way.
You might be able to reduce the list of plugins to test - e.g. omit testing on all of my own, thomthom's, Fredo's, Whaat's, SDMitch, ChrisFullmer etc, and a few simpler plugins which are all unlikely to cause issues with observers... Concentrate on the unusual / obscurer ones - e.g. those from unusual authors or those with BIM aspirations...

If you do find the culprit let us know - also let the author know too.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Thu Nov 12, 2015 6:21 pm

I will try that soon when I get some time on my hands.

Thank you so much TIG.
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Fri Nov 13, 2015 12:58 pm

@TIG

I was actually able to do what you have requested.
It took me a while since I had little more than 90 extensions to go through.
(yeah, probably too many. but that's after brief clean up)

found two that are suspected as culprits:

su_trimble_connect
TIG-LayerWatcher

I have the version of your LayerWatcher updated in 2015/08/02 which i believe is the most recent.
And the su_trimble_connect is the most recent version as well. (confirmed in EW)

I am not 100% sure they are the cause, I will keep testing without those two running.
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby TIG » Fri Nov 13, 2015 1:50 pm

Thanks for the report.
I also had my LayerWatcher installed so I didn't think that could be the problem.
But after more testing I think it is !

Now to see if the issue is in the fillet's undo or the LayerWatcher code...
Watch this space... :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Fri Nov 13, 2015 3:16 pm

phew,

Thanks for your diligence TIG.
if your LayerWatcher is the cause, SketchUp should investigate Trimble connect as well. Because it was causing issue as well.

I'll keep an eye on this space.
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby TIG » Fri Nov 13, 2015 4:59 pm

The very fact that LayerWatcher adds an EntitiesObserver onto the model.entities seems to make the Fillet tool crash when there's an Undo [in a chain of more than one fillet operation] either within the tool's operation or later on, even if the undo is not in the model.entities context!

If I have an 'empty' EntitiesObserver that does zilch, the Fillet's Undo will still crash, so it's not because it's doing anything - it just needs to exist to cause the issue !

This is weird. :shock:
I made a simple other tools with a similar 'empty' entities observer and this also causes this issue with the Fillet's Undo.
So it's not LayerWatcher's fault per se, but how Fillet's Undo reacts to it !

I can't see an immediate fix...
I might have to sleep on it...
:?

PS: Many other tools do similar things to the Fillet, and they will Undo without an issue.
The Fillet tool is slightly unusual in that it makes its arc inside a group and then inserts that into another group of geometry and explodes it, to force a merging of geometry while maintain the arc's curve properties. The original group's definition is deleted. Perhaps this methodology can be reassessed...
:idea:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] 2D Tools

Postby josephkim626 » Fri Nov 13, 2015 5:55 pm

I can't possible understand everything that you described, but there is no urgency in this. So, I wouldn't mind letting your genius brain do its magic.

I've also noticed upon undo with fillet tool, it adds extra undos in case of fillet radius value change. I do not know if that was an intended behavior, but I find it a bit odd. Maybe that's something that ties with your methodology?

Thank you TIG. :thumb:
0
User avatar
josephkim626 
 

Re: [Plugin] 2D Tools

Postby TIG » Fri Nov 13, 2015 8:55 pm

Here's v7.0

Download


It's made into an extension.
The Fillet tool now sidesteps the issues from some 3rd-party plugins EntitiesObservers.
Also general future-proofing.
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: boubou333 and 11 guests

Visit our sponsors: