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

    Posts

    Recent Best Controversial
    • RE: Use Sketchup default cursors

      In the onMouseMove definition, view.invalidate match better. (I've seen that thanks to an old post from Jim)

      		def onMouseMove(flags, x, y, view)
      			view.invalidate
      		end
      

      I don't really understand why in deactivate(view) refresh makes it and not in onMouseMove. Nevermind.
      It's now easy to follow the mouse move and to replace the cursor with the .draw method.

      Thanks again!

      posted in Developers' Forum
      C
      confitex architure
    • RE: Use Sketchup default cursors

      Thank you for such a "dirty" code! πŸ˜„
      Now I get it

      posted in Developers' Forum
      C
      confitex architure
    • RE: Use Sketchup default cursors

      I don't get it.
      What does that mean? Can you give me a short example?

      posted in Developers' Forum
      C
      confitex architure
    • RE: Use Sketchup default cursors

      Nothing happens...Not even errors on Ruby console.

      I tried

      model = Sketchup.active_model
      view = model.active_view
      point1 = Geom;;Point3d.new 0,0,0 
      point2 = Geom;;Point3d.new 10,10,0
      point3 = Geom;;Point3d.new 10,20,0
      point4 = Geom;;Point3d.new 10,30,0
      status = view.draw_polyline point1, point2, point3, point4
      
      

      Or

      point = []
      model = Sketchup.active_model
      view = model.active_view
      point[0] = Geom;;Point3d.new 0,0,0
      point[1] = Geom;;Point3d.new 10,10,0 
      status = view = view.draw GL_LINES, point
      
      
      posted in Developers' Forum
      C
      confitex architure
    • RE: Use Sketchup default cursors

      Right thomthom, thanks
      It changes it with an image. How to replace it by a square that fits values you entered previously? By putting a temporary component that draws the square and that follows the mouse path?
      Or how to get the same effect that I see on this advertisement from 3skng i see on the bottom?

      posted in Developers' Forum
      C
      confitex architure
    • RE: Use Sketchup default cursors

      Hello!
      I've seen plugins such as the one from 1001bit.com that change the cursor when launching a plugin (like when deciding the position of a stair.)
      UI.set_cursor should be helpful.
      Does someone have a short code to share to give an example?
      Help is welcome.

      posted in Developers' Forum
      C
      confitex architure
    • RE: Way to simplify the edges of a square?

      Didier,
      I made a change because I get an error message in the ruby console about the edge.position in your code

      		edges.each do |edge|
      			if edge.start==e.start or edge.end==e.start or edge.start==e.end or edge.end==e.end and not (e.line[1].parallel? (edge.line[1]))
      				if edge.start==e.start or edge.start==e.end
      					corners.push(edge.start.position)
      				else
      					corners.push(edge.end.position)
      				end
      			end
      		end
      
      

      Would you have done it differently?

      posted in Developers' Forum
      C
      confitex architure
    • RE: Way to simplify the edges of a square?

      It could help to retrieve the vertices of edge from faces that are connected. If an edge of one face do not overlap exactly an adge of another face it just divide these element and it becomes difficult to retrieve the vertices.(I mean before Didier and Tig's reply).
      Thanks Didier and Tig.

      Hope to be back soon with the plugin that takes advantage of this post.

      posted in Developers' Forum
      C
      confitex architure
    • Way to simplify the edges of a square?

      Hi,
      I'm trying to retrieve the 4 vertices of a quadrangle that has divided edges.
      But right now I did not found the way to detect when an edge is the continuation of an other and to bypass the result of the middle vertice.
      Any help would be great.

      posted in Developers' Forum
      C
      confitex architure
    • RE: [HowTo?] Find Instance parent's Instances

      Is this what you're looking for?

      def parent_of
      	selset = Sketchup.active_model.selection 
      	for e in selset
      		if (e.kind_of?(Sketchup;;ComponentInstance) ) 
      			compo_name = e.definition.name
      			parent_name = e.parent.name
      			puts compo_name
      			puts parent_name
      		end
      	end	 
      end
      

      Emmanuel

      posted in Developers' Forum
      C
      confitex architure
    • RE: SketchUp RUBY API Wishlist [way of coding wishes, please]

      Hi ScottLininger.
      Not realy a ruby way of coding, but almost...
      I mentionned it in an another post: It would be so nice to retrieve a variable from a model into a dynamic component's attribute instead of the opposit (right now, if I understand well, it is only possible to "export" and to make a code to fill the DC's attribute).

      By the way, I would be very glad if we could learn from your famous animated "sprite" code πŸ˜„

      Thanks!!!

      posted in Developers' Forum
      C
      confitex architure
    • RE: Retrieve model variable

      Hello jim!

      I haven't any code yet. I just entered $var=1 into the ruby console and then tried to retrieve this variable into component's Custom attribute.

      posted in Dynamic Components
      C
      confitex architure
    • Retrieve model variable

      Hello,
      I'm looking for a way to retrieve a variable from a model into my dynamic components attributes.
      When I try to insert $var in the custom attribute, that I created through the ruby dialog, it doesn't work and it becomes #=var
      Maybe did I missed something or is this just impossible?
      Thanks!

      posted in Dynamic Components sketchup
      C
      confitex architure
    • RE: Hidden or soften edge on a face?

      Cool,
      Merci Matt!

      posted in Developers' Forum
      C
      confitex architure
    • Hidden or soften edge on a face?

      Hello,
      it has been a long time I lost contact with ruby. Happy to be back!

      I'm creating a face,

      
      pt1=Geom;;Point3d.new(0,0,0)
      pt2=Geom;;Point3d.new(rand(100),rand(100),0)
      pt3=Geom;;Point3d.new(rand(100),rand(100),0)
      baseface = Sketchup.active_model.entities.add_face(pt1,pt2,pt3)
      
      

      but I want one of the edge(for example between pt1 and pt2) to be hidden or soften.

      Any idea how to do it?

      Thanks!

      posted in Developers' Forum
      C
      confitex architure
    • RE: Google I/O 2008 - Advanced Ruby Scripting for Sketchup

      This is awesome! Very inspiring post!
      I wish we could have more and more of such videos!
      Thanks

      posted in Developers' Forum
      C
      confitex architure
    • RE: Index of entity

      @unknownuser said:

      Dans la doc pardi.

      Hello,
      Quelle doc? Du moins, laquelle est la meilleur?

      posted in Developers' Forum
      C
      confitex architure
    • RE: How to undo from ruby?

      Hi, Again...
      But the start/commit_operation do not undo the variable that changes?
      It only undo "actions" on the screen, on the model.
      Then is there a way to act on the variable and undo the new value?

      posted in Developers' Forum
      C
      confitex architure
    • RE: How to get the insertion point of a component?

      Yes, It does help!
      Merci Didier.

      posted in Developers' Forum
      C
      confitex architure
    • How to get the insertion point of a component?

      how to get the insertion point of a component in the active model? That means the position of the component.

      ss = Sketchup.active_model.selection
      for e in ss
         if (e.kind_of?(Sketchup;;ComponentInstance) ) 
      	point = e.definition.insertion_point
      	puts point
         end
      end
      

      it shoud bevery simple but I don't get it: I get 0,0,0 with this code but the component is not on 0,0,0...
      What's could be wrong?
      Thanks !!!!!

      posted in Developers' Forum
      C
      confitex architure
    • 1
    • 2
    • 3
    • 1 / 3