harmatb
(Harmatb)
June 17, 2019, 7:41am
1
Hi, while trying to create previews for a custom beam component, I could not figure out how to correctly cap Brep planar holes.
The problem:
The open brep is seemingly nice and dandy. The section curves really are planar, and closed.
What am I not seeing?
Code creating the brep:
SweepOneRail sweep = new SweepOneRail();
sweep.ClosedSweep = true;
sweep.AngleToleranceRadians = ConSteel.Constants.Values.EPS;
sweep.SweepTolerance = ConSteel.Constants.Values.EPS;
Brep[] retVal = sweep.PerformSweep(referenceCurve, outlineCurves);
//Brep[] retVal = Brep.CreateFromSweep(referenceCurve, outlineCurves, true, ConSteel.Constants.Values.EPS);
for (int i = 0; i < retVal.Length; i++)
{
retVal[i] = retVal[i].CapPlanarHoles(0.001);
}
return retVal;
dale
(Dale Fugier)
June 18, 2019, 9:58pm
2
Hi @harmatb ,
Can you post your input curves?
Thanks,
– Dale
harmatb
(Harmatb)
June 19, 2019, 9:15am
3
Hi @dale ,
see attached .gh file, with a simple script reproducing the problem, while the GH cap component keeps the brep from the same inputs intact.
BrepCapProblemExample.gh (5.0 KB)
Thanks for your attention,
Balint
dale
(Dale Fugier)
June 19, 2019, 4:16pm
4
Hi @harmatb ,
Have a look at this and let me know if you have any questions.
BrepCapProblemExample-FIXED.gh (3.8 KB)
– Dale
harmatb
(Harmatb)
June 20, 2019, 9:26am
5
Hi @dale ,
Thank you for the help, the geometry is now correct.
Now while testing out, there is another weirdness, in the shading: (same example, just with a 1000 unit long rail)
I figured out if I just draw out the list of faces making up the brep not the actual brep, the preview is nice and as expected, but this seems like a cop out.
Is there some parameter of the brep where I can signal it to stop trying to smooth together the wrong faces?
Balint
dale
(Dale Fugier)
June 20, 2019, 3:09pm
6
Hi @harmatb ,
Is this a different Grasshopper solution? Can you post the .gh file?
– Dale
harmatb
(Harmatb)
June 24, 2019, 6:55am
7
Hi, @dale
you can get it by just replacing the rail line with a line from 0,0,0 to 1000,0,0. Here is a GH file which shows this at my side:
BrepCapProblemExample-FIXED.gh (8.3 KB)
Balint
dale
(Dale Fugier)
June 24, 2019, 5:31pm
8
Hi @harmatb ,
I believe your seeing a display artifact. Improving the render mesh settings seems to fix.
BrepCapProblemExample-FIXED.gh (8.5 KB)
– Dale
1 Like
harmatb
(Harmatb)
June 25, 2019, 9:17am
9
Hi @dale ,
I see, thank you for the help.
-Balint.