sketchucation logo sketchucation
    • Login
    1. Home
    2. Frankn
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now
    F
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 26
    • Posts 103
    • Groups 1

    Frankn

    @Frankn

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

    Frankn Unfollow Follow
    registered-users

    Latest posts made by Frankn

    • RE: Get coordinates of nested components

      @fredo thanks for your reply...

      So if I understand what you're saying, I need to find all the nested parent components first and there location and from there iterate the nested child components of each nested parent component to get the cumulative location?

      Sorry I think I even confused myself! πŸ˜•

      posted in Developers' Forum
      F
      Frankn
    • Get coordinates of nested components

      As the title says... I want to get the coordinates of all nested components.

      I've searched but admittedly I don't really understand how transformations work so I might not be searching correctly.

      When iterating a component I can get the origin of each nested component but that only returns the coordinates relative to it's immediate parent but not relative to the whole component tree... if that makes sense.

      I'm assuming I would have to add each relative component transformation but I have no idea how to do that.

      posted in Developers' Forum
      F
      Frankn
    • How to replicate change axes

      Is there a way to change the axes of a component instance like you would by right clicking and selecting change axes?

      I've searched but haven't found anything, I tried applying a transformations and nothing works!

      Thanks

      posted in Developers' Forum
      F
      Frankn
    • RE: Best practices for creating an rbe

      Where can I find info and/or examples on how to set this part of the loader file? I'm searching but not finding anything...

      require "Author_MultiClassPlugin/MultiClassPlugin_SharedConstants.rb"
      
      include SharedConstants # mixin the constant module
      

      And this from the SharedConstants file?

      SOME_SEARCH_PATTERN ||= /^Author/
      

      Thanks

      posted in Developers' Forum
      F
      Frankn
    • RE: Best practices for creating an rbe

      Thanks for the info Dan... I'll check out those forums. I wasn't even aware that the Sketchup API had it's own require method and it explains why I'm having problems. I guess I have some more learning and reading to do! πŸ˜„

      posted in Developers' Forum
      F
      Frankn
    • Best practices for creating an rbe

      I've been trying to get a plugin signed and running into some issues which seem to be related with require... I get these errors...
      @unknownuser said:

      Error: #<LoadError: cannot load such file
      .

      I found this post https://forums.sketchup.com/t/cant-load-required-rb/42755/3 where Dan uploaded some templates but I'm not sure how the
      @unknownuser said:

      MultiClass_MultiFile.zip
      works. Does anyone have a sample code that I can look at or can someone please explain how those files should be structured and how they work together?

      Frank

      posted in Developers' Forum
      F
      Frankn
    • RE: Win32API is deprecated after Ruby 1.9.1

      Thanks for the info Dan... I didn't check to see if there's a difference when loading different versions, just haven't had time and other than being annoying I don't see any problems in my plugin.

      When I get a chance I'll look into it more and see if there are other errors as you suggested.

      posted in Developers' Forum
      F
      Frankn
    • Win32API is deprecated after Ruby 1.9.1

      I'm getting this error
      @unknownuser said:

      C:/Program Files/SketchUp/SketchUp 2021/Tools/extensions.rb:197: warning: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead

      My plugin was working before today and I haven't changed anything, what can be causing this error all of a sudden?

      Thanks

      posted in Developers' Forum
      F
      Frankn
    • RE: Moving a curved face/surface

      Found this post which helped me find the solution...
      https://forums.sketchup.com/t/transform-a-model-vertex-by-vertex/38771/7

      Here's the code I'm using with some notes... if something can be improved or changed please let me know? I can also add the code to iterate the faces if needed?

      Basically you need the vertices of all the faces you want to move and each vertex needs a cooresponding vector to be moved to. That way you can pass the 2 arrays to

      transform_by_vectors(vertices, vectors)
      

      . Andif you're using sub components like I am, make sure you're in the correct entities context (not sure I'm using all the proper terminology here) oe else you get a mess as a result.

      Like Tig explained in the post I shared...

      @unknownuser said:

      ... if every vector has a separate vector-transformation you need to pass two full arrays - in one go!

                      
      vectors=[]  //array of position to move vertices
      vertices=[] //array of face vertices from the individual faces that make up the surface
      
      vertices.flatten!  //in my case I need to flatten the array
      vertices.uniq!     //make sure there are no duplicate vertex
      
      vertices.each{|vector|
        position=vector.position.clone    
        position.x +=distance
        vectors.push vector.position.vector_to(position)
      }
                                      
      component_entity.transform_by_vectors(vertices, vectors)
      
      

      Hopefully this helps others out because it wasn't easy to find or understand... but it works!

      posted in Developers' Forum
      F
      Frankn
    • Moving a curved face/surface

      As the title says, how do I move the curved face/surface? I'm able to iterate and get the individual faces and I tried

      face[0].pushpull distance
      

      within the loop but the faces take off in different directions.

      I tried

      face[0].transform!(Geom;;Transformation.new([0, distance, 0]))
      

      but that doesn't work.

      I also tried adding the faces to selection and doing something with that but I can't get anything to work.

      Thanks...

      curved face.jpg

      posted in Developers' Forum
      F
      Frankn