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

      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) ?

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

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

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

      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.

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

      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?

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

      No. Exploded instances do not merge materials to the face lying underneath. Is it supposed to happend?

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

      Yes. That's what I want πŸ˜„

      It's for the exterior bounds of ALL entities, not the face. Then from that huge face do a boolean with the selected face.
      If you intersect with the result from that you have everything intersected in a group wich can be deleted?
      But ok, I will try what you say.

      BTW. An exploded comp. don't always transfer the materials to the face lying underneath? It's risky.

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

      Really? 😲 Bounds=boundingbox, no?

      So boundingbox will not be like on the picture? darn... Typical.


      circle.jpg

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

      I will test TIG' solution tomorrow, if time gives. I have another test to do.

      If someone please tell me how I can get the pt's from a boundingbox object. It will only be 4 pt's, boundingbox from 2d hatches.. Will create a face from those points later. Had a look at Thomthoms edges from boundingbox, but it's for a whole "cube" boundingbox. Don't need that much information his script gives.

      I've tried something like this. But it doesent work.

      	centbox=gp2.bounds  #boundingbox object
      			 centpoints=[]; range=(0..7); centbox.corner.range.each{|e| 
      			  if e.valid? and e.class==Geom;;Point3d
      			 
      			      centpoints << e
      			   end
      			 }
      			 
      

      Edited. It probably should be centbox.corner.range. I changed the original. Still doesent work..

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

      Actually when I reread you post TIG. It is probably the way to go.

      I had the idea to make a huge face. Same size as entities.bounds. Add the edgeloops from original selected face.
      And then delete the original face. (Sort of oposite of the face). Then do an intersection with the components.
      The result of intersection could be deleted, and all what's desired would then remain..
      It is all theoretical..

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

      Thank's TIG, I will try.

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

      Things are not going so well. Doing a pattern like on the picture will be difficult.
      Unless black and white. That's no problem to do.

      TIG recommended to clone current selection to avoid bugsplats. I'm fine with that as long as doing faces only.

      But that won't give much flexibility if doing a pattern like on the picture.
      How to clone the edges from an array? And what if you have an edgeloop where you DON'T want a face?
      And materials are still a big problems. If it where only 1 material, things would be relatively easy.
      I guess faces can have attributes like materials, but how to store them and transfer to the face_clone is the question.

      I'm thinking doing an intersection with face, then recreate the facecolor pattern and erase vertices outside the face.
      ATM I get splats when using lot of patterns or nested components with intersection. Things are a lot more stable, since
      being able to explode all the components and add entities to group AFTER the group was created.
      Using few components with plenty geometry is OK. Many components are bad. Even if they contain few entities..

      Could need a push with the materials.. Otherwise I probably will have to restrict the plugin features.


      wierd_pattern.jpg

      posted in Plugins
      jolranJ
      jolran
    • RE: DC instance make unique

      Yes πŸ˜„

      Anyway. Now it's possible to collect edges, faces even materials etc. Nice!

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      Yeyy! Now I have exploded all instances inside the group. Changed from cents.each to cents.to_a.each

      I know about that method. Stupid did not think about doing that earlier...

      Main thing here. Working with instances it is important to get them exploded?

      Even if I added 2 instances to gp .Exploded 1 of the instances. Then made a group copy like gp1=gp.copy.
      I got splats erasing first group called gp.
      Now when every entities is exploded, I can remove the original group safely after copying it.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      This did the trick! I mean created multiple instances inside group.

      if comps
                 gp2=ents.add_group()
      		    cents=gp2.entities
                   comps.each{|e|
                   		 
      	         cents.add_instance(e.definition, e.transformation) 
      	   }
      	        cents.each{|e|  
      	        #if e.class==Sketchup;;ComponentInstance #obselete?
      	         
                  e.explode
      	   }
              end
      
      

      Edited: Aahh heck... Faced with the same problem again. Can only explode 1 instance in the group..
      And if I explode the group gp2.explode it crashes. Added the change to the snippets..

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      Thank's a lot TIG! This is new to me and very useful. This only work's with 1 object, no? But I might have multiple components in an array. I will investigate..

      Strange I haven't picked this up earlier, been reading this forum very much lately. There is so much to learn...

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      Ok, thanks for reminding me. It even say so in the API, groups should not be created that way.
      But I don't know how to do otherwise, if not creating some new entities..

      So how do I do it in this case. gp2=ents.add_group(). How do I add comps to gp2? comps=gp2.entities will not work will it?

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      I got it. Stupid missunderstanding. 😍

      If comps is an array of entities I add to the group. It's THEM I should explode. Not give the group entities a new name and
      try to explode that object.

      
      	if comps
                gp2=ents.add_group(comps)
                comps.each{|e|   # does NOT like gp2.to_a CRASH!
      	     next if not e.valid?
      		  e.explode if e.class==Sketchup;;ComponentInstance 
      	   }
      

      It's funny I always find the solution 1 min after typing it on this forum.

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      Ehum, actually the problems remain using non nested components. If I tile components there are multiple, no?
      The problem was exploding nested components. Now it is exploding multiple components.

      If I put the components inside a group and explode the group.entities(iterate) only 1 component get's exploded.

      I get constant splats following advice on this page. http://forums.sketchucation.com/viewtopic.php?f=180&t=38925&p=343823&hilit=group+from+selection#p343823

      This is what I do: (first I iterate through selection and add to arrays: faces[], edges[], componentinstances[])

      Then

      #comps=array of componentinstances
      	
      	      gp2=ents.add_group(comps)
                cents=gp2.entities
                 cents.each{|e|   # does NOT like gp2.to_a CRASH!
      	      next if not e.valid?
      		  e.explode if e.class==Sketchup;;ComponentInstance 
      	   }
      

      Probably doing some fundamential misstake, but cannot find any relevant info about this particular problem..
      I can only imagine it has to do with the fact that I am adding several components to the group.
      OR maybe it doesent work to run instances through an iterator? The iterator think's the instances are the same object? BUG?
      That makes no sence though... πŸ˜•

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      Gulp 😲 I did not think of making them only tileable. I'm a disaster...

      I was stuck in my mind thinking of DC to do it all.

      OK so from this on, if things go better. Step 1 make "manual" stamp tool. Step 2 "inbuilt" library, like your 2dtools hatches. So the rule here IF the user wants to make own patterns, is NO subcomponents?

      I don't think it's a good idea to ditch the manual stamp tool idea. That could be useful as well, for precision.

      Alright, will try what you say. Thanks TIG for putting me on the right track. πŸ‘

      posted in Developers' Forum
      jolranJ
      jolran
    • RE: DC instance make unique

      Well I'll try.

      TIG, you pretty much know what I'm after. It's for the stamp tool.

      So for ex let's say I have a pattern of concrete with triangles. These triangles should be adjustable in size. Also when I scale up or down to cover the faces of various size, I don't want the scaling to affect the interior components. Main concepts of DC.

      I think I know what you are getting at though. I wasent specific enough when I said "stamp tool".
      Maybe you thought the user would just stamp a component and move it around and stamp again? One could do that as well.
      But it can be painful to align advanced patterns. Better of, cover the whole face. Therefore DC.

      I hope this makes things clearer? πŸ˜„

      posted in Developers' Forum
      jolranJ
      jolran
    • 1
    • 2
    • 41
    • 42
    • 43
    • 44
    • 45
    • 51
    • 52
    • 43 / 52