[Plugin] AreaTextTag

Re: [Plugin] AreaTextTag v1.3 20120102

Postby brookefox » Wed Feb 08, 2012 9:15 pm

Thank you for sharing, TIG.

Very, very useful for me...
0
~ Brooke
User avatar
brookefox 
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby brookefox » Wed Feb 08, 2012 11:31 pm

Is there a way to add multiple faces to get one total area? I see I can handily do multiple individuals to get multiple results...
0
~ Brooke
User avatar
brookefox 
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby TIG » Wed Feb 08, 2012 11:35 pm

brookefox wrote:Is there a way to add multiple faces to get one total area? I see I can handily do multiple individuals to get multiple results...
The areas of 'surfaces' made from faces with smoothed edges are reported as 'one' if the edges; visibility is 'off'.
You can of course report areas of selected/all tagged faces using a CSV file and the appropriate tool in the set...
Please read the notes...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby brookefox » Thu Feb 09, 2012 12:02 am

Well, thanks. I read your top notes, if that's what you mean (and the rest though less carefully). I see nothing about my question but don't doubt I may be missing it still.

Trying your instruction doesn't work for me. Please see this pic:

0
~ Brooke
User avatar
brookefox 
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby TIG » Thu Feb 09, 2012 12:54 am

It's not so clear from your image what it is you are trying to tag...

If the boundary edges between two faces are 'smoothed' [and not visible] then the picked/selected area-tag reports the area of the 'surface' - i.e. the two combined faces - otherwise each face gets an individual area-tag.

If you want to show an area split into 'parcels' provided that the dividing lines don't split the face then the area-tag will refer to the underlying face. To stop the face splitting you could either leave a small gap in the line so there is no loop and therefore the face isn't split, or you could use a group to separate the 'dividing' lines from the face so that whilst the face might look like it was divided up it is not, OR draw two sets of faces - one set sub-divided and tagged individually and the other made as a copied group of faces on its own layer with dividing lines removed so there is one face to take the 'combined' tag... Also if you know the total area of a group of plots [found from a temporary outline say] you could add that to each tag's suffix - e.g. "Plot 1 <>\nof 12.3acres", "Plot 2 <>\nof 12.3acres" etc where each <> will contain the actual area, then if you adjust the dividing lines between plots an auto-recalc will adjust each plot's area but display the total consistently ?

You can export a CSV file listing areas-tags and any text you might associate with the area-tags to help identify them. The total is easily got for the area-tags in a column...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby brookefox » Thu Feb 09, 2012 1:36 am

Thank you. My problem was with the 'visibility off', by which you were not referring to hidden or not as I had assumed, but rather to smoothing aspects.

Work-arounds are easy enough.

To clarify what I'm trying to tag:

0
~ Brooke
User avatar
brookefox 
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby TIG » Thu Feb 09, 2012 10:23 am

If it's a single face it gets one area-tag - delete the intervening edges if it's all coplanar.
If it's a single surface that's not coplanar you must 'smooth' the common edges between faces [not just 'hide' them] - i.e. with view>hidden-geometry 'on' use Erase+Ctrl. Then with view>hidden-geometry 'off' place an area-tag on one of the surface's faces - now it'll report the 'surface area' - i.e. the combined areas of all of the connected faces...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby castaway » Wed Mar 21, 2012 1:09 pm

Thank you for such a useful plugin, TIG.
I am having some trouble with accents though, take a look at the screenshot, it should read "HABITACIÓ 1 ..." "HABITACIÓ 2..." and "DISTRIBUÏDOR". Should I change any setting to adjust the text language or character set?
0

castaway 
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby TIG » Wed Mar 21, 2012 1:52 pm

If you use those accented characters in 'plain' Text does it then work OK ?
The tool should simply concatenate the same text/areas into one string...
:?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.3 20120102

Postby castaway » Wed Mar 21, 2012 2:02 pm

Do you mean creating a text label through Tools > Text? If so then yes, accents are displayed just fine.
0

castaway 
 

Re: [Plugin] AreaTextTag v1.4 20120321

Postby TIG » Wed Mar 21, 2012 4:10 pm

Here's v1.4 viewtopic.php?p=373717#p373717
The correct interpretation of UTF8 accented characters etc in customized area-tags has now been resolved.
:enlight:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.4 20120321

Postby castaway » Thu Mar 22, 2012 11:07 am

TIG wrote:Here's v1.4 viewtopic.php?p=373717#p373717
The correct interpretation of UTF8 accented characters etc in customized area-tags has now been resolved.
:enlight:


Wow, that was quick and effective. Now it works beautifully, thanks a lot!

I am having some trouble exporting to cvs though, the only contents of the exported file is "LAYER,TEXT,PERIM,AREA,UNITS". Perhaps I am doing something wrong, but I think I have followed the instructions properly (save as and then export to cvs). I am attaching you the skp file used in my tests.
0
Last edited by castaway on Thu Mar 22, 2012 12:34 pm, edited 1 time in total.

castaway 
 

Re: [Plugin] AreaTextTag v1.4 20120321

Postby TIG » Thu Mar 22, 2012 11:57 am

OK...
You have the area-tags inside a locked-group.
It [should***] only reports on tags in the active_context.
So unlocking the group and editing it should then produce the CSV...
***BUT it fails - I am investigating why... :?
If I explode the group the area-tags export OK, BUT I notice the Unicode accented-character errors recurring - so I'll fix that at the same time...
Watch for an update soon...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.4 20120321

Postby castaway » Thu Mar 22, 2012 12:13 pm

Hi again,
I noticed the behaviour you described and was about to post about it when I saw your comment.
One more thing about the exported cvs file if I may: as you can see I am using the following structure for the labels: label name, a new line and the area. The exported cvs outputs exactly this, in the form of "LABEL NAME\n<>", which does not seem very clean. What I can do is run a "find and replace" operation for "\n<>" in LibreOffice and delete it, but imo it would be cleaner if that information was not in the cvs exported file.

Thanks for looking into this.
0

castaway 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby TIG » Thu Mar 22, 2012 1:20 pm

Here's v1.5 viewtopic.php?p=373717#p373717

The CSV reporting is fixed - it now uses correctly accented UTF8 characters, and now reports Tags in the active context properly [so if they are inside a group edit that group before running the reporter].
It now also strips all '\n' from reported 'names'
It substitutes '/' if there is multi-line text, other than 'name\n<>' which becomes 'name' anyway, whereas 'name\nmore\n<>' becomes 'name / more' in the reported name.
If the name includes text other than '<>' then the '<>' is always omitted - so 'name <>' becomes 'name '.
However, a Tag with just a '<>' [or '<->'] is still reported as named '<>'.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby castaway » Thu Mar 22, 2012 1:45 pm

I just tested it and works perfectly, I wish I had a hat to take of to you. Thank you so much!
0

castaway 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby ZFRPS » Thu Mar 22, 2012 2:16 pm

Dear Tig:
good job!The CSV reporting is my want,Very slow when reporting ....
01.jpg
0
sketchup is bim

ZFRPS 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby TIG » Thu Mar 22, 2012 2:26 pm

Its 'slowness' is because it must find all text-tags in the current context by sifting out other things, then it must 'update' them in case a tagged face has changed since the last update, it also must check for tags that are no longer glued to a face and ignore them, and also for duplicate tags placed on the same face and so on [this can be done beforehand using 'Update' manually, which might speed up the CSV a little]... the writing of the CSV file itself is relatively quick once the updating concludes... ;)

I noticed that your CSV toolbar button icon is missing - I have missed it out of the subfolder set.
I'll add it to any future updates, but meanwhile if you substitute/add these two PNG files into the tool's subfolder it will fix the missing icon...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby ZFRPS » Thu Mar 22, 2012 2:38 pm

Dear Tig:
Here amount only:100*100*6=60000;slow !!Half an hour past it no finish!
if csv change to xml ?
or other way ?

Thanks again !
0
sketchup is bim

ZFRPS 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby ZFRPS » Thu Mar 22, 2012 2:47 pm

OK!
Irrespective !
I only look forward to it change to very very quickly !

Your job is great for all SU-FANS,I love you !

THANKS AGAIN
0
sketchup is bim

ZFRPS 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby ArCAD-UK » Thu Mar 22, 2012 4:14 pm

TIG, Many thanks for developing this.

I have just downloaded the RBZ and have tried a few variations of tagging but keep getting zero perimeters. The areas are working as expected with simple rectangles and no grouping. Bug or have I missed something?

Update: If I change "Report Surface Area" to Yes then perimeter is reported.
0

ArCAD-UK 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby TIG » Thu Mar 22, 2012 5:54 pm

ArCAD-UK wrote:TIG, Many thanks for developing this.

I have just downloaded the RBZ and have tried a few variations of tagging but keep getting zero perimeters. The areas are working as expected with simple rectangles and no grouping. Bug or have I missed something?

Update: If I change "Report Surface Area" to Yes then perimeter is reported.
You must apply an area tag directly onto a face.... how the hell is it going to know what face to use if you apply it onto a group or instance ?
So... in the same [edit] context as the face you want to tag pick that face to add an area tag onto it.
If you later export those tags from that context into a CSV file the faces' areas and the faces' perimeters are returned...
The 'surface'=Yes tag is intended for adding area-tags to bound-faces that are 'facets' with hidden/smoothed edges, forming a 'surface' where you want the one area reported for all of them together, getting the perimeter of a 'surface' is much more complex than with a face [in fact it's too complex!]...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby ArCAD-UK » Thu Mar 22, 2012 6:32 pm

Hi TIG, as per my update I was advising that with "surface" = No then the perimeter is not exported to the CSV which is what I was expecting. I now understand your reasoning and will default to "surface" = Yes.

Just a suggestion, reporting the perimeter in both modes may be more logical to the end user, but you know better than most what can be achieved with the coding.

Thanks again for another great contribution!
0

ArCAD-UK 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby guanjin » Sun Mar 25, 2012 5:22 am

未命名.jpg


Can not correctly display units.
0
I come from China, is to learn
User avatar
guanjin 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby TIG » Sun Mar 25, 2012 2:00 pm

If the chosen font has no superscript 2 '²' it won't be shown.
What font is used?
Do you get one with other fonts [use the Settings dialog to adjust various aspects of the AreaText tags] ?
It might be your Chinese OS ?
Do you get any error messages in the Ruby Console [I'd expect not, because 3dText simply skips over missing characters in a font's collection].
If you copy paste this [1.23 m²] into the native 3dText tool's pane, for the same font [Arial?] what gets made ? Does the final '²' appear or not ??
This is what my Arial-Font AreaText tag looks like...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby guanjin » Sun Mar 25, 2012 3:39 pm

I choose Times New Roman, but the display unit does not
0
I come from China, is to learn
User avatar
guanjin 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby TIG » Sun Mar 25, 2012 4:45 pm

guanjin wrote:I choose Times New Roman, but the display unit does not

Have you tried my copy/paste suggestion using the native 3dText tool ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby guanjin » Sun Mar 25, 2012 5:37 pm

Paste the local, show normal
0
I come from China, is to learn
User avatar
guanjin 
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby TIG » Sun Mar 25, 2012 6:01 pm

It works fine for our western PCs? :?
As a temporary fix...
Edit the main .rb file inside this tool's subfolder using Notepad.exe.
Find the 4 occurrences of the text
.gsub(/2/,"²")
and change it to read
.gsub(/2/,"2")
then you will get
1.23 m2
instead of the intended [but failing]
1.23 m²
which whilst not perfect it is better.
If you would prefer
1.23 m^2
then change the replacement text
.gsub(/2/,"2")
to be
.gsub(/2/,"^2")
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] AreaTextTag v1.5 20120322

Postby guanjin » Mon Apr 16, 2012 11:59 am

Thank you, of TIG: has been resolved, thanks again!

6666.gif
0
I come from China, is to learn
User avatar
guanjin 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: Einstein and 10 guests

Visit our sponsors: