Scale to zero (projection)

It would be cool to have the option to set scale of one (at most two) of the three coordinates to zero when using the Scale tool. This would introduce the ability to create a orthografic projection, which is now virtually impossible (the extensions are quirky and slow). Furthermore it kinda makes sense to do planar projections in this way. I don’t see why it was forbidden in the first place…

EDIT: And scaling by 0.01 multiple times crashes SketchUp :cry:

1 Like

From what you describe, it sounds like what you are requesting is really a built-in (i.e. faster) alternative to the various “flatten to z=0” extensions? Please explain the use case you have in mind: what are you really wanting to accomplish? For example, are you seeking to fix a 2D model that has accidentally gotten non-planar?

Orthographic projection is a 2D presentation of a 3D model. You can already get an orthographic projection using camera->parallel projection, and you can then export the view as a 2D graphic or can send it to LayOut for use in documentation.

But having a particular projection for viewing a 3D model is a very different situation than actually flattening the model to 2D!

I’m pretty sure the reason that the scale tool does not allow zero (or even very small values) is that the operation would bring previously separated edges and faces so close together that they would merge, collapse, etc. Issues with these merges are probably why SU crashes if you scale multiple times by 0.01. But “scale” is supposed to stretch or shrink, not to alter the fundamental model structure! When collapsed to zero depth, all sorts of semantic issues arise because objects originally at different heights become blended!

2 Likes

Yep, I mean flattening the extisting geometry. I used the mathematical meaning of “projection”, which encompasses both viewing and transforming.

The use cases are both correcting broken non-coplanar geometry and creating low-poly and face-me components from more complicated ones to optimize performance in large models.

There are several extensions that are claimed to be capable of “projection onto plane”:

None of which worked in my SU 2017.

Which is paid. Then there are the Architect Tools, which should be able to do it, but I haven’t tested them because I’d feel like taking a sledge hammer to kill a fly.

.

So despite it looks like a trivial problem, there seems to be no easy solution. Of course I could’ve coded myself something like that, but I thought there’s no reason why it couldn’t be possible to do with the Scale tool. Because flattening is exactly the same as scaling one coordinate to zero.

Having it implemented this way would be a reliable and easily accessible solution.

.


EDIT: Speaking of the technical issues, this feature could be accessible using the VCB only (so that the user could not cause the geometry to break while randomly moving the mouse). Then there’d be a procedure which would check the geometry for self intersections, merge overlapping edges and faces and so on. If flattening the model wasn’t what user expected (which would be weird considering he entered 0 to the VCB), he could easily use Ctrl+Z.

Ah, I see: flattening groups and components would be a bit worse. But still there seems to be no reason for SketchUp to crash when rendering eg. zero-volume faces and zero-length edges. The only real problem would be editing groups while they’re flattened.

1 Like

Thanks for clarifying why you want this feature! The use cases are an essential part of persuading Trimble that a particular feature request has merit.

Yes, but that doesn’t mean adding it to the scale tool would be easy! Scaling itself is very simple: just multiply the position parameters by the appropriate amounts. Nothing about the model structure changes.

But when you collapse to zero, you have to deal with the fact that SU’s database engine requires things on the same plane in the same context to intersect. Bugs and crashes happen when the database doesn’t maintain this integrity. So, there would be a cleanup step needed to handle this. The Sketchup engine does a cleanup automatically at the conclusion of a model database transaction (which is no doubt a significant part of why the existing extensions are slow). Plus there would be special cases to handle (such as the Groups you noted) that don’t arise in a non-zero scale. What happens when two faces collapse into each other and they are painted with different materials?

I think that due to the different semantics and issues this would be better as a separate tool than as a special case of the scale tool.

What would icon be ?

:hammer: a hammer ?

A rolling pin ?

A steam roller ?

1 Like

Now I see the issue is much more complicated than I first thought and I aggree it should be a separate tool. Maybe after I finish my graduation work (a spaceport in SU :slight_smile: ), I’ll develop a CC0-licensed demo of such tool.

À propos this is how I imagine the icon (except the projection lines would be dashed or red or something):



Does this work?

1 Like

SketchUp Pro users can export 2D images to the DWG/DXF format either from SketchUp itself or via LayOut with different options, and re-import them if needed.

Anssi

1 Like

It might be integrated in the ‘Always face camera’ option : if you select this option it will automatically set a camera viewpoint , but if you could select a standard view (ie ‘iso’ ) and style setting ( ie Wireframe or hidden line) for the Always face camera component that would be great!

I’m in favor of this! It’s a bit silly that you should have to use a dedicated flattening plugin when it’s actually just scaling to 0. I especially like the idea of letting scale tool do this at VCB input only.

In my view this should not be a dedicated tool. A great strength of SketchUp is how minimalistic it is in contrast to all the other 3d modeling tools that are completely overwhelming. If it is a dedicated tool I think it suits better as a plugin that people can download if they want to rather than a built in tool that adds to what you see on the first startup.

2 Likes

I’m not in favor of scaling to zero by use of the ‘Scale’ tool. There exists no such thing as zero scale. Scale implies a certain ratio between original and result.
Sure, technically it is possible to eliminate one dimension, but this is nothing else than flattening.

Eliminate two dimensions and you are left with a bunch of collinear edges at best. With flattening there is no ratio between original and result. And one can’t go back to the original geometry.

If there were to be an option to “scale to zero” (to flatten), it should be a new ‘Flatten Selection > to Plane’ tool or keep using one of the available plugins.

There already exists a tool that often confuses (new) users due to two completely different functionalities: the ‘Move’ tool that moves selections but also rotates groups and components, no basic geometry.

1 Like

I understand your point, but I disagree. Having tools that try to do too many not-really-equivalent operations via special case inputs is, in my opinion, worse than loading up an app with more tools. It’s a way of hiding things where they aren’t obvious to users! Plus, as has been noted, scaling is a reversible operation that doesn’t change the model structure, whereas flattening produces changes in the model structure that may be major if previously independent edges and faces come to overlay each other.

2 Likes

Scaling isn’t always reservable as it is now either. If you scale primitives they can merge with other primitives and then scaling with the inverse value does not reverse the action. However, flattening a group/component from the outside would be reservable by right clicking it and chose reset scale. Scaling to 0 is just as much a case of scaling as scaling to 0,8 or 4.

If you reread the first (true) statement about primitives merging with other primitives, you must admit that resetting a “scaled to (almost) zero” component cannot be reset if some of the inside entities merged/intersected with other inside entities.

@eneroth3 I think the main reason for not including the “flatten” tool as a part of the Scale tool is the singularity that arises when flattening groups and components: Imagine you create a component and clone it (so you have it two times in your model). Then you take one of them and flatten it. Then you double click it and create a line that is perpendicular to the plane it’s in. What happens to the second instance? The line should be infinite! Boom, you’ve just broken sketchup! :smile:

What’s more, if it were a separate tool, you could chose whether to project only “visible faces” (the way I did it in my second post) or “wireframe” (as @DaveR did it in his post)

IMHO I don’t particularly see the need of downgrading the number of dimensions. The whole idea of modeling in 3D is modeling in 3D,after all. @m93a.cz Those tools are already there, but now only implemented upon the whole model and I think it would be great if you could apply different style-settings on components (Wireframe, iso-view etc.) You could then easily apply those settings on the “Always face camera” component. (The way I see it : "Scaling to zero’ -tool is is already implemented in SketchUp’s components options , after all : SketchUp renders 3D-geometry to a 2D flat screen and if, for some reason you would like to downgrade a component from 3D to 2D it should be facing the camera or you will end up orbiting in a 3D-world with a bunch of flat components)

It wouldn’t have to look like wire frame using the method I did.

@MikeWayzovski You didn’t get my point at all. :confused: I don’t think that “Sketchup is a 3D modelling program” is a good argument against having a tool for projection and strongly disagree with your statement that “2D components should always face camera”. For example I needed flowers as a decoration for my 250,000 m² model but the flower I found on Warehouse had 20k polygons (which is way too much for 4 m²) so I needed a lowpoly variant. This is the result after flattening all the leaves (has about 500 polygons and looks almost the same):

I’ve done this with Move tool (vertex by vertex) because I didn’t find any better tool at that time.

.

@DaveR And may I ask what method did you use? :slight_smile: As this is exactly what I need and I don’t see such extension anywhere…

1 Like

I used the Projections extension from Sketchucation.

1 Like

I get your point :smile: : You needed an image, but ended up doing a lot of work in 3D! If you had exported the model as .png ( with parallel projection in a separate file) you could have imported as image in the model. That is why I suggested that if components could be displayed in different style settings then the Model style settings itself, it would be easier to accomplish. I agree that some components shouldn’t be “always face Camera” , like Images on a wall etc. but that is a somewhat different category then 3D components.