Skip to content

Commit

Permalink
Bug fix - works better with 4 point surfaces where two vertices conin…
Browse files Browse the repository at this point in the history
…cide
  • Loading branch information
Chengxuan-Li committed Mar 1, 2023
1 parent 5a1acd7 commit 37506b2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions QuadHypComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,20 @@ protected override void SolveInstance(IGH_DataAccess DA)
if (UDim == 99999999.99) { return; }
if (VDim == 99999999.99) { return; }

NurbsSurface srf = Bsrf.Faces[0].ToNurbsSurface();
//NurbsSurface srf = Bsrf.Faces[0].ToNurbsSurface();
Brep brep;
if (Bsrf.Edges.Count == 3)
{
var cs = Bsrf.DuplicateEdgeCurves(true);
var bplaceholder = Brep.CreatePlanarBreps(cs)[0];
brep = bplaceholder.Faces[0].ToNurbsSurface().ToBrep();
} else
{
brep = Bsrf;
}



var brep = srf.ToBrep();



Expand Down

0 comments on commit 37506b2

Please sign in to comment.