Please clarify what you mean: a hierarchy of what? One possible answer is to nest Groups or Components inside each other (which creates a "contained in" or "part of" hierarchy). Is that what you mean?
Posts
-
RE: Hierarchy in Sketchup
-
RE: Strayed coordinates
Without seeing your code, this is just a guess, but I suspect that you are falling victim to the fact that all coordinates in SketchUp are internally represented as inches, regardless of the visible units you have set for the model. So, 1000mm=39.37inches. Apply #to_i and you get 39 inches = 990.6mm.
-
RE: Objects on layers?
To expand a bit on John's reply, which I suspect nails the cause of your problem:
You may notice that most of SketchUp's helper windows don't have any 'OK' or 'Apply' or similar button. Instead, SketchUp needs you to do something that tells it that you are finished entering text. In particular, you need to click somewhere else to activate a different input. To resume editing in the model view, you have to click there - possibly on the same object whose layer name you just typed. If you type a shortcut key before reactivating the model view with a click, the shortcut key overwrites or appends to the text you just entered. It can be argued that this is a bad UI design. However, that's the way it works and you have to get used to being attentive about it. I can't tell you how many times I have gotten layers or scenes named 'm'!
-
RE: Add vertices
For starters, please realize that a Vertex is an end location of an Edge - it is not something that can exist on its own - so you are necessarily asking about adding or breaking Edges. You add Edges using one of the drawing tools. You can split an existing edge into a collection of equal sized segments by right clicking it and choosing Divide. If what you need is a location marker, please look into guide points, which you can create with the tape measure tool.
-
RE: Save selected components - but NOT nested components
Doh! Sometimes I miss the easiest things...
-
RE: Save selected components - but NOT nested components
I'd be very interested if someone can correct me on this point, but I don't think a SketchUp model retains any link to where it loaded a particular component from. So, if you have nested components inside another component, they are literally part of that component, not something that is dynamically fetched each time you open the model. So if you save the enclosing component without its innards, they are lost. Likewise, if you save the innards without the container, the container is lost.
Somebody please tell me if I'm wrong, as this would be a major feature!
-
RE: [New scripter] Will need help on my project (now and then)
@ruts said:
But I just want to know why I can use the Matrix class in powershell and not in SketchUp. I'm think it has someting to do with my older version of SketchUp (8)?
That is highly likely, as the Ruby interpreter is complaining about incorrect syntax in the matrix.rb file. SketchUp 8 uses an obsolete version of Ruby (1.8) and does not include the standard Ruby libraries. Depending on where you copied the matrix.rb file from, that could lead to incompatibilities. This begs the question: why not upgrade to the latest SketchUp Make 2015, which uses Ruby 2.0 and includes standard libraries such as matrix?
-
RE: Component missing in Cut List export csv
You have the bolt component nested inside the Infill component. When components or groups are nested, CutList thinks the outer ones are assemblies, not parts, so it doesn't list them. If you need to treat the bolt and the channel part of the infill as a single assembly, edit the existing component, select all its contents except the bolt, and create a new component. It will then be nested at the same depth as the bolt, and will show up in CutList.
-
RE: Face-me Components Rotating Unexpectedly
@aureus said:
3 slbaumgartner, have you checked why shadows of some faces are not cast though they should?
I poked around a bit and found that if you check Edge shadows, those do appear and they don't participate in the gymnastics. But I haven't found a reason why the Faces aren't casting shadows.
Along the way I noticed that this model is about 200m below the red-green plane of your model. I don't think that affects the flopping and shadows issues, but was surprised that you are modeling a canyon

Bottom line: somewhere along your process for creating this you stepped through a portal into the Twilight Zone.
-
RE: Face-me Components Rotating Unexpectedly
Yes, I see the same issue with the file you uploaded. For whatever they are worth, some random observations:
Though the trees are "face me" they really don't look like they are flat to the viewport. Their bounding boxes certainly aren't. Also, the bounding boxes are quite large compared to the tree, as if there is some hidden or minuscule geometry in there somewhere, though I can't find any.
They are nested inside components, so I tried exploding the components. That reduced the bounding boxes to a tight 2D fit, but still they aren't oriented flat to the viewport and still if you find a malignant viewpoint they will tumble.
While they are undergoing weird gymnastics, I can't select any of the offending trees by clicking on their current view location, but they select if I click in open air where they would be if upright. After I exploded the components, if I click on a rotated tree, it immediately snaps back upright!
The effect is quite sensitive to exactly where you orbit, almost as if there is a "gimbal lock" sort of singularity affecting the transformations that only happens at certain view directions.
All this makes me suspect there really is a nasty corner-case bug in how the transformations for face-me components are managed.
-
RE: Face-me Components Rotating Unexpectedly
I can't find the reference right now, but I recall seeing another post in which it was explained that if you nest a face-me component inside another component, when you orbit the "anchor" point of the face-me moves per its position in the enclosing while the face-me rotates to stay facing. This produces some strange-looking motion.
-
RE: Extracting 2nd level components to 1st level
I might not understand what you want, but try this: select all of the initial first level components and then right-click->explode. That should result in all of the nested components being moved out to whatever context contained the original first level components.
-
RE: Outliner selection not in Order
How about this: you need to tell sort that you want to compare the names to determine order.
sorted = sel.grep(Sketchup;;ComponentInstance).sort {|a,b| a.name <=> b.name}If you want to use the definition names, just insert .definition between a,b and .name
-
RE: Copied components automatically tilted to remain flat on sur
@hellnbak said:
Just watched a couple of videos on YouTube, much more helpful than that website. So I think I have it now, you can't just pick a glued component and copy it, you have to keep getting them from the component browser for this to work, right? That seems to be working.
Yes, glueing is a "behavior" tied to the component definition. It comes into play when you fetch a new instance from the component browser. As noted earlier, under certain circumstances it gets set by default when you create a new component (sort of like the "replace selection" checkbox). You have to pay attention or you might get one glued without knowing!
-
RE: Changes to multiple scenes
This could be done by a plugin or maybe a Ruby snippet entered in the Ruby Console, but if you are asking about doing it via the regular SketchUp GUI I believe the answer is no.
-
RE: Code correction
Please be more explicit about what makes you think there are "tiny mistakes". I can see various flaws (e.g. a class name should start with a capital letter, also consult Dan Rathbun's frequent posts about proper usage of modules to control namespaces) but I'd rather help you with a specific problem than to write your code for you.
-
RE: [New scripter] Will need help on my project (now and then)
@ruts said:
If you think I don't deserve an answer because I didn't take the time to learn ruby properly, then just ignore me.
Please forgive all of us. It's not a matter of deserving. It can just be very frustrating answering questions that boil down to "do it for me" because the writer doesn't know even basic Ruby. It is hard to explain a question about the SketchUp Ruby API when the question comes down to "I don't know what that expression means". Sometimes the frustration leaks out...
-
RE: Kinda stumped
@lockha said:
If I right click on the image, the only option it gives me is Edit Matched Photo
That may be the issue: while importing, you selected match photo rather than as just as image or as a texture.
-
RE: Error Drawing Lines
I think what you are seeing is a "capture effect" that happens as SketchUp post-processes the geometry to see whether a new Edge intersects or lies atop part of an existing Edge. When the new Edge passes "close enough" to a Vertex of an existing Edge, SketchUp decides they were meant to intersect at that Vertex and modifies them to make it so. In your case this amounted to redefining the Edge from pt3 to pt2 to end at pt1 instead (!). I haven't figured out the logic behind which nearby Vertex SketchUp chooses (i.e. why shift from pt2 to pt1?), but suspect it is sensitive to the order in which the Vertices are stored in some data structure, and the order depends on the order and direction in which you drew the Edges. That would explain why one of your cases works and the other gets captured.
I've seen similar effects in other situations such as when a new Edge passes near but not absolutely through the end of a previous one, but gets "bent" over to that end and split into two segments (this causes nasty subtle errors in some people's floorplans when they draw a bit carelessly!). There was also a post a while back in which a new Edge tried to go to a Vertex of a circle and got "sucked" over to the next one because the Edge passed too close to it.
The bottom line is that it is always dangerous to create geometry at sizes near SketchUp's 0.001 tolerance. It isn't worth arguing about whether the Vertices are .00002 over, since the actual tolerance logic isn't explained anywhere. Just don't try to create geometry at that sort of size. Scale up, create it, then scale down.
-
RE: [Question] Switch of model and Interactive Plugins on Mac
As John's animation shows, it isn't a matter of each model not having its own Tool activated, it is an issue with SketchUp duplicating certain view.draw_xxx contents on all existing views. This is a bug we reported some time ago.