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

    ipomea

    @ipomea

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

    ipomea Unfollow Follow
    registered-users

    Latest posts made by ipomea

    • RE: Rotate face in ruby

      Thank you very much. This has really been helpful. It was OK the first time I tried

      This is the end result:

      moebius.jpg

      posted in Developers' Forum
      I
      ipomea
    • Rotate face in ruby

      Hello !

      I am a beginner with ruby, and I want to rotate a face, and retrieve the new face
      I have the following code:

      ` model = Sketchup.active_model # Open model
      entities = model.entities # All entities in model
      selection = model.selection # Current selection

      pt1 = [x,y,0]
      pt2 = [x1,y1,0]
      pt3 = [x1,y1,h]
      pt4 = [x,y,h]
      fc = entities.add_face pt1,pt2,pt3,pt4,pt1

      tr = Geom::Transformation.rotation ptm,vector,angle
      bas1 = entities.transform_entities(tr,fc)`

      this returns a status, what I want is the face after rotation. If I try anithing else, I always end up with an error

      Is the rotated face still fc or is it an other one and how can I find the new one ?

      posted in Developers' Forum
      I
      ipomea