sketchucation logo sketchucation
    • Login
    1. Home
    2. voljanko
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 22
    • Posts 142
    • Groups 2

    Posts

    Recent Best Controversial
    • Geom.intersect_line_plane = point3d?

      In the api http://code.google.com/intl/sl-SI/apis/sketchup/docs/ourdoc/geom.html#intersect_line_plane
      ,this function should return point3d.
      But it seems that return vector3d.
      Is it a mistake in the documentation?
      How to easier(less computation) convert vector3d to point3d?
      p.s. does anybody know how to see api users comments?
      I can not set my browser (chrome) to show the comments.

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: [Code] How do you compute weighted vertex normals?

      I'm trying to follow your conversation,but not sure to understand what are you trying to do.
      Do you want to align faces that are nearly aligned?

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: [Code] How do you compute weighted vertex normals?

      By computer you mean compute?

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Sketchup kind of 'stuck' after scripts

      If you want to "close" a tool,you have to select another tool.
      If you want to do it in code,try

       Sketchup.send_action "selectSelectionTool;"
      

      ,or other tools you want.

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Messed up model

      Ok,what about this one.It seems all clear,but is not.It has some irregularities.If you delete one edge,the face will be deleted and if you draw back the edge,the face will not come back.This means that the points of the edges are not on the same plane.
      I don't want to remove coplanar edges but to detect this kind of models (or entities).What to do to detect it?


      mestup2.skp

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Sketchup kind of 'stuck' after scripts

      Nothing is wrong.You are just "in the tool".
      When the tool is selected,you can do just what the tool let you do.So it can be like stuck.
      You just have to select other tools to exit this tool.

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Sketchup kind of 'stuck' after scripts

      @ghandi said:

      Mainly that are modified versions of Fillet.rb, Pipe_along_Path.rb.
      First step would be to check if the original versions work ok for you.If yes,than find the differences.Than add every difference to the original(working) code.Then you will know what line makes your code not working.

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Sketchup kind of 'stuck' after scripts

      It all depends of the letters in your scripts πŸ˜‰

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Messed up model

      Try to delete all the coplanar edges that are on this model and you will have only 1 face.
      Then try to select all (edited) and make the intersect with selected (with the right button mouse menu).
      The message will be that is nothing to intersect,but the face will be divided in many faces.
      I think that this is because of the Sketchup tolerance of the coplanar faces(the points of the edges are not on the same plane).

      @tig said:

      Why would you want to intersect it with itself?
      Only to detect such deviations.
      If it is all regular,nothing happen.
      If the geometry will change,something was wrong.
      If bugsplat occurs,the model has some serious problems and can affect other functions too.

      posted in Developers' Forum
      voljankoV
      voljanko
    • Messed up model

      I would like to know ,what is wrong with this model.
      It is causing me a bugsplat in some functions (self intersect function).

      group.entities.intersect_with false,transformation, group.entities,transformation, true, group.entities.to_a
      
      

      Sometimes Sketchup detect it and offer to fix error,but I cannot repeat this situation.
      This model is a part of bigger model and I have isolated the issue to this small piece.
      I would like to detect this kind of errors without bugsplat.


      messedup.skp

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Self intersect

      Grrr,I hate the "smart" pages. 😠
      There are no comments on my API pages.I will try to change setting in my browser.

      @unknownuser said:

      But using the 'group.transformation' for both required transformations to ensure that the group's geometry intersects with itself, and it returns the intersection geometry in the same location should work ? Perhaps not if the group has been moved ??

      I have tested it... and it is only ok, if both the transformations are "new".

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Self intersect

      Yes,but transformations should be "new",otherwise the intersection lines are displaced.
      p.s.where do you read the user comments of the API?

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Self intersect

      Now it is ok,thanks.Here is the code:

      transformation = Geom;;Transformation.new   
      faces=[]
      group.entities.each do |entity|
         if entity.is_a?( Sketchup;;Face)
            faces.push entity
         end
      end
      group.entities.intersect_with false, transformation, group.entities,transformation, true, faces
      

      p.s.where do you read the user comments of the API?

      posted in Developers' Forum
      voljankoV
      voljanko
    • Self intersect

      I'm trying to intersect a group with itself like this:

      group.entities.intersect_with false, group.transformation, group.entities,
         group.transformation, true, group.entities
      

      but with a type mismatch error.
      What is wrong,how to intersect a group with itself?

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Entities.add_group bug?

      Grrr,it is only working if the group is edited (so in the same context).
      Otherwise strange behaviour and Bugsplat anytime. 😒

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Entities.add_group bug?

      @thomthom said:

      I always get uneasy when a code is run the first time without any errors... πŸ˜• πŸ˜’

      Reading your code, the line

      group.erase
      

      makes me curious because the erase should be with the !.
      So I discover that it was only half the code working.
      But the result is ok.
      So the working code is:

      def move_face(face, destination_entities )
        source_entities = face.parent.entities
        entities = face.edges << face # I think you need to include all the edges related to the face
        group = source_entities.add_group( entities )
      end
      

      So the untested code theory remains πŸ˜„
      I will test it more,because of the Bugsplat fear.

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Entities.add_group bug?

      It's working!!
      I cannot believe it.I have a theory that nothing can work without testing.You are breaking this theory πŸ˜„

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Entities.add_group bug?

      @thomthom said:

      To move the face, why not group it, get it's definition, then place a new instance in the destination context and erase the old.

      Can you give the code sample,please(how to group it).I would like to test it.

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Entities.add_group bug?

      Uff,a lot of work for "moving" a face.And still needs the material and back material and soften edges...
      Almost easier to wait the Sketchup team to repair the Entities.add_group(other_entities) function πŸ˜„

      @tig said:

      How do YOU know [magically?] that e0=group1.entities[0] is a face?
      The ruby console confirmed it.It is only for testing.

      posted in Developers' Forum
      voljankoV
      voljanko
    • RE: Entities.add_group bug?

      Thank you for the "line" example,I have try to "move" a face,but it is not working.

      group1=model.selection[0]
      e0=group1.entities[0] # a face
      group2=group1.entities.add_group()
      group2.entities.add_face(e0.edges)
      e0.erase!
      

      What's wrong?
      The error is : Edge has different parent

      posted in Developers' Forum
      voljankoV
      voljanko
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 4 / 8