Thanks Didier!
These examples are good for learning.
Regards,
Siegfried
Thanks Didier!
These examples are good for learning.
Regards,
Siegfried
@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 arayt=model.raytest(p0, face.normal.reverse)
andpoint=rayt[0]
is the hit point, and thenthk=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
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?
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:
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!