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

    lekonna

    @lekonna

    10
    Reputation
    1
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    lekonna Unfollow Follow
    registered-users

    Latest posts made by lekonna

    • RE: Reverse faces

      ok thanks guys, i have to start looking into this.

      i would transfer these faces manually but since the models are not originating from
      sketchup it means that they are pretty high on polycount (30k-100k) and flipping even 1000 faces manually is bit, well, horrible πŸ˜„

      posted in Developers' Forum
      L
      lekonna
    • Reverse faces

      Before i start to climb this particular hill i'd like to ask if you know of such a script already.

      The point is that i have some acad models that include a staggering amount of faces which for some reason are facing in random directions. However the model should be always solid so it would be enough for me to just check the normals of the faces and compare those to the camera and if they are not opposite i could just reverse the face.

      Can you spot a fatal flaw in the reasoning or provide a good starting point for this work ?
      I guess it would involve selecting all faces in the FOV and doing some vector-magic on them?

      Br,
      Janne Kotka

      posted in Developers' Forum
      L
      lekonna
    • RE: Created geometry on auto-move mode

      perfect, thanks Jim!

      [lekonna]

      posted in Developers' Forum
      L
      lekonna
    • RE: Created geometry on auto-move mode

      Geez it seems i'm lost with this coding business, well it's been like 5 years, thats what managering stuff does to you i suppose.

      Can you guys point a good way to get rid of the double geometry for me? If i just go ahead and upload the script here. Though i have to appologize for the code since the variables and texts are in finnish. Was bit too sure i could pull one simple script off by myselfs πŸ˜‰

      So the problem being on how to get rid of the double geometry thats not folling the place_component.

      Thanks in advance, should be no-brainer for you guys.

      -Janne

      http://www.sketchucation.com/forums/scf/sas/Ruby/windower.rb

      [lekonna]

      posted in Developers' Forum
      L
      lekonna
    • RE: Created geometry on auto-move mode

      hmm it seems that now i get double geometry, the one i place with the place_component and one created at 0,0,0 duh.

      [lekonna]

      posted in Developers' Forum
      L
      lekonna
    • RE: Created geometry on auto-move mode

      haa gotit!

      the to_component returns a componentInstance which has the
      definition method returing just what i needed.

      Thanks a ton Jim!

      [lekonna]

      posted in Developers' Forum
      L
      lekonna
    • RE: Created geometry on auto-move mode

      alright. the documentation seems to be bit incomplete on that method.

      what i tried was:

      
        component = group.to_component
        status = model.place_component component
      
      

      and what i got was

      
      Error; #<TypeError; wrong argument type (expected Sketchup;;ComponentDefinition)>
      
      

      so it would seem that it doesn't return a componentdefinition

      [lekonna]

      posted in Developers' Forum
      L
      lekonna
    • RE: Created geometry on auto-move mode
      
      Error; #<TypeError; wrong argument type (expected Sketchup;;ComponentDefinition)>
      
      

      dang πŸ˜„ model.definitions seems to retrieve the list of component definitions in the model, but how do i go about creating one and assigning this group to it?

      [lekonna]

      posted in Developers' Forum
      L
      lekonna
    • RE: Created geometry on auto-move mode

      wow that was a fast reply, thanks jim!

      Now i'll just have to dig out how the ComponentDefinition class works, as my geometry is at the moment only a group.

      [lekonna]

      posted in Developers' Forum
      L
      lekonna
    • Created geometry on auto-move mode

      Greetings all,
      This is my first post to the forum, what i've read here so far, seems like an excellent forum, good work guys!

      So to the question at hand:

      I've impleneted a small script that prompts for values and creates a window element from the values input, the problem is that the element pops into existance at 0,0,0 which in case of modeling a large house for example is not very handy. Is there a way to activate the move tool from ruby and set the grab point as one of the corners of the just created group? This would make my life a lot easier πŸ˜„

      Br,
      Janne

      [lekonna]

      posted in Developers' Forum
      L
      lekonna