Skip to content

Unclear

Ania A edited this page Nov 23, 2022 · 5 revisions
  • what applying a feature really does?

    timberassembly.apply_joint_features()joint.add_features(apply=True)if apply==True: feature.apply()brepfeature._apply_feature() → in BrepFeature:

    def _apply_feature(self):
        part_geometry = self.part.geometry # --> type: <class 'compas_rhino.geometry.brep.brep.RhinoBrep'>
        self.operation(self.feature_geometry, part_geometry, self.TOLERANCE) # WHAT IS TRIGGERED HERE? modifies part_geometry in-place
        new_part_geometry = BrepGeometry(part_geometry) # --> type <class 'compas.datastructures.assembly.part.BrepGeometry'>
        self.part._part_geometry = new_part_geometry.transformed(Transformation.from_frame_to_frame(self.part.frame, Frame.worldXY()))

    BrepFeature.operation

    def _trim_brep_with_plane(feature_geometry, part_geometry, tolerance):
        brep = part_geometry
        cutting_plane = feature_geometry
        brep.trim(cutting_plane, tolerance) # performed by `compas_rhino\geometry\brep\brep.py`
  • part.geometry, part._part_geometry ?

  • beam.geometry.native_brep - what is it? → The underlying instance of the backend brep. Attribute of compas Brep type.

  • confusing different brep data types

  • <class 'compas.datastructures.assembly.part.BrepGeometry'> prints as:
Vertices: 8
Edges: 12
Loops: 5
Faces: 5
Frame: Frame(Point(0.000, 0.000, 0.000), Vector(1.000, 0.000, 0.000), Vector(0.000, 1.000, 0.000))
Area: 0.302551
Volume: 0.00426751666667
  • <class 'compas_rhino.geometry.brep.brep.RhinoBrep'> prints as: <BrepGeometry object at 0x00000000000BE4E9>

  • Rhino.Geometry.Brep prints as: <Rhino.Geometry.Brep object at 0x00000000000BE981>

Clone this wiki locally