Triangulate triangles ?
-
See a new entry of an oldie in the SCF PluginStore...
http://sketchucation.com/forums/viewtopic.php?p=495376#p495376 -
Seems that is not the trick!
You must find first the middle point intersection on the face!
And works only face by face!I have tried your "Add Center Point": alas that don't work for a triangle! (for it's edges yes but not for the face itself)
I have tried your "Center of Gravity": alas that don't work with a faceThere is something cool with your roof plugin, alas that works only one trangular face by one triangular face (and the minimum angle of roof is 1Β° and not 0Β°
(the angle problem will be not a problem : we can flatten the result - but face one by one is a problem
And there is a little deviation / view top / Camera projection Parallel -
seems it's also the connections of the medians and the gravity center of a triangle so
an interesting thing! -
Does it need to be 3 tris? Can it be 4?
-
-
4 ? Like what ? Please an image! You speak of a quadrangle hidden on a triangle ?
No 3 triangles!
A simple triangle(s)( any number ) with this simple construction of 3 medians -
Adding the feature to slit multiple face by automatically finding the center point will be great addition! This should triangulate any type of face aka trig, quad, ect... Because your connecting a line from center to every other vertex. Maybe adding things like skip one vertex every time you add a line will be interesting to see.
Rich O Brian that would be great as well!
-
It is Artisan subdivide. Thank you Catmull Clark
-
So no! And why not the connections with middles ?
Medians are wanted!
But if you a have the plugin why not, that can be used for other thing -
Yep cool, but not like the first post
And I should know it! -
Alas I have deserted the Ruby language for a while!
If you can make a little plugin that will be wonderful
-
Here is an example code for achieving what you want Pilou...
model = Sketchup.active_model ents = model.active_entities sel = model.selection faces = ents.grep(Sketchup;;Face) faces.each do |face| vertices = face.vertices bbox = face.bounds cpoint = bbox.center vertices.each do |vertex| p1 = cpoint p2 = vertex line = ents.add_line p1,p2 end end
Note: Some very pretty geometry start appearing when you keep splitting!
-
I will do that!
-
Beat me to it
You might want to change the
faces = ents.grep(Sketchup::Face)
to
faces = **sel**.grep(Sketchup::Face)
So then the user changes only selected faces ?
OR perhaps
faces = sel.grep(Sketchup::Face) faces = ents.grep(Sketchup::Face) **unless faces[0]**
so it works on a selection OR everything if there is no selection...Also you want to make it undoable, so add
**model.start_operation('subtri')** faces.each... ...end **model.commit_operation**
-
Hahaha!
TIG I would be very happy if you modify your existing plugin to add Pilou is feature request.
I am interested in making this for learning and I have some additional ideas I want to explore. I consider you my mentor TIG and there will never be competition between you and me I promise!
By the way thanks for the suggestion!
Here is updated code...
model = Sketchup.active_model ents = model.active_entities sel = model.selection faces = sel.grep(Sketchup;;Face) model.start_operation('csplit') faces.each do |face| vertices = face.vertices bbox = face.bounds cpoint = bbox.center vertices.each do |vertex| p1 = cpoint p2 = vertex line = ents.add_line p1,p2 end end sel.clear model.commit_operation
-
OK
I'll make a simple script and publish it shortly... -
Thank you TIG!
-
Thanks Pilou !
You convinced TIG...
And Thanks TIG, I think it's a must have ! -
Try this http://sketchucation.com/forums/viewtopic.php?p=495430#p495430
TriangulateAllFaces
... -
I think the triangulation is not the same...
Advertisement