Point in Brep doesn't work

I have one point and one brep

It shows false… why? There is no data tree issue.

image

it is very stupid. if i explode the brep and join it back it works

It might be. We won’t know without your file.

Congratulations, it looks stupid to me too.

1 Like

Another piece of the puzzle? I noticed that your brep and point are sorta far from the origin (~5300), normally not far enough to cause problems but I tried moving them to the origin anyway. As before, BrepInc fails using the moved point but returns 'True" when the unmoved point is connected instead!? Discovered by accident.


BrepInc_2020Dec10a.gh (13.3 KB)

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.

BrepInc_2020Dec10a2

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.