[Plugin] SectionCutFace v2.0
-
@gaieus said:
I guess you are not asking this (with the question mark at the end).
OK, I see (and understand) that the face created tries to orient itself to "close" the section cut with the back face inside (or at least that's what I understand from what you wrote).
I actually meant that if in the model, the faces are oriented consistently, it helps the script with "guessing" what to keep and what to delete.
The orientation does not rely on the models's faces - it uses the plane direction of the section cut entity.
What is to be kept and what is to be erased is based on a faces' 'loop' look-up alogorithm. Working from the outside-most faces inwards (the outermost faces will not have adjacent faces on their outer edges so we know who they are), these are deleted and the next innermost faces are kept as they're the start of the cut faces. Then the next neighbour face is erased and its inner face neighbours kept and so on until it's all done. Obviously it's quite possible to devise certain shapes that produce collections of potential section-cut faces that aren't correct - if so, you can manullay erase or remake such faces to suit....
-
very interesting facts are discussed here. your method of approaching the faces from the outside bountaries is quite clever, TIG.
however, I see the great potential behind Csaba's idea as well. most of us, I asume, are modelling with a tidy face orientation. and it is likely to encounter huge and complicated models among our designs - models, where the current method has difficulties finding the right faces.
I think, the "start from the outline" approach has one big flaw: if it is wrong at one point, it bases all future decisions on this assumption, right? so when it does a wrong calculation, the only thing to put it on the right track again is another wrong calculation.
I believe with the "face orientation" approach this danger is not as great, because decisions are made individually, based on every closed shape seperately.
this method however can't just rely on the created intersection geometry, but has to refer to existing objects in the model as well. I guess this is quite a tricky piece of code to write.it would be great (and I am dreaming here of course) to have both approaches and to test them against each other - to test their percentage of right calculations...
-
It actually works pretty well - only faulting sometimes with deeply nested geometry.
What could be even better (well, say this is just dreaming because I understand it cannot be done unless with lots of individual faces) to animate this section cut like the "native" (but hollow) one in SU. -
@gaieus said:
It actually works pretty well - only faulting sometimes with deeply nested geometry.
What could be even better (well, say this is just dreaming because I understand it cannot be done unless with lots of individual faces) to animate this section cut like the "native" (but hollow) one in SU.Section-plane methods are notoriously scant. However, it is theoretically possible to link the cut-face's group and its related section-plane using stuff like paired attributes and observers that watch what's changing. That way when the section-plane's location changes the matching cut-face group would be informed and it'd automatically "re-invent" itself based on this related section-plane's new location, direction, what it cuts etc...
Unfortunately I've tried this and I get Bugsplats aplenty ! I haven't found a work-rond so far... Perhaps SUp7 will have better methods for section-planes...
.
-
thank you... so far i have been doing this in a complex and time consuming manner...
-
When I use the script, I generally paint ever face within the group with the same material it cuts. So an animated script wouldn't add too much to my workflow if these faces couldn't retain the new material I gave them
Anyway, some different (enhanced?) method for section planes/cuts could be interesting if they were able to be exported (say in rendering engines and such). AFAIK it is not possible now.
-
Hi TIG !
Thank you for this script, I use it every day, it has become indispensable!Before this version, the edges of the Section were visible. They are unvisible now. Is there a way to create sections retaining visibility of the edges, without "edit / unhide / all"?
I understand that you have hidden edges, they are visible if you use a different section color. Edges are nevertheless useful for dimensions.
Thank you !
-
Excellent ! Thank you TIG !
-
@matt666 said:
Hi TIG !
Thank you for this script, I use it every day, it has become indispensable!Before this version, the edges of the Section were visible. They are unvisible now. Is there a way to create sections retaining visibility of the edges, without "edit / unhide / all"?
I understand that you have hidden edges, they are visible if you use a different section color. Edges are nevertheless useful for dimensions.
Thank you !
You could temporarily switch all hidden geometry 'on' whilst you are dimensioning and then switch it 'off' later...
However, if you really want the cut's edges to be always visible you can do this...
Edit the script using Notepad or a similar plain text editor [NOT a word processor !]. Find/replace this part about 400 lines down...if f.typename == "Edge" ###v1.4 f.hidden= true ###v1.4 <<<<<----<<<<< end #if ###v1.4
Change the single line to be 'false' rather than 'true' and then the edges won't be hidden...
f.hidden= false
Leave the rest alone & save it. You you might want to make a copy of the script before the edit in case you are clumsy and it won't work afterwards!
Otherwise you are sorted..
-
hi my friends!!! what is the best solution to erase quickly the side of the section that i don't wanna see? do the cutsectionface, and then.. intersect the block with the rest of the model and then.. erase the other side? there isn't a script or a command, that when use cutsectionface tool, automatic erase the other part of the model??
Thanks a lot
-
-
sorry... but i don't understand.. why you say: rectangular selection fron left to right?? upper left and lower right.. or other side??
And.. with this selection.. what i do?? i need to do this.. when in the process??
sorry.. but i'm really confused..
-
I just wanted to say thanks for this plugin. I've been using it extensively over the past few days and it's just great.
I can't show the entire assembly, but here's one small component as an example.
-
@tig said:
SectionCutFace.rb v2.0: update fixes an occasional visibility glitch with the cut-face's location relative to the section-plane, and layers are now sorted below the layers 'CUT-nnnn' and 'Layer0' (or the default layer-name if not EN).
thank you very much
-
Hi TIG, i've tried this plugin on SU6 free and didn't work for me. I had this error on ruby console:
Error: #<ArgumentError: wrong number of arguments(2 for 1)>
C:/Programmi/Google/Google SketchUp 6/Plugins/SectionCutFace.rb:361:inoffset' C:/Programmi/Google/Google SketchUp 6/Plugins/SectionCutFace.rb:361:in
face'
C:/Programmi/Google/Google SketchUp 6/Plugins/SectionCutFace.rb:458
C:/Programmi/Google/Google SketchUp 6/Plugins/SectionCutFace.rb:458:in `call'Then i've installed it on SU7 pro (with no other plugin installed) and it worked fine.
A plugin conflict?
Thanks.
Massimo -
Unknown error - unlikely clash...
Try again with a very simple box or two and see if it works...
If so, please publish what it actually fails on, so I can see what might be the problem... -
Hi TIG, having a problem with SectionCutFace2.0... see attached video.
For some reason the cut plane is located but the layer and face color is not applied..... any ideas?Cheers,
-
@tig said:
Unknown error - unlikely clash...
Try again with a very simple box or two and see if it works...
If so, please publish what it actually fails on, so I can see what might be the problem...My try was made with a very simple box...
-
@utiler said:
Hi TIG, having a problem with SectionCutFace2.0... see attached video.
For some reason the cut plane is located but the layer and face color is not applied..... any ideas?
Cheers,Has the new faces been put onto the section-cut ? When you select the face-group can you try moving so it becomes visible... or try to reverse the section-cut's direction... Does it have just edges or a 'default coloured' face etc, or is it as expected. Get its Entity Info to see if it's on the layer that was specified (also if not check that layer was made and put into the list).
I suspect that the face is getting made OK but it is too near the section plane and doesn't show up - what size is this test box - scale might have an effect ? When the face-group is made it cannot be exactly on the section-cut's plane as that would mean it wasn't visible in the section (!), so it's moved a fraction of a mm into the cut so you can then see it. Try selecting the group and moving it say 0.5mm into the cut so that it becomes visible...
Let me know the results...
-
http://forums.sketchucation.com/viewtopic.php?p=172583#p172583 now has v2.1 which fixes the two problems mentioned in recent posts...
Advertisement