Dynamic Component Area


#21

still curious, I painted one side with an unique name (as required) of the blue brick sample, so on scaling you can see the texture stretch. Now after the stretch, one right clicks the component, then choose “scale definition”, the pattern should then correct itself. Then one right clicks again then from dynamic components, choose the sub menu “redraw”. the DC then corrects the area.
matty.skp (110.6 KB)

If any other is reading this can you do us a favor and try this method and report if it works on windows or apple, just to check that I haven’t got one of those special versions of SketchUp.

This may seem a long way to correct the problem, but it will be the basis of a script.


#22

it works as you describe on my mac…

john


#23

This one works on my MAC as well, but : I got problems with the Option Dialog : It doesn’t show selected components anymore. I noticed it with the first version. The workaround for me is : disable DC in extension manager, quit SU. Then start SU and enable DC. It seems I would always have to do that when opening a DC created on windows. @john_drivenupthewall : do you see the selected component in the Option Dialog ?

edit: It seems that the order of opening the two different dialogs is the culprit :
when I open the dialog first : No problems
when I open attributes first : No components show up in Options


Export to IFC: how to export lines and edit component info
#24

Hi Pcmoor,

Ok, it works as you described, but if I don’t want to use the scale? I have disabled them in my DC.

Thank you


#25

And I don’t want to use textures on faces, I just want a user to specify face length and depth and get a correct area without “redraw” and scale definition! Was this a problem before? Is it just a limitation of DC?

Is anyone knows if possible to wright a simple script for this?


#26

changing the value of lenx,leny…changes the scale, the actual true length only changes if you use “scale definition” for any component whether its dynamic or not. You can use use “reset scale” on both components and groups, but this returns the object to its original size. Otherwise you need to change the raw geometry.

I refer you to


#27

Hi TIG,
I was struggling with this area issue in SketchUp and I decided to wright a small script myself.
Can I get your advice:

  1. Say I have a script which calculates an area of nested components, how would I attach it a component or is going to be 2 different things. So other people can a use a script with other models?

  2. Ruby API says :
    "The area method is used to retrieve the area of a face in current units.
    You can pass in an optional Transformation (or an array that can represent a transformation), to correct for a parent group’s transformation. For example, if a face is inside of a group that is scaled to 200%, the area method will return the unscaled area of the face. So by passing a 200% transformation object to this method, you can account for that to get the “visual” area of the face."
    Is there a method which will apply scale (redraw) nested components so can then extract a correct area without manually “redraw” a component?

  3. How would you approach all this?
    I working on lots of Urban projects and calculating areas and then passing them to Excel is a pain, so I decided to come up with something useful.

Thank you


#28

Hey Guys,
Maybe anyone else ?
Cheers


#29

That is great, but other’s have proceeded and maybe came up with something that will suit your purpose :

Buy Profile builder 2 and use the quantifier or:
Buy Estimator
Consider the time it will take to write something like these extensions versus the cost…


#30

Cool I think Profile Builder is what I want. Will try toady.


#31

Tried Profile Builder, very nice extension, but not exactly what I need. And my worry is what happens if the plugin will stop working.
Besides I made a component I am happy with, the only thing I don’t know how to extract area from it in one click )


#32

I have developed a DC concept which may be built up to suit your requirements, the idea is to nest the floors lower in the model, grouped so by selecting the level in outliner, one can explode twice and select the component for redraw for facearea() to correctly determine the floor areas. The method may seem a bit clunky to begin with, but once a work flow is established, a ruby script will make it but a button or key press.

Open the file and Right click and save the DC to a component folder.

Now, alter the building via the options, … then select the sub group “explode twice” via outliner…right click menu and do that

once twice exploded, right click the component and via Dynamic components select redraw

now the area and footprint is calculated,
You can set short cut keys to these commands to make it a bit quicker, however a script to be developed can do this operation and lock the options to read only
Now if you want to alter this building, via the right click menu, DC, swap with the previously saved

floor areas.skp (70.0 KB)


FACEAREA function has me pulling my hair out! All I get is errors!
#33

Thank you pcmoor! I will try it tonight with my DC.


#34

Hi Pcmoor,
Do you think there could be a way to right a script so I can avoid saving DC and then open it again if I want to change it?
I have attached a WIP DC I am working on.

Kind regards,
Massing.skp (443.8 KB)


#35

For each of the area sub-components, make unique and scale definition. Then redraw the parent component.
Redraw and make unique are part of the ruby API. Scale definition seems to have no direct command in the API, however @TIG made a snippet to replicate this action http://sketchucation.com/forums/viewtopic.php?t=36924

So yes it would seem possible. However I personally believe the extended use of copies will lead to file bloat, I would prefer to see this DC developed such that these copies are destroyed, hence my previous suggested workflow.

A extra benefit in converting the floor areas into raw geometry, the floors can be individually edited


#36

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.