Given a mesh, for each line which is the best method to obtain the bisector plan of the two adjacent faces?
Component “mesh closest point” and “Mesh Eval” can give the vector for example in the middle point of the line, but the vector doesn’t belong to the bisector plane.
Unify (if possible) the normals and compute the Mesh Face normals.
Loop into the clothed edges collection.
Get the edge.Direction: this could be your xAxis.
Get the 2 adjacent Faces (and obviously the normals since their indexing is the same).
Get the normal’s sum (note: normals are unitized anyway). This could be your yAxis. If the unification failed and the mesh is closed you can control the yAxis direction via some inclusion test (but mesh contains pt has issues some times).
This uses the Sandbox plugin to determine the mesh topology Thank you to @PeterFotiadis for suggesting just adding the mesh normals, saving me a lot effort.
.
mesh bisector planes.gh (10.6 KB)
Hmm … what means a bisector Plane for a naked edge?
Anyway … the attached does some checks more (but not all) related with good/bad meshes (and disjoined pieces).
Mesh_BisectorFacePlanes_EntryLevel_V1.gh (123.6 KB) .
Fair enough, but it might have some meaning to the OP since the planes are orthogonal to the faces.
mesh bisector planes-b.gh (13.0 KB)
Fair enouph.
Added a quad-what-to-do option.
Mesh_BisectorFacePlanes_EntryLevel_V1A.gh (126.7 KB)
And the naked option (but what is a quad face normal? is it a bird?, is it a plane? is it the superman?):
Mesh_BisectorFacePlanes_EntryLevel_V1B.gh (126.8 KB)
Thank you for the quick response.
I’ll try to check it as soon as possible
Hi @akilli @PeterFotiadis Is this possible to do with a polysurface instead? I’m trying to use the sandbox topology for brep, but I’m getting stuck with the edges after exploding the brep.
Many thanks!
Could you post your file? Thanks.
Here’s a little script that gets edge normals for a Brep as bisectors of adjacent face normals
brep_edgenormals.gh (11.3 KB)
(also, a version here for meshes)
This is assuming your Brep has only flat faces. Obviously if any of the faces are curving where they meet, then there isn’t just a single normal per edge. In that case you could change the script above to a function that returns the normal at a given parameter along the edge.
and here an example for Breps with curved faces:
brep_edgenormals_curved.gh (58.9 KB)
Since you’re on a roll here @DanielPiker, could you provide one for meshes with curved faces?
Actually, I can see where that would be more difficult and ambiguous, because you probably won’t have a well defined edge between them…
So like the curved Brep example, but for meshes with Quads/Ngons, and producing twisted beams along the edges?
Would you want these twisted beams to
(a) still bisect the 2 adjacent ngon/quad normals (interpolated per quad/ngon) along their length (these beams generally wont intersect cleanly at the nodes).
or
(b) use the mesh normals interpolated using the standard Mesh.NormalAt. This would give a single normal per vertex, but the edge beams won’t be strictly bisecting adjacent face normals.
Well, I’m thinking terms of mitering, so which do you think would be better? It seems that if there were enough faces, it wouldn’t make much of a difference.
I think if you already have something where already all the faces are curved, and all the beams twisted, it probably makes sense to go for option b and get cleaner nodes.
I’m sorry, I didn’t realize that the code above for meshes did that. Well, then “b”, if you’re in the mood.
This is actually much simpler than the previous examples, because this interpolated normal is the default one you get when evaluating using the standard components. So it can even be done without any scripting:
offset_nonplanar_mesh.gh (11.9 KB)
Very nice. Thanks!
@DanielPiker I just wanted to thank you for the scrip. It help tremendously. We are trying to fit steel frame to a non-uniform shape. I actually bake the edge curves with bisector direction saved as user text for generate the member section later.
Hi Daniel,
Sorry, I just realised I missed this message from the inbox. Thank you so much for the super-detailed help!