Followme on multiple line
-
hi guys, here's the followme example
point1 = Geom;;Point3d.new (0,0,0) point2 = Geom;;Point3d.new (0,0,100) depth = 100 width = 100 model = Sketchup.active_model entities = model.active_entities pts = [] pts[0] = [0, 0, 0] pts[1] = [width, 0, 0] pts[2] = [width, depth, 0] pts[3] = [0, depth, 0] # Add the face to the entities in the model face = entities.add_face pts line = entities.add_line point1, point2 begin status = face.followme line rescue UI.messagebox $!.message end
but I wanna continu the followme with another line connected to the first .. how do I follow on the lines (for example, one going up and then another one going right ?
something like the attached picture
I did something like this but sketchup told me that the face was deleted .. normal
endPoint = startingPoint.offset [0, 0, porte.espaceBas + porte.hauteur + porte.espaceHaut+'1/4'.to_l] lineToFollow = entities.add_line startingPoint, endPoint base.followme lineToFollow endPoint2 = endPoint.offset ["1/2".to_l + porte.espaceCote*2 + porte.largeur, 0, 0] lineToFollow = entities.add_line endPoint, endPoint2 base.followme lineToFollow
thanks !
-
http://code.google.com/apis/sketchup/docs/ourdoc/face.html#followme
@unknownuser said:
The followme method is used creating a shape by making the face follow along an array of edges.
While the Arguments just says "An Edge object to follow." the description seem to indicate you can feed the method an array of edges.
-
As the 'face' is lost after any FollowMe then make an array of all of the edges to follow and do it once using them
-
haha yeah I was looking at the argument !
Arguments:
edge1 An Edge object to follow.I like java for having api doc clearer
Ill read the description too in the future.
thanks !
Advertisement