import trimmed surface

I created in Rhino a trimmed surface and exported it as an igs file(attached)
when i read the file I just get a TopoDS_Face with a Geom_BSplineSurface

how do I know it is trimmed surface?
how do I get its trimmed data?

Attachments: 
jelle's picture

so this tests whether a face is trimmed and whether a given u,v coord is trimmed

    def is_trimmed(self):
        """
        :return: True if the Wire delimiting the Face lies on the bounds
        of the surface
        if this is not the case, the wire represents a contour that delimits
        the face [ think cookie cutter ]
        and implies that the surface is trimmed
        """
        _round = lambda x: round(x, 3)
        a = map(_round, breptools_UVBounds(self))

        self.adaptor = BRepAdaptor_Surface(self)
        b = map(_round, self.adaptor.Surface().Surface().GetObject().Bounds())
        if a != b:
            return True
        return False

    def on_trimmed(self, u, v):
        '''tests whether the surface at the u,v parameter has been trimmed
        '''
        if self._classify_uv is None:
            self._classify_uv = BRepTopAdaptor_FClass2d(self, 1e-9)
        uv = gp_Pnt2d(u, v)
        if self._classify_uv.Perform(uv) == TopAbs_IN:
            return True
        else:
            return False

Roi Berlin's picture

on_trimmed(self, u, v) should check whether the shape is trimmed in specific point
how can i check that the shape is trimmed is not trimmed in any point
I check with the maximum/minimum values of u and v but it is not accurate