Grasshopper

algorithmic modeling for Rhino

Hey all,

I would like to assemble some faces of a Brep in XY plane according to topology.

Given indexes of faces to assemble I project those faces to the XY world and then I rotate and move according to topology.

To project my Brep face I first duplicate face from my original brep (using BrepFace.DuplicateFace(false)), then apply PlaneToPlane transformation to it.

This works fine. And I get all my faces in XY world.

Next I try to reuse this projected brep (duplicate brep) to move and rotate them and sometime (for some faces only) I get an Invalid Brep. 

Brep.Transform returns True but the brep becomes invalid after this transformation.

Any advices?

Thanks in advance

Jerome

Views: 1491

Replies to This Discussion

I'd like to see an example of one that fails. And you can also use the [Null Item] component to get a description of the validity (D output). It would be nice to know why Rhino thinks the Brep is invalid.

Hi David,

Thanks for your reply, but what is strange is that Null component does not give any description:

So I don't know where to search :-(

Thanks

Jerome

Panels convert data into text. So after the panel you're not dealing with an invalid brep, you're dealing with the text "Invalid Brep", which, as far as text goes, is perfectly valid. Please plug the brep directly into the Null component.

Ohh I didn't realize that .. It was clearer for me :-)

Here is the description of the invalidity:

Brep: Distance from start of ON_Brep.m_T[0] to 3d edge is 1.99584e+292. (edge tol = 0, trim tol ~ 0).

Ok, 1.99e+292 is an absolutely humongous number, so the next step is trying to figure out where it comes from. I'll really need the brep and the transform you're using to replicate this.

Ok I'll try to reduce my example to isolate the situation.

I have found my mistake. 

Thanks for your support

Perhaps you would be willing to share the problem & solution so others can learns from you?

Well, I did use a vector of an unset segment in my computation to determine the rotation angle of the Brep transformation.

I have a method that searches of the segment index I want. If the segment is not found -1 is returned instead of actual index.

My method that returns the segment according to index returned Line.Unset in case of index <= 0. This should be index < 0

Dummy mistake :-)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service