• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] SectionCutFace v2.0

Scheduled Pinned Locked Moved Plugins
65 Posts 23 Posters 65.8k Views 23 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    sorgesu
    last edited by 20 Nov 2007, 18:37

    I see. I have never really worked with AutoCAD but I'm teaching people who do and I didn't really understand what it is that they needed to have a face. I thought that they wanted a face even on a cavernous interior section cut. So I couldn't figure out why there was no face at all in an interior. Now I understand. Thank you.

    Susan Sorger
    Former Seller Hand Rendered Entourage
    Former Canadian Authorized Training Centre, SketchUp

    1 Reply Last reply Reply Quote 0
    • S Offline
      stuartb
      last edited by 20 Nov 2007, 18:37

      I cant live without the sectioncutface ruby! Another thing I do now and then is to make the section faces 'not receive shadows'. This means you can cut further up and (when in plano view mode) still get the impression the cut face is moving with you. As the great man says . . . just ideas.

      1 Reply Last reply Reply Quote 0
      • D Offline
        digby dart
        last edited by 20 Nov 2007, 18:39

        πŸ˜‰

        Many thanks for another excellent script TIG.

        πŸ˜„

        [digby dart]

        1 Reply Last reply Reply Quote 0
        • C Offline
          chango70
          last edited by 16 Jul 2008, 12:11

          That is just about one of the most useful rubys I've come across! thanks alot!

          1 Reply Last reply Reply Quote 0
          • B Offline
            brokenstaral
            last edited by 4 Sept 2008, 10:43

            i m a newby at the ruby thing

            is there anyway to render a section-cut after creating the section-cut face???

            1 Reply Last reply Reply Quote 0
            • P Offline
              pilou
              last edited by 4 Sept 2008, 12:04

              Seems erase manually that don't you want (it's not a big deal) make the trick πŸ˜‰


              moto.jpg

              Frenchy Pilou
              Is beautiful that please without concept!
              My Little site :)

              1 Reply Last reply Reply Quote 0
              • B Offline
                brokenstaral
                last edited by 4 Sept 2008, 21:19

                @unknownuser said:

                Seems erase manually that don't you want (it's not a big deal) make the trick πŸ˜‰

                thanks man

                that render is exactly what i wanted to do

                i have also asked around a bit
                other people say i need to use the intersect tool
                so in that sectioned motor bike
                did u intersect the section-cut layer with the model then delete what u dont needed??

                or u used sum other method??

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 8 Sept 2008, 18:22

                  It makes a group containing a large plane [face], intersects it with the model and then tries to work out what's solid and what's void. It doesn't always get it right...

                  .

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    Gaieus
                    last edited by 9 Sept 2008, 13:20

                    TIG, I guess front faces and back faces are also considered during the "guessing phase" in your script, don't they? (Love the script BTW πŸ˜„ )

                    Gai...

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      TIG Moderator
                      last edited by 9 Sept 2008, 19:41

                      @gaieus said:

                      TIG, I guess front faces and back faces are also considered during the "guessing phase" in your script, don't they? (Love the script BTW πŸ˜„ )

                      It should make the initial face looking in the right direction to start with... after that it deletes parts, so the remainder should 'always' face the expected way ?

                      .

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • G Offline
                        Gaieus
                        last edited by 10 Sept 2008, 09:00

                        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.

                        Gai...

                        1 Reply Last reply Reply Quote 0
                        • T Offline
                          TIG Moderator
                          last edited by 10 Sept 2008, 14:45

                          @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...

                          .

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • plot-parisP Offline
                            plot-paris
                            last edited by 11 Sept 2008, 10:47

                            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...

                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              Gaieus
                              last edited by 11 Sept 2008, 10:57

                              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.

                              Gai...

                              1 Reply Last reply Reply Quote 0
                              • T Offline
                                TIG Moderator
                                last edited by 11 Sept 2008, 17:53

                                @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...

                                .

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  roadkill
                                  last edited by 11 Sept 2008, 19:46

                                  thank you... so far i have been doing this in a complex and time consuming manner...

                                  1 Reply Last reply Reply Quote 0
                                  • G Offline
                                    Gaieus
                                    last edited by 12 Sept 2008, 07:28

                                    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.

                                    Gai...

                                    1 Reply Last reply Reply Quote 0
                                    • M Offline
                                      Matt666
                                      last edited by 15 Sept 2008, 10:46

                                      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 !

                                      Frenglish at its best !
                                      My scripts

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        Matt666
                                        last edited by 15 Sept 2008, 11:26

                                        Excellent ! Thank you TIG !

                                        Frenglish at its best !
                                        My scripts

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          TIG Moderator
                                          last edited by 15 Sept 2008, 17:11

                                          @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.

                                          .

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 2 / 4
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement