Welcome to AR-327 !!


Today's learning objectives:

  • Understand the basics of BREPS
  • Learn to use their methods and properties

Breps

Breps

Last week we saw primitives,

Breps

Why go further ?

Breps

What is a BREP ?

Breps

What is a BREP ?
BREP stands for Boundary Representation. It is a representation of a complex geometry using boundaries on surfaces.

Breps

What is a BREP ?
BREP stands for Boundary Representation. It is a representation of a complex geometry using boundaries on surfaces.

Breps

What is a BREP ?
We will not go into the specifics of BREPS, but there is a lot to say about them:

Breps

A small word about tolerances:

We deal with geometries with intersections: tolerances are very important!
	    
            TOL = Rhino.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance
        
    

Small exercice on BREP constructors (5min)

Go on the RhinoCommon documentation and have a look at the BREP constructors, what can you say about them ?

BREPS: "constructors"

technically, creating an object of a class using one of the class' methods is called a static method

BREPS: "constructors"

Trimming

	    
            perimeter = [triangle_side_1, 
	                        triangle_side _2, 
	                        triangle_side _3]
            
            my_brep = Rhino.Geometry.Brep.CreateTrimmedPlane(plane=my_plane, 
                                                             curves=perimeter)
        
    

BREPS: "constructors"

Loft

	    
            crvs = [crv1, crv2, crv3, crv4]

            loft = rg.Brep.CreateFromLoft(curves=crvs,
                                          start=rg.Point3d.Unset, 
                                          end=rg.Point3d.Unset,
                                          loftType=rg.LoftType.Normal, 
                                          closed=False)
        
    

BREPS: "constructors"

Sweep

	    
            rail = my_curve
            sections = [my_section_1, my_section_2, my_section_3]
            sweep = Rhino.Geometry.Brep.CreateFromSweep(rail=rail, 
                                                        shapes=sections, 
                                                        closed=True, 
                                                        tolerance=TOL)
        
    

BREPS: "constructors"

Join

	    
            # Assuming both breps already exist separately
            my_joined_brep = my_brep.Join(otherBrep=my_other_brep, 
                                          tolerance=TOL, 
                                          compact=True)
        
    

Exercice on BREP construction (20 min)

In the website, go to the brep methods page and solve the first exercice (00)

Breps: methods

Breps: methods

	    
            my_capped_brep = my_brep.CapPlanarHoles(tolerance=TOL)

            my_brep_area = my_brep.GetArea()

            my_brep_bbox = my_brep.GetBoundingBox(accurate=True)

            my_splitted_breps = my_brep.Split(cutter=cutter_breps, tolerance=TOL)
        
    

Exercice on BREP construction (20 min)

In the website, go to the brep methods page and solve the first exercice (01)

Breps: properties

Breps: properties

	    
            my_brep_faces = my_brep.Faces

            my_brep_edges = my_brep.Edges

            my_brep_vertices = my_brep.Vertices

            my_brep_is_closed = my_brep.IsSolid

            my_brep_underlying_surfaces = my_brep.Surfaces
        
    

Exercice on BREP construction (20 min)

In the website, go to the brep properties page and solve the first exercice (00)