Point in Brep doesn't work

hmmm… unfortunately in architectural models we use inches or mm as units and the model is often very far from the origin

You’ll have to keep an eye on that. At extreme distances, there can be failures. But this model isn’t anywhere close to extreme.

Something weird about that brep - how was it constructed?

Look carefully at the Z axis (blue) of the frames on all the faces. On the edge faces, it is pointing IN instead of out as expected, and as you see from the rebuilt brep after Join.

Thanks for looking into this further! it is weird.
I used Offset Surface from Pufferfish…I had offset in both + and - directions and then figure out which one was containing the point to make sure they are going the right way.

What about the edges? Did you loft the two offset surfaces and then join all three pieces? I didn’t know it was possible to create a ‘Closed Brep’ with any faces having their surface normal vectors (those Z axes) pointing inward instead of outward. Can you post that fragment of GH?

I can’t remember the post, but previously it was mentioned that there is a possible chance for a closed brep to face inwards.
The fix was to explode and join the surfaces, the new brep should have it’s faces facing outwards.

as confirmation that this is exactly the case of a flipped Brep, here is the negative value for its volume :slight_smile:

it was just a “boundary surface” from a polygon

That looks like more than one Pline / Boundary surface.
So are you saying that the Pufferfish OffSrf component results in a ‘Closed Brep’?

Standard GH Offset Surface results in a surface, not a ‘Closed Brep’, which is why I mentioned lofting two surfaces (actually their edge curves) to make the edge faces. Maybe @Michael_Pryor can help you with this, more digging is required. Please let us know how it happened?

The post you linked isnt related to this question (I think). That was about them confusing offset surface functionality and expecting offset polysurface functionality (because rhino uses one command to do both called OffsetSrf, where Rhinocommon uses two different methods one for offsetting brep faces or surfaces and another offsetting entire breps).

Pufferfish is using this method to offset surfaces so yes it can do both sides and create solid. https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Brep_CreateFromOffsetFace.htm

@rhinouser11 I see no Pufferfish in your definition so I dunno what to tell you, however that component in specific is just Rhinocommon so either there is a bug with that method or there is something weird with the surfaces you tried to offset.

Screen shots don’t help much when trying to debug code.

Here’s a simple method to make a ‘Closed Brep’ from any surface. The white group could be clustered.


OffSrf_2020Dec10a.gh (8.3 KB)

The expression on the Move ‘T’ input is “-x/2”.

here’s the full script
test2.ghx (286.4 KB)

i think the problem is coming from Rhino.Geometry.Brep.CreateFromOffsetFace

Why is this thread marked ‘Solved’ already? There’s still a bug somewhere but I would just build the brep a different way and move on.

the problem is present only when a negative offset value is used with OffsetSurface (by the way, that OffsetSrf component you are using is recognized as “old” by my GH)


test2_re.ghx (276.4 KB)

It is distressing to see this thread still marked as “Solved” when it’s clearly a REAL BUG and not solved.

Can someone at McNeel (@wim?) or @Michael_Pryor please follow through and make sure this one gets fixed? It causes other components to fail (BrepInc and Volume) but the cause is a mal-formed brep with some of its face normals directed inward instead of out. Thank you.

I believe I already fixed this on my end actually (if I remember correctly). That script is using an old Pufferfish (hence the component marked old). As far as fixing the method itself I cannot change McNeel core methods. I don’t have access to my code at the moment but I think what I did in code was something like “if offset is negative, flip surface normals and offset positive” as to avoid any negative offset issue.

@rhinouser11 what Pf version are you using?

pufferfish2-3
i havent updated in a while. you have too many components. wish you had an installer that lets me deselect some of them.

image

Afraid that .gha does not work that way. I’m not sure why too many components would be a problem, you could always just move away from the Pufferfish tab and then that tab will close. However, not a bad idea for selective loading but out of my control. Update to 2.9 and the issue should be resolved. Or do it with standard Gh by flipping normals if offset number is negative.

Damm even I am having a similar kind of issue, I have searched all over the internet and even have posted on number of threads on different forum, no solution seems to work. I am really frustrated, can anyone of you here help me resolve this issue, I am very much tired now.