sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Hatchfaces (v1.8 beta) UPDATED 15-Dec-2012

    Scheduled Pinned Locked Moved Plugins
    360 Posts 41 Posters 228.5k Views 41 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.
    • TIGT Offline
      TIG Moderator
      last edited by

      On an explode it should [untested].
      Alternative 'intersect' after the explode ??

      TIG

      1 Reply Last reply Reply Quote 0
      • jolranJ Offline
        jolran
        last edited by

        Well lately I have done quite a few intersects. And the results vary. But no. Materials get lost=white default material.
        However I will try intersection after exploding things.

        Thanks.

        Edited. Not very good results. Things are very negative at the moment. Exploding geometry connected to a face has very destructive behavior. On top of that materials don't get transfered properly, and that was the whole idea of this process.

        There is more problems. Let's say I can recreate the face-clone first. No problem!
        On top of the face-clone, recreate the whole component instance. Faces, edges without faces, and materials, in code.
        Problem here is that I would probably have to do an intersect_with the face_clone, so the edges get connected and form new vertices at the edge crossings. And there the face materials would get lost...In the intersect_with method.

        There is an theoretical alternative! I woulden't mind the opinions from TIG on this one:
        If doing an component intersect_with face.edgeloops without face? That would at least give new vertices so the unwanted edges theoretical could be removed. Without affecting materials and destructive behavior (tested). But like the method TIG recommended, selected_face.classify_point(). One would need a face to compare against.
        Could the face be in a different group? And deleted after comparison? What say you Massa TIG?

        1 Reply Last reply Reply Quote 0
        • jolranJ Offline
          jolran
          last edited by

          Yes. Something positive!

          An intersect between component(hatch-pattern) and face-clone's edge loops(no face). Gives you new vertices. Without affecting materials and destroying faces! so now it's possible to erase all edges and vertices outside the face.

          Will see if it's possible to make a comparison against a face in a group. Can't explode it! Destroys everything.

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            You can test if a point on a preselected-face in another entities context - BUT you might need to transform! the point by its container[s] transformation back to align with the preselected-face ?

            TIG

            1 Reply Last reply Reply Quote 0
            • jolranJ Offline
              jolran
              last edited by

              Ah, sounds great, thanks. I will will try that now. Been busy with some other stuff..

              1 Reply Last reply Reply Quote 0
              • jolranJ Offline
                jolran
                last edited by

                I think I have a collection of points outside the face now. Plenty of iteration...
                There is no way to see the real result until it starts deleting edges. Anyway, see some collection when
                using puts.array of points to go

                Simple question how do I convert those pt to vertices? Is there a simple way or another comparison?
                I guess if getting the collection of vertices it's just a matter of deleting edges connected to that vertice. Edge.used_by?(collection of vertices) ?

                1 Reply Last reply Reply Quote 0
                • jolranJ Offline
                  jolran
                  last edited by

                  Hang on! Edge.end and edge.start is vertex objects. I can't use them as point when using face.classify_point()???
                  In the API face.classify_points needs points as arguments.

                  How come I get a result from array.length? Strange... Or is there some equallity between points and vertices I'm not aware of? πŸ˜•

                  Edited apparently πŸ˜„ I get some edge deleted. Almost there I think! Only did comparison against face. Maybe need against
                  other entities as well.

                  1 Reply Last reply Reply Quote 0
                  • jolranJ Offline
                    jolran
                    last edited by

                    YEEEEEESSSSSSSS!!! ATM I am VERY happY!!

                    I'm sure there are things tome come that will put me off. BUT at least it's going forward!

                    I made the misstake of putting the collection of edges BEFORE the intersection. Had some problems with classify points to
                    edge removals. Anyway look at the picture! It has curves and circles to, with materials.
                    Now. Must convert it to component, so faces will cut underlying face and materials will get cleaner.
                    That's for tomorrow!


                    smiley.jpg

                    1 Reply Last reply Reply Quote 0
                    • jolranJ Offline
                      jolran
                      last edited by

                      More tests. Overlapping components get intersected well. It's quite computable.. So one have to be careful not to overdo it I think.. We will see...This is all in 1 go. But I suppose one can split the computation up in several goes.
                      When I come and think of it. This is a 2D boolean!!


                      more tests.jpg

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        Do you now need to erase the uncolored faces or is that done ?

                        To avoid the 'z-fighting' with the existing face you could move the new group say 1mm in the originally_selected_face.normal so it's avoided...

                        You have indeed made a 2d-boolean tools... well done πŸ€“

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • jolranJ Offline
                          jolran
                          last edited by

                          Thanks TIG! I have o good Master πŸ˜„

                          Yes it's done TIG! It's supposed to be colored for special hatches or design tool etc..It will be like Vector in
                          Layout.

                          Move the face 1mm in face normal vector.. Hm Yes that is probably easiest. I was thinking of converting to component and
                          put on a cutting behavior, to make it more perfect. Maybe overdoing it. Things must be stable first.

                          Thanks for your help in this.

                          1 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by

                            When you make it a cutting component remember to set the face to the face it is glued to...

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • jolranJ Offline
                              jolran
                              last edited by

                              Yep! OK! Will probably have to do that. Even at 3mm from face there where still some glitches at certain viewing angles.
                              Don't want to get to far from the face. Some people might not like that, for aligning and stuff..

                              1 Reply Last reply Reply Quote 0
                              • TIGT Offline
                                TIG Moderator
                                last edited by

                                You are aware of the needs for the axes of a cutting component ? Z/blue is out of the face it glues to... You'll need to transform the group to the origin [flat], make it a component [changing its behavior to 2d/gluing etc]; move the instance back with a inverse transformation, then tell the instance to glue to the originally selected face...
                                That should avoid the z-fighting ? πŸ˜’

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • jolranJ Offline
                                  jolran
                                  last edited by

                                  Heh πŸ˜„ So that what it was.

                                  Hmm ok, will see if it's worth the effort. I kinda know now why you recommended moving the component a few mm to get rid of the issue. And doing that, it can remain a group. Working on it.

                                  1 Reply Last reply Reply Quote 0
                                  • jolranJ Offline
                                    jolran
                                    last edited by

                                    Another discovery.

                                    Strange enough exploding the group now, transfers the material onto the face ❓
                                    I wonder if it has to do with the fact that the edges has been trimmed to fit the face. Or rather like before, when exploding a face onto an edge or vice versa had to create a new face=materials lost?
                                    Anyway that is not a bad thing. Maybe cutting behavior is not needed. But then again, the hatch must be merged to the face and might not be so desirable..

                                    PS. Could be used as a modeling tool. Starting to look like something that french guy Pilou created...


                                    doodel.jpg

                                    1 Reply Last reply Reply Quote 0
                                    • EarthMoverE Offline
                                      EarthMover
                                      last edited by

                                      Nice work mate! Looking more and more promising. I'm definitely excited about the direction this is taking. Should be great for doing facade work! Keep it up! πŸ‘

                                      3D Artist at Clearstory 3D Imaging
                                      Guide Tool at Winning With Sketchup
                                      Content Creator at Skapeup

                                      1 Reply Last reply Reply Quote 0
                                      • jolranJ Offline
                                        jolran
                                        last edited by

                                        Earthmover, there sure are some possibilities for this plugin. I'm a bit conserned about the performance ATM. There can be quite a lot of objects that need to be computed, when using sofisticated pattern. And files WILL get bigger.
                                        It's not vector graphics. But if the plugin get stable enough it will probably be useful for some peoples.

                                        Having problems transforming the group to ORIGIN. Must be doing something completely wrong..
                                        I'm supposed to transform the group and not the entities therein?
                                        Another read up..

                                        @unknownuser said:

                                        changing its behavior to 2d/gluing etc

                                        Is it enough to change the behavior of the component and glue to face to get it cutting. Or do I acctually have to insert
                                        a new instance? Like in Sketchup modeling.. Guess I will figure that out if I get the transformation working.

                                        1 Reply Last reply Reply Quote 0
                                        • TIGT Offline
                                          TIG Moderator
                                          last edited by

                                          One thing it'll do with ease is 'tiling'!
                                          Ages ago I started a tool that never got finished - uni-lecturing intervened...
                                          Cross-hatch at the required centers - paving, wall tiling etc.
                                          For complex tiling - e.g. with wide joints, or different size parts, or interlocking shapes - then use the newer ideas of 'component-hatching' πŸ˜„
                                          All it needs now is an extra 'tool' to set the 'origin' of the hatch pattern... πŸ€“

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • TIGT Offline
                                            TIG Moderator
                                            last edited by

                                            When you have a group finished use gtr=group.transformation to use later
                                            Then you need to move the group to the origin, and transform all of its edges' vertices [uniqued] so its 'flattened' in plan. You'll need to trial some code for this πŸ€“
                                            Then use inst=group.to_component.
                                            Then use defn=inst.definition and change the defn's behaviors to make it a 2d/gluing/etc thing.
                                            Also set the defn.name=???? etc
                                            Use inst.erase!.
                                            Transform 'gtr' to suit what you had to do the 'flatten' the group...
                                            inst2=ents.add_instance(defn, gtr) to place an instance on the face back where the group was.
                                            inst2.glued_to=face to cut the face.
                                            Set the inst2.layer=??? etc etc............

                                            TIG

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

                                            Advertisement