sketchucation logo sketchucation
    • Login
    1. Home
    2. dany67300
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 9
    • Groups 1

    dany67300

    @dany67300

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

    dany67300 Unfollow Follow
    registered-users

    Latest posts made by dany67300

    • RE: Optimization Tips

      I hadn't seen that i could put a different material to each instance of a same defintion ๐Ÿ˜ณ
      thanks a lot ! it works very well ๐Ÿ˜„

      posted in Developers' Forum
      D
      dany67300
    • RE: Optimization Tips

      I have read all you optimisation tips and tried them, but nothing seems to change the speed creation of my objects. I'm using Sketchup 8 to create dominos described by a picture. To create the dominos, I tried the add_face method and the fill_from_mesh, but the times are exactly the same. It takes me about 2 s to create 400 pieces, and it's growing exponentially. With 600 pieces -> 7s, 1200 pcs -> 50s...
      Is it normal to take so much time ? Each domino is created in his own group for the moment, but it doesn't change if I create them directly in my scene.

      posted in Developers' Forum
      D
      dany67300
    • RE: Down to Top traversal

      In my array I have groups, that I get from a top to down traversal. I think the best solution will be to store my own couple (transformation,group) in my own tree structure to do the thing I need.

      posted in Developers' Forum
      D
      dany67300
    • RE: Down to Top traversal

      In fact, I'd like to add a physical engine created by our society to sketchup, like sketchy physics does.
      So each entity in sketchup is linked to a body in my engine. I have the list of the linked entity in my own array so I can access them through this array.

      When I make my simulation, to initialize value, I have to get the whole transformation of my entities to set their position in the physical world, and then at each step I get the transformation in my engine and have to set it to sketchup entity, but if they are in a group (for example a group bike, we'd like to turn the wheels) I have to extract the wheel transformation of the bike transformation, as the wheel's transformation depends on the bike's transformation.

      posted in Developers' Forum
      D
      dany67300
    • Down to Top traversal

      Hello everybody,

      I've got a little problem in sketchup.
      I'm parsing all the elements from my Model, using the entities method, to go from the model, to the group, to the face, to the position....It's for me a top-down traversal so I can get all the transformations of my elements. This works great.

      But now, I need to do the reverse, I've got an entity, and I want to get all his parent's group transformation, but when I use the parent method on a Face for example, it takes me to a DefinitionList, which is directly in the model, I can't get the parent group and his transformation. Sometimes, it works using the instances method on the DefinitionList to get the group that uses this definition, but if many groups shares the same definition, I don't know which one is the selected one.

      If somebody can help me, it would be great

      thanks in advance and sorry for my bad english :s

      posted in Developers' Forum
      D
      dany67300
    • RE: Entity and Vertex

      I just wanted to put the vertex in the selection for drawing considerations, but I'll do it in an other way.

      For the moment, I'm trying to found a memory leak when I try to send my mouse coordinates to a Webdialog for displaying it using the InputPoint class and the position method. It takes me a lot of memory and then makes sketchup very slow.

      posted in Developers' Forum
      D
      dany67300
    • RE: Entity and Vertex
      		#quand on bouge la souris
      		def onMouseMove(flags, x, y, view)   
      			#mise ร  jour du point deplace
      			@input.pick view, x, y	
      			
      			update
      			
      			view.invalidate
      		end
      		
      		def update
      			pt = @input.position
      		end
      

      it looks like this with some javascript call in the update function

      but when I comment them, there is still the leak. If you move a lot your mouse, you'll see the bug

      posted in Developers' Forum
      D
      dany67300
    • RE: Entity and Vertex

      ok thank you for your fast answer.

      I'll try to fit my needs into antoher way, your Vertex Tools looks great, but it isn't adapted for me.

      posted in Developers' Forum
      D
      dany67300
    • Entity and Vertex

      Hi everybody,

      for my first message, I've got a problem in Sketchup and Ruby.
      I'm trying to modify some Vertex position, I access them through the vertices method in the edges, so myVertex is a Vertex

      				
      if myVertex.is_a?(Sketchup;;Vertex)
           puts "Vertex"
           if myVertex.is_a?(Sketchup;;Entity)
                puts "Entity"
           end
      end
      			
      if myVertex.is_a?(Sketchup;;Entity)
           Sketchup.active_model.selection.add myVertex
      end
      
      

      this show me in the ruby console :

      Vertex
      Entity
      Error; #<TypeError; wrong argument type (expected Sketchup;;Entity or Array of Sketchup;;Entity)>
      
      

      when i try to add it to the selection.
      so I've got a Vertex which is an Entity, and it says me that it's not an Entity (with the error)

      Can somebody explain me this symptom please ?
      thanks

      (sorry for my english)

      posted in Developers' Forum
      D
      dany67300