I want to extrude a face in clock wise direction

ruby

#1

I want to extrude a face along an edge . and I want to insure that the direction of the extrusion go in clock wise direction .How???


#2

Follow Me tool?
Set a circle perpendicular to face you want to extrude then select the face with the Follow Me tool while dragging along the circle.


#3

I want to do this via ruby .moreover , I want to extrude on edge only and not series of edges


#4

Hi,

I don’t really get what do you mean by extruding in clock wise direction… If you have a face and an edge giving you an extrusion direction, I don’t understand what the clock wise direction have to deal with this.

If you want to extrude a face in a specific direction different from the face normal I think you have to do it manually :

  1. Use the Edge.line method on your driving edge to get the edge direction vector (http://ruby.sketchup.com/Sketchup/Edge.html#line-instance_method), reverse it if need or evaluate it with its edge vertices positions…
  2. Then for each face edge draw a new face that start with the two current edge vertices and the two other one offseted by the edge line vector grabbed first.
  3. Finally draw the last face which is composed of all the offseted vertices.

#5

look …the issue about direction is I want to extrude a profile on face’s edge , and want always insure the face fall in the right side relative to the direction of the extrusion , since I may extrude non-symmetrical profiles , thus i want to insure which half of the profile , fall on which face .


#6

can you add a simple before and after drawing to help me see what you mean?

john


#7

this example is self explanatory .


#8

issues may be due to using the wrong axis…

unlike some other cad software SU uses…

 X_AXIS
(1.0, 0.0, 0.0) # red
 Y_AXIS
(0.0, 1.0, 0.0) # green
 Z_AXIS
(0.0, 0.0, 1.0) # blue

john


#9

In your image, the green axis is vertical, and the blue horizontal. Normally blue is the Z direction (vertical) and green horizontal running away from you (Y direction), with red as you have it the X direction.

Unfortunately, I still don’t find your diagram ‘self-explanatory’ except in the sense that Ambrose Bierce’s 1906 Devil’s Dictionary defines ‘self-evident: that which is evident only to oneself’.


#10

Hi,

Ok, as John said this is not obvious what you are trying to do… I’ll try to explain what I understand.

It seem that you’d like to setup a shape at a position with the handband circle shape inside of the on ground face and then extrude it along the edge.

So basically what you need to do is :

  1. Find the on ground face borders and find what is the perpendicular outside vector for each face border edge.
  2. Then insert and orient your shape at one of the edge bounds.
  3. Finally extrude the shape along its normal.

For step 1 you can

  1. Get the min coordinate of the on ground face bounding box.
  2. Find the on ground face cosest vertex from that point.
  3. Then pickup an arbitrary edge on the two connected to that vertex.
  4. If the edge vector starting from that vertex is going globally on the right, your outside vector will be perpendicular globally down. If the edge vector is going globally up, your outside vector will be perpendicular globally on the left.
  5. Then move foward to each edge an get it’s ouside vector by rotating the previous one.

For Step 2 you just have to grab the informations parsed at setp 1 to place an orient you shape.

For step 3, use the push/pull method to extrude tou sahpe face using the edge length.

!I hope you’ll get it. Maybe there is an easier way but that the only one that came to me right now. I’ve already done that for a tool and it works well :wink: