Painting a quadrangular
-
I took the linetool.rb and tweaked it a little to fit my needs, and that was making a line and then hide it, the use for it if you have a quadrangular that sketchup cant 'paint' you make that line which makes 2 triangles that sketchup can 'paint'.
the thing is that when i draw that missing line it doesn't paint the 2 triangles?
any ideas? -
SketchUp can't paint a quadrangular?
Can you provide an example? -
Oh wait - when you say 'paint' - do you mean it doesn't create the faces?
So you in some cases have a quadrangular that isn't co-planar - so you need an edge going across it?
With your tool - that creates the edge, callEdge.find_faces
on the edge you create. That will make it behave like SU's native line tool and generate faces formed by the face if possible. -
if its not on the same plane
-
yea that case,
how do i use Edge.find_faces -
i looked at the example, and did this:
myline=view.model.entities.add_line(p1,p2) myline.hidden=true face = entities.add_face(p1,p2)
not working, probably a syntax error.
any ideas? -
You are trying to create a face with only two points.
The .find_edges leaves SU to create the faces. As you can see from the API docs - that method is called on edges. So you call that method on the reference to your edge.Like so:
myline=view.model.entities.add_line(p1,p2) myline.hidden=true myline.find_faces
-
ok it works but I don't get the problem
whats the difference between find face and add face? -
The method
entities.add_face(..............)
adds a face from three or more coplanar points/edges/etc that you specify - and only adds that face.
Butedge.find_faces
finds all of the faces that edge could have - these might be additional 'internal faces' in complex 3D form - as there could be several sets of coplanar edges that will 'take a face' - some of which you probably don't want! -
thanks a lot!
Advertisement