Combining geometry in Sketchup

Is there a way to replicate the combine operation of Maya in Sketchup.

We are here to answer questions about SU. Why impose the requirement that for someone to answer your question they must also be familiar with Maya? You want a quick answer to your question or not?

Just ask your question in simple functional terms and get an answer right away. Otherwise, wait around for a disaffected Maya user to happen by.

-Gully

Is there a way to flatten geometry in sketch up.

Could you at least share a screen shot of what you’re trying to achieve?

It doesn’t seem to me you’re not making much of an effort to communicate your issue.

This doesn’t have to be like pulling teeth. Instead of you dropping vague hints about your question and waiting for someone to guess what it is, or waiting for them to coax it out of you one painful bit at a time, why not just put it all out there? Take some time to compose a complete and intelligible question, just as you presumably expect someone to take the time to compose a complete and intelligible answer.

I can think of at least two ways to interpret “flatten”–that is, you could project all points of an object onto a plane, or you could “unfold” an object, placing all of its faces in a single plane. Do you mean one of these?

-Gully

I am trying to group the geometry together, so that when the geometry is grouped it appears as a single entity in the outliner and individual geometry is removed.
Like if I explode a model till everything is a separate face or edge and then group it together, it appears as a single object. I am trying to create a plugin so that all the explode and group happens with one command. Also this plugin should work only on the layer that is visible.

In the image below the top part shows what sketchup does and the lower part is what I want to achieve.
I have done the part of exploding and combining everything to a group, but when I try to do the same for visible layer, it takes a very long time to complete. I am looking for a way to optimize the time.

you can select all of them and explode in outliner…
does that not achieve the desired result?
john

I have to do that manually for every entity and its groups. When I explode a geometry its just explodes to one level, not completely. I have to keep clicking explode to complete explode the geometry to faces and edges, and then group it. I am trying to do that with just one command.

Another thing I have make a plugin to explode and combine everything in a scene to one group. My concern is when I try to do the same for visible layers it takes considerable amount of time. I am trying to minimize the time.

did you try @TIG 's code…
found here…

john

This statement concerns me from several perspectives, because it suggests that you may not fully understand how SketchUp layers work.

First, you must be aware that multiple layers can be visible at the same time, so talking about “the layer that is visible” presumes you have toggled visibility off for all but one layer. But unless you have made another layer besides layer0 “active”, this isn’t possible because you can’t make the active layer non-visible. Making a layer besides layer0 active is a well-known way to create downstream confusion, so it is generally not recommended. You can do it if you are 100% certain you know what you are getting into, but don’t be surprised if your model develops very strange issues with layer visibility interactions later. You have been warned!

Second, you need to be aware that SketchUp Layers do not isolate primitive geometry from interacting with other geometry - that’s what Groups and Components do. So, as you explode your Groups, the newly-released geometry primitives will intersect and stick to all other free geometry, regardless of whether the other geometry is visible and regardless of what layer it references. So, clean results from your plugin will depend on the contents and visibility state of the model before you run it.

Third, there is a gotcha in SketchUp’s explode operation: it associates the newly-freed geometry with the same layer as was referenced by the pre-existing Group or ComponentInstance. This is a quick way to get primitive geometry referencing layers other than layer0, again, setting the stage for downstream confusion.

Regarding performance, if you keep the Outliner window open while your plugin runs, it will seriously slow the plugin. This is an acknowledged issue with the Outliner that Trimble hopes to address someday, but for now you have to work around it.

I do understand that the Layers do not isolate primitive geometry and how Sketchup layer works. But I have separate layers for different type of objects. For example: A village scene. There are houses, plants, people, and other things. Each different entity is contained in a different layer, and I want to combine each entity to a single group. So the plugin has to work only for visible layer. I want this plugin to work on a file of 45MB size. For a file of that size keeping the outliner closed doesn’t help much. So I am looking for a way to optimize time.