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

    BWV

    @BWV

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

    BWV Unfollow Follow
    registered-users

    Latest posts made by BWV

    • RE: Detect face on pushpull

      Thanks Didier!

      These examples are good for learning.

      Regards,

      Siegfried

      posted in Developers' Forum
      B
      BWV
    • RE: Detect face on pushpull

      @tig said:

      simply use face=entities.add_face(p0,p1,p2,p3).
      […] face.normal is its normal vector, so reverse it to look behind the face with a rayt=model.raytest(p0, face.normal.reverse) and point=rayt[0] is the hit point, and then thk=p0.distance(point) tells you how far you need to pushpull ' face'

      You probably feel like "why I'm writing this twice?" 😄
      But the fact is that now I got it. Sorry, there is a lot I need to learn, I really appreciate your help.

      @chris fullmer said:

      Yes, you could use your face, then do my_face.all_selected to get an array of all elements (faces and edges) that are connected to your face.

      Chris, nice solution! In my real application for the script though this may not work, not always everything is connected. But it will solve another problem I had earlier.

      Thanks a lot TIG and Chris,

      Best wishes,

      Siegfried

      Edit: fixed a typo

      posted in Developers' Forum
      B
      BWV
    • RE: Detect face on pushpull

      Thanks TIG and Chris,

      @chris fullmer said:

      That should work, as long as you can determine what face you are trying to pushpull to.

      Exactly, that's the question.

      TIG's suggestions were very clever and I have been trying to understand correctly, unfortunately looks like the normal solution is not what I need. Once I have the that face normal, is it possible to find the face itself?

      posted in Developers' Forum
      B
      BWV
    • Detect face on pushpull

      Hello,

      I'm completely new to SkechUp scripting, but have found it impressive so far. I can't see why haven't I touched it after years of SketchUp use.

      One thing that I have been wondering is about "detecting" a face during pushpull right on the script. Similar to step 5 in the following:

      Screen shot 2011-01-25 at 13.42.46.png

      I'm almost sure it's not a viable solution, then I'd like to ask: what's a recommended procedure to achieve the same result, taking into consideration that the amount (length) of pushpull is unknown? Maybe creating a long edge or face and intersecting to then calculate the correct measure?

      Thanks!

      posted in Developers' Forum
      B
      BWV