[REQ/Q?] Flattening and exporting scenes as skp files.
-
Thanks Tig,
I've seen your plugin, but there's a lot of setting up to do.
What you suggest would be possible though as there is a select only visible edges plugin, but I'd have to explode all my groups and components and that would defeat the initial purpose wich is speeding up the whole workflow.
It would be faster to work on Layout but a lot slower to work on sketchup. Let's see what happens in the near future though
-
How is this scheme a different result than exploding the model port in LayOut?
Because you want to "draft" 2d in SketchUp? It would have been easier if LayOut were more like SketchUp (which everyone wanted).
-
Well pbacot, that's the real question here: why?
Exploding the model in layout breaks the connection between sketchup and layout.
Exporting scenes from sketchup to an outer file will not:
- You can work on a 3D model;
- Export your scenes as 2D;
- Insert your scenes in Layout or into another Sketchup File (See Note 1);
- Work in Layout VERY fast as the models are 2D, and with better LAYOUT inferences as the model is 2D;
- Or work with the other Sketchup file and draft in Sketchup (See Note 2);
- Then you can insert this sketchup file in Layout as before and work VERY fast as it's 2D and, with better Layout inferencing as it is 2D;
- And you can go back at the original model and work with it;
- And you can export the model scenes again, overwriting the previous ones;
- And you can simply reload them in the 2D drafting Sketchup file or in Layout (Or in the 2D drafting Sketchup and then in Layout.)
Note 1: Inserting into another sketchup file, makes a Sketchup model referenced. Sketchup get's a link with that file and if it get's replaced or edited, it can be reloaded at any time. The same thing happens with Layout, of course.
Note 2: It's only useful to insert in Sketchup if you want to design 2D stuff into those scenes without changing them. As a new export will overwrite them you'd loose your changes to them. Inserting them in sketchup allows for references in note 1 and you can be using sketchup as a sort of a drafting tool instead of Layout, as it's hard to draw with Layout and it's a breeze to draw with sketchup.
NOTE3: Of course Sketchup could benefit from true line styles for drafting.
NOTE4: Of course Layout could be faster and have better drafting tools.
NOTE5: Of course if Layout would flatten 3D models instead of rendering them as true 3D, it would be much faster and this wouldn't be needed.
NOTE6: But note 3 to 5 aren't there now, nor in the foreseeable future... Unfortunatelly, so this is another area where plugin developers can make our life easier by circumventing frustrating issues.
-
You could ovewrite just the same. I'd keep the original "live" SketchUp ports in place. This way you avoid all the positioning and scaling (unless you've worked that out in process.
Unless you can automate a lot of this, there are so many steps. Every little update can cause time and room for errors. I find enough of that just in the regulars SU-LO flow.
BTW my SU-LO flow almost always ends up with a pdf in PowerCADD and I do my secondary drafting in there. So I've added some steps myself to avoid working in LayOut. What I'd want is PowerCADD to reference LayOut files directly.
-
@pbacot said:
You could ovewrite just the same. I'd keep the original "live" SketchUp ports in place. This way you avoid all the positioning and scaling (unless you've worked that out in process.
I'm not sure of what you're saying here, but I think you're talking about the idea of inserting the 2D exported files into a new file and the probability of editing them in the new file.
If that's the case, then I can see almost no flaws in the process. It's the same process I use for Xrefing Sketchup components:
- I have a model;
- I export components from that model into a folder.
- I never work directly on the components on that folder.
- I import those components (all of them) into a new Sketchup file;
- I work on that sketchup file without modifying inserted components (I lock them if I must);
- I reload those components as I need to;
- I insert this new file in Layout and reload it as I need to.
The main flaw is that you can't edit the components directly or you'll loose your editions with reloading. It really doesn't matter to me, as There's a zillion ways of doing all kinds of drafting without ever touching those components.
Another flaw I see is that it's kind of stupid to setup all scenes in sketchup and then don't use them directly in Layout. That's true, but the problem is that Layout takes so much time loading those, that we really can't work with it if we have to be constantly reloading heavy stuff.
I'm having a hard time and I have a Titan X GPU and an Overclocked 5820K processor. There are better than these, but these are certainly better than the majority of laptops used to work with LO.
@unknownuser said:
Unless you can automate a lot of this, there are so many steps. Every little update can cause time and room for errors. I find enough of that just in the regulars SU-LO flow.
That is true, definetelly, but it's something that I setup one time only.
It's just the same with Layout. The hardest time I have is setting up my sheets and viewports. Then it's a matter of working with sketchup and reloading.
It sounds simple enough, but the reloading part is incredible. It just takes ages on complex projects! I literally get distracted while waiting and often start doing something else.
Usually that happens and I find something I must fix and so it starts all over again.
With my suggestion the process of seting up has an extra level of complexity, but I'm counting on less reloading times between all apps and a lot more speed on the drafting workflow.
@unknownuser said:
BTW my SU-LO flow almost always ends up with a pdf in PowerCADD and I do my secondary drafting in there. So I've added some steps myself to avoid working in LayOut. What I'd want is PowerCADD to reference LayOut files directly.
That's what I'm trying to avoid. I do a lot of drafting in sketchup right now. It's much faster to do it here than anywhere else and I can use materials and styles to create striking and clear presentations. Even if I lack linestyles... wich, to put simply, we should have!)
If I wanted to use CAD, I'd probably be using Skalp to do this in dxf. But I hate CAD. I can't work with it anymore!
What I wanted was someway to use Layout and Sketchup to definetelly don't miss CAD anymore.
My Layout could have a set of 2D scenes mixed with 3D scenes that came directly from model and nothing would beat it! Now I want to beat in it most of the times!
-
Yeah. but I always liked PowerCADD. Only thing it is really just a 2d graphic program with CAD precision and a lot of tools.
I think you have more to deal with in terms of LayOut (like SU) being unable to handle large projects. My projects are smaller, the ways I use LO limited, and with 2016 LO, it's almost fast enough for what I do to be bearable.
-
I wish I'd like CAD!
I love SU though!
-
i probably don't understand everything that is written here, and this probably too simple for you, but what about:
setting the camera in the sky downwards for each scene
making a screenshot of each scenethis would give you pictures you could import in sketchup or layout (i am not sure for Layout), and you could draw on them
-
The issue is a bit more complicated than that.
Architects using sketchup need an easy workflow to convert their 3d models into accurate drawings, to represent buildings and to share with consultants.
The workflow involves 3d modelling of the most important parts, 2d drawing that is extracted from 3d,and 2d drawings that complement those and are still accurate
usually the later are done in cad, but I do them in layout or sketchup.
I want to streamline that workflow as sketchup is great at 2d drawing too if complemented with layout for text, lifestyles dimensipning and pagination.
the issues that arise from working with layout, are also less evident when you work with 2d sketchup models/drawings.
-
@jql said:
The issue is a bit more complicated than that.
Architects using sketchup need an easy workflow to convert their 3d models into accurate drawings, to represent buildings and to share with consultants.
The workflow involves 3d modelling of the most important parts, 2d drawing that is extracted from 3d,and 2d drawings that complement those and are still accurate
usually the later are done in cad, but I do them in layout or sketchup.
I want to streamline that workflow as sketchup is great at 2d drawing too if complemented with layout for text, lifestyles dimensipning and pagination.
the issues that arise from working with layout, are also less evident when you work with 2d sketchup models/drawings.
I tried something: here is a scaffolding model
i made a component out of it,selected it, and applied these lines of code
model = Sketchup.active_model # Open model entities = model.entities # All entities in model selection = model.selection # Current selection for e in selection echelle = Geom;;Transformation.scaling [0,0,0],1,1,0.00001 e.transform!(echelle) end
and this is what i get
is it something like this you are asking for?
-
Apparently it is. I'm not in my pc though... Would that work with a section?
-
That scales the model on the Z axis to something close to 0 (actually 0.00001). So make sure to run in a few times to be sure that any vertical dimension gets smaller than Sketchup's tolerance.
-
If that scales to close to 0 it means it will have all the geometry between 0 and 0.00001 right?
It will still be 3D not 2D, it looks exactly like what I want it even get's textures.
But isn't that, exactly the same 3D model with the same amount of information? Won't it probably give Layout the same amount of work on 3D calculations?
Also as it isn't 2D it will be hard to export to CAD in a later stage when sharing with people that need dwg or dxf. Or it might give us errors when drawing in the 2D sketchup file.
Also, as Jiminy pointed out, it's working in Z axis only, though that would probably be easy to make it work in any axis (I'm personally interested in a section plane's normal direction.).
It's a shame though, as it is really looking exactly as the ideal 2D output would look.
Thanks for your input glro and Jiminy!
-
Well, if you run it a few times, the dimensions along the axis will get smaller than the tolerance, and Sketchup will merge everything.
I think... -
Then how will Sketchup know it has to keep the visible entities and disregard the rest?
-
i tried this
for e in selection echelle = Geom;;Transformation.scaling [0,0,0],1,1,0.0000 e.transform!(echelle) end
it works, 0 thickness, but colors are mixed
and it cannot be undone, i suppose, because 1/0 doesn't existall the geometry is in the flattened component, because the size of the file is about the same, before and after, and if i unscale by scaling the flattened component 1/00001, it works
model = Sketchup.active_model # Open model entities = model.entities # All entities in model selection = model.selection # Current selection for e in selection echelle = Geom;;Transformation.scaling [0,0,0],1,1,10000 e.transform!(echelle) end
It would be possible to scale along any axis
I tried to export the flattened model to dxf, and import it into my CAD software, designcad 9000, but it doesn't work
Then i tried to go back to sketchup from the dxf file exported from sketchup, and it worked, with one big difference: faces are not retrieved
here is the dxf file, if you want to try with another CAD software
-
@jiminy-billy-bob said:
Well, if you run it a few times, the dimensions along the axis will get smaller than the tolerance, and Sketchup will merge everything.
I think...yes, this would probably if objects within the global component would be alone (stray?)
but if the objects within the global component, are components themselves, nothing is merged -
@jql said:
Then how will Sketchup know it has to keep the visible entities and disregard the rest?
by scaling to 0.0001, the visible entities are kept visible
-
Scaling to 0.0001 will keep this as a 3D that looks flat so face "draw order" comes from the 3D itself... I can understand that.
It's pretty interesting that scaling it to 0 and then scaling it back up pops up the full model!
I could see that as a very interesting presentation tool by itself.
Imagine a flat plane with a google map in it, and then, suddenly a building and terrain start poping up from it... That would be very cool.
But what you're saying is that if you export to dwg/dxf and open it back in sketchup, sketchup convert's it into 2D data, though it looses faces? Then all the invisible faces become visible and if I'm exporting a roof view I will probably see all the floors beneath it... That wouldn't work though what you have still looks very good.
There is also an unmentioned issue that relates to camera, this only works in orthogonal projection mode, but I really can live with that as that is the kind of drawings I am after (2D orthogonal projections of the model.)
Though I understand the potential of the concept there are also other questions envolved like defining axis, sections and export to a skp model per scene:
- I can imagine that definnig axis by scene camera or by a section plane is probably something trivial for plugin developers;
- Having a section can be a bit more troublesome though as there will be many sections in the model. The way you describe your plugin to work right now, it would probably be a matter of copying the whole model and a given section into a component. Then use the section inside that component to do something like Zorro2 plugin and slice the component through the section. This new component, that would now be sliced, could be scaled flat;
- Then the matter of exporting this flat component to an external file, would probably be easy too.
So the problem I see is, still only one, the component isn't trully 2D but close to 0 thick:
- so it probably isn't fast to work with;
- it's probably innacurate to work with;
- and it probably creates a lot of issues when exporting to standard industry formats like dwg/dxf/dwf.
I'm thinking though, that if there was a way to make the component true 2D, it would be so lightweight and easy to use, that we could even not export it at all. It could be inserted in a new layer visible only in a new scene and both layer and scene could be named after the existing scene with a suffix/prefix related to the plugin:
- "Scene 1" - Original model view;
- "2D Scene 1" - Copy of Original model view, where only the 2D flat component is visible.
glro, I'm sorry if I'm sounding rude by saying all this so bluntly, but the fact is that I really appreciate all the input so far, and I do think the potential of this plugin is huge!
-
Have you tried using section cuts in SU......up to the limits of what you desire to show in LO/ 2D.
(think from the "back side" of the model)
IOW:
Think old western town movie prop. (facades only)I modeled a small developement a couple years back and to get a "street view" in 2D I used a section plane from behind to limit the info LO had to calculate. (I recall this working well)
Charlie
Advertisement