gumyr / build123d

A python CAD programming library
Apache License 2.0
382 stars 72 forks source link

Add Face.location_at #640

Open gumyr opened 3 weeks ago

gumyr commented 3 weeks ago

Add the following to the Face class:

    def location_at(self, u: float, v: float, x_dir: VectorLike = None) -> Location:
        """Location at the u/v position of face"""
        origin = self.position_at(u, v)
        if x_dir is None:
            pln = Plane(origin, z_dir=self.normal_at(origin))
        else:
            pln = Plane(origin, x_dir=Vector(x_dir), z_dir=self.normal_at(origin))
        return Location(pln)

Just need to create some tests.