sketchucation logo sketchucation
    • Login
    1. Home
    2. jolran
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 37
    • Posts 1,027
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: [Plugin] Hatchfaces (v1.8 beta) UPDATED 15-Dec-2012

      Yeah, thanks. I have been looking at your plugin, TIG. There is no point in reinventing the wheel that's rolling well, so I will go the "line hatching" way. If it wasen't clear, I'm not convinced textures are good enough for CD's. Inconsistency in line widths..

      So far as I can see, 2dtools imports a jpg texture, while hatchfaces will be working with skp.files.
      And if I understand API docs right, you can only use images for UI:openpanel.

      The strategy I'm having is to have 1 color method for linehatching and another non-color method.
      Non color method will be standard-mode, and it's there where I aim to increase speed somehow.

      πŸ’­ Plan A is to find a solution to create all edges inside 1 group without the need for exploding, then use face-classify to remove unwanted edges.

      Plan B is create groups, intersect with face-clone(gents) and remove unwanted edges with face-classify points. That way there is no need to explode large amounts of groups. But intersection can be quite slow...

      Plan A need some thinking, and there is quite a lot of unnecessary geometry created as well. A big square, size of diagonal to compensate for rotations around center...
      It's difficult to do rotations prior to tiling. Unless doing zick-zack copying πŸ˜•

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] Hatchfaces (v1.8 beta) UPDATED 15-Dec-2012

      Good evening.

      Things are moving forward, but have been hooked on webdialogs and speed performance lately.

      All in all, all features I can think of is implemented. Loading from file and tiling with some options to it, is ok.(not from some dialog, in script)

      The "tech" part:
      Some sort of dialog has to be made. I'm thinking webdialog, but quite scared of diving into that part actually πŸ˜•
      But it will be difficult using dropdownlist with a long list. And I don't know if a list can be updated automatically if user add new components ❓ I guess UI.openpanel can only be used for images?

      Also performance is an issue.. Things can get quite slow sometimes, maybe to slow..

      The plugin tiles the group in 1 direction inside group1. Then it copies group1 in the cross direction.

      Copying groups are fast. Exploding and intersections is slow. I don't know if there is any way to speed up thoose things.
      Is there any way to copy and tile entities collection without using groups ❓

      Have also been experimenting with textures+lines combinations to "get away" with less geometry, but the result is less then satisfactory. Look pics:

      More artistic questions arise, what is needed from hatches anyway?
      Have been looking for ISO standards but can't find information regarding exact size of patterns. If you look at Doublecad for ex. When creating a hatch, the sizes of pattern often need to be adjusted. So what is the scaling standards? This could be of importance regarding speed. Cause, the bigger patter=less geometry >> speed increase.

      Any tips would be welcome. πŸ˜„


      texvsvector.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: WebDialogBuilder class : brainstorming

      @unknownuser said:

      WebDialog.css.txt

      Thank you.

      Good links as well.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: WebDialogBuilder class : brainstorming

      @unknownuser said:

      many newbies come into the API thinking they will be learning Ruby, only to find that they need to learn CSS, Js and some form of HTML, in order to create UIs for their plugins. (It's a big kick in the teeth.

      Well I'm probably one of those newbies you are refering to. And yes, I am digging in to css, js, jquery and html at this moment. It's a lot of info to digest, just to make a dialog in Sketchup IMO.

      Thomthoms wrapper looks very tasty indeed. But I must say, anything that would facilitate the workflow with webdialog is very welcomed.

      @unknownuser said:

      someone (you or I, etc.,) would give them a generic webdialog stylesheet

      That would be awesome! Even a nice and simple webdialog to be able to look at for learning would help. I have searched for scripts included webdialogs, but havent been lucky so far..

      Keep up the good work.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: Flagstone Patio & Landscaping (Real Project)

      Beauty! πŸ‘

      I think one can push Sketchup pretty good as far as geometry goes. It's not Z-brush, but what the heck.

      Nice modeling!

      posted in Gallery
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      Ok, I have put out the new version 1.2 for testing. So you have something to play with this weekend.
      It should be an improvement..

      KEEP THE OLDER VERSION AT HANDS! I won't be able to fix issues this weekend πŸ˜„

      Thank you TIG for all the help.

      I haven't optimized the iterator exactley as TIG suggested, so that can be improved...

      There are more issues to deal with later on.. But let's not spoil all the fun.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      2 intersection gave a big improvement! Not 100% accurate, but I think it's good enough. One can force it by selecting the component and running the plugin again. It almost always sort out the fuzz, then.

      Still intersecting with face.clone. Had some problem with intersecting with Sketchup.active.model selection...Expecting entitiy something..

      Speed is better, even with 2 intersections πŸ˜‰

      Did a test with a "heavy" component, ver 1.1 VS current dev.code. VER 1.1: 41.483 seconds. current dev.code: 4.278 seconds 😲

      Do we move forward, TIG? Or delve deeper in this problem, to make perfection?


      2 intersections.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      Yes TIG, I think you are on the right track there! Good thinking.

      I was about to report that intersection is not working properly. One cannot erase a face if it can't be selected πŸ˜„

      This can be due to my code being a bit shabby at the moment, moving stuff back and forth as mentioned.

      I will "clean it" and report back later.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      Think it is ok...

      Breaks sometimes, but only if using a simple squarish component. One have to consider what this tool is going to be used for.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      @unknownuser said:

      The .flatten! combines nested arrays
      The .uniq! removes duplicates
      Also [not applicable to THIS tool] .compact! would remove 'nil' array elements, or .sort! puts the list 'in order'...

      πŸ‘ Great to know. Will be useful.

      Your code works! Almost

      Like with the method I used before(face.clone holes.centers), I'm experiencing some faces don't get erased. (Having a model that look like a swiss cheese)

      I wonder why this happends. Your code should be working...

      For ex. I run the plugin once. Maybe 3 faces are not deleted but the edges are trimmed to fit. I run the plugin again with the component selected, then it is OK!

      It is like it needs another rescue operation? πŸ˜• Or maybe run the last command twice? Seems excessive..

      I will check my code as well. Been moving snippets back and forth, it need some cleaning up.

      And another thing. Was it GO for NOT using faceclone? Intersect with SS or Glue face?
      I havent implemented that yet, still using face.clone. Shouldent matter in this regard...


      Almost.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: [req] disable section plugin

      You have to update the scenes when making changes. That way you set up the scenes any way you like it, regarding hidden geometry, sections , layers etc.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      I'm having trouble with this part of the code. Maybe should add some parameters to it?

      faces.each{|gface|
      pt=gface.bounds.center.project_to_plane(face.plane)
      if face.classify_point(pt)==Sketchup;;Face;;PointOutside
      tedges << gface.edges
      gface.erase!
      end
      }
      

      If you look at the picture, you will see that it might not work in all cases with that code.
      Especially when having big faces.

      In the earlier posts I was trying to figure out a way to erase faces more selectively.
      By using IF the FACES center==HOLES center >> erase.faces! (Simplified code)

      However, when I did that, sometimes there where errors. Or faces that would not get deleted.


      Faced with a problem-2.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      He he! No worries πŸ˜„

      Sometimes when I reread my posts I wonder what the heck I was talking about. That's why I post so many pictures πŸ˜„ To clear things up.

      This new code of yours look very nice. Can't wait to test it out.

      @unknownuser said:

      tedges.uniq!

      Haven't seen that command before? To remove duplicates? Need to read more about pure Ruby...

      @unknownuser said:

      Once that's all done we can worry about making the group into the gluing/cutting component, with corrected axes as before...

      I was thinking of putting in the option to make group instead of component, should one wish. Could be useful if the user only has edges with no faces.

      Thanks a lot for your help, TIG!

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      Ahh ok. That is more streamlined. πŸ˜„

      SS=Sketchup.active_model.selection-face. So no face.clone is needed then?

      @unknownuser said:

      When you have the list of 'edges2go' you erase them en mass.
      Now you should have a group with all edges/faces trimmed to the perimeters of the face - including any holes in the face...

      This I still am not convinced about. You have to forgive me if I seam like a stuborn idiot, but please look at the picture. There will be 1 face remaining if we only delete edges2go. ❓

      OR do you mean it will go away after the intersection? I havent tested yet.


      Faced with a problem-1.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      I'm sorry. Tried to do what you said, or what I think you mean. 😳

      But still don't understand how the faces in holes are supposed to disapear when merging them(exploding) onto the face.
      This is done after intersection and trimming the edges..

      Just to make sure we talk about the same entities here. face.edges+[face] is the face.clone.entities right?

      Group is the selected component or group in Sketchup(turned into a group by definition).

      Now, to be able to explode the group onto face.clone the group off course have to be inside face.clone group=gp.

      Then after all that, the last step is to transform the group and turn it into a cutting component.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      Gee!! πŸ‘Š Now I get what you are saying..

      Explode the COLORED face.group onto the face.clone. I did not get that part.

      OK I will try your method now. Thanks.

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      OK, got it! hopefully

      Made a group of faces from face.clone holes. Took their face.bounds.centers.
      Then compared cutting.components (faces.center.bounds) to those other centers.
      Since center is a point=position I could use ==comparison. Just delete face if they where in the same position..

      The code can probably be optimized, but first do some testing and see if it holds!

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      Hmm. This problem I havent got a clue about..

      The calculation is irregular. Sometimes it fails to erase the required faces..

      I don't know If it's worth killing thyself for.. Most of the times there will be plenty of geometry so this calculation isent needed anyway... But I would like to know why comparison fails and if there are any resque methods for these kinds of failures.


      hole tests.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      I have reread your posts, over and over πŸ˜„

      @unknownuser said:

      Just intersect the group's entities with the face.edges+[face] etc.
      Find all of the edges in the intersected group.
      Look at each edge...
      mid=edge.start.position.offset(edge.line[1],edge.length/2)
      Then use
      result=face.classify_point(mid)
      To see if it's on the face or an edge/vertex - if it's not it's earmarked to go!

      This IS what I'm doing already. Edges are being erased as they should be.

      gp2edge.to_a.each{|edge| 
                    comparefaces.to_a.each{|face| 
      	   
      	                    if face.classify_point(edge.start)==Sketchup;;Face;;PointOutside and              
                                 face.classify_point(edge.end)==Sketchup;;Face;;PointOutside
      					       
      						   gp2ptogo << edge
      				       
      					   end
      	                    
      						if face.classify_point(edge.start.position.offset(edge.line[1], edge.length/2))==Sketchup;;Face;;PointOutside
      				           
      						   gp2ptogo << edge
      				      
      					   end
                             
      					   
      				} 
                  }
      

      The problem is that faces inside holes wont get erased unless we tell'em to. πŸ˜„

      If you mean to reread your posts to take care of THIS particular problem, I'm sorry did not understand how, by information provided. I'm working at the problem right now, and it should not be as difficult as erasing the edges inside holes.


      faces2-1.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: [Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

      I don't think we can use face.bounds.center as a point in face.classify method. Eg (face.bounds.center.project_to_plane(face.plane))

      The center point of a face can be in a hole if the face is surrounding the hole. Hope the pic explains..
      (the big face gets erased!)

      The BIG problem was to erase edges inside holes. Wich you fixed πŸ˜„ !!

      So now when that seams to be working. I'm thinking, recreating the holes a' la face.clone. Then erasing the faces. This would not have been possible before if there where edges inside the hole.

      Edited: Hm, since there already are faces in the holes, the new one ends up on top and intersection is needed. Could be difficult to retrieve them for erasing after that.. OR rather, it might be excessive to create the faces just the get hold of them..


      faces-1.jpg

      posted in Plugins
      jolranJ
      jolran
    • 1
    • 2
    • 36
    • 37
    • 38
    • 39
    • 40
    • 51
    • 52
    • 38 / 52