Hi, I'm afraid not. I wasn't able to find a solution.
Ross
Hi, I'm afraid not. I wasn't able to find a solution.
Ross
Hi All,
I use SketchUp for creating simplified models for analysis software.
These models need zones creating that pick up the midpoints of internal walls and the inside face of external walls. A screen shot is attached.
Typically this is done from an imported 2D DWG floor plan. The layers etc. will vary.
Can anyone think of a way to create these zones via ruby?
It seems like something that is easy to explain to a human but not so easy to code.
Thanks.
Ross
Hi Pixero,
Thanks for getting back to me. I've had a look through and I don't think any of those plugins will be able to do it unfortunately.
Hi,
It has been a while since I posted, so I'm hoping this is the right section.
I work for a company that uses SketchUp for the thermal analysis of buildings. Regulations now require us to evaluate heat lost through junctions between elements.
For example external corners of a building, or where a window joins a wall. The attached PDF shows some useful diagrams.
The current approach is to make a simple sketchup model of the building, then try to motivate a graduate to measure and record all the lengths associated with these junctions. This can takes hours if not days, a frustrating process as the computer already has the inputs!
So this prompts the question, could this be done automatically with a plugin / algorithm?
My coding experience is limited, but it would be great to get an estimate for the number of person-hours the programming work would take.
If anyone is looking for development work, please get in touch. This plugin would be very valuable to our company and many others.
Thanks
Ross
Hi,
I am trying to use a simple bit of code that allows me to set the color alpha value in SketchUp 7.
I use this version as its the last one with a free DWG importer.
Anyway the problem is I can only get an array from 'UI.inputbox' and I need an integer to set the color.alpha value.
Can anyone correct the code?
Thanks
Ross
` def translucent
model = Sketchup.active_model
materials = model.materials
m=materials.add("translucent") unless m=materials["translucent"] # Adds a material to the "in-use" material pallet.
title = 'Opacity'
prompt = 'Opacity'
default = 0.5
result = UI.inputbox([prompt], [default], "text") # need to use array
m.color = Sketchup::Color.new(100, 100, 100, result) # Specify the colour.opacity
color = m.color
alpha = m.alpha=0.5 # Set material transparency
materials.current = materials["translucent"] # Set to the current material
Sketchup.send_action "selectPaintTool:" # Start the paint tool
end`
Hi,
I am working with some imported geometry (from Revit via DWG file).
The windows of the building are components on a layer called 'Window'.
Inside the components are the frame part on a layer 'Frame' and the glass on a layer 'Glass'.
After importing all the geometry is assigned the default material so it is opaque.
I simply want to select all entities on the 'Glass' layer regardless of if they are in an active component or otherwise and assign to them a transparent glass material.
This would mean you can see through the glass into the room.
A workaround would be to view the model in color by layer mode but I don't want to go down this route.
Does anybody know of any code that can help?
Thanks
Ross
Hi,
I work with a program for building analysis that imports simple SketchUp geometry (e.g buildings drawn with a single face to represent a wall).
The problem is the export tool struggles with window frames. The window can't be drawn as an island inside the frame or it will cause the export to fail.
The most effective work around is to add diagonal lines to break up the frame into simple pieces. See attached image.
The ruby script for the exporter is scrambled so it can't easily be altered. But I was wandering if there was a way to develop a script that creates the diagonal lines automatically.
I can think of two approaches:
Identify the glass window pane by its material (or manual selection) and move it perpendicular to the frame. This way SketchUp automatically generates the diagonal lines I require. And the pane can then be moved back.
Run a script that cycles through each vertex and checks for another vertex within a certain 'grab distance' (100mm sounds about right for most windows). A line could then be added between all vertices less than a certain distance apart and this should hopefully give the desired results.
I hope this gives a clear explanation of the problem and any help would be greatly appreciated.
Ross
Aerilius thanks very much for this - that is a clever approach.
I have tried running the module you have written. However it opens command prompt with an error message "The system cannot find the file specified. 0 file(s) copied".
I have tried debugging through the ruby console (see attachment) and the script correctly identifies my custom template file and the path to my desktop.
However line 8 returns 'false' when trying to copy the file.
I don't understand why this would be the case.
Do you have any ideas?
Thanks
Ross