MCPcopy
hub / github.com/CadQuery/cadquery / makePlane

Method makePlane

cadquery/occ_impl/shapes.py:3581–3600  ·  view source on GitHub ↗
(
        cls,
        length: float | None = None,
        width: float | None = None,
        basePnt: VectorLike = (0, 0, 0),
        dir: VectorLike = (0, 0, 1),
    )

Source from the content-addressed store, hash-verified

3579
3580 @classmethod
3581 def makePlane(
3582 cls,
3583 length: float | None = None,
3584 width: float | None = None,
3585 basePnt: VectorLike = (0, 0, 0),
3586 dir: VectorLike = (0, 0, 1),
3587 ) -> Face:
3588 basePnt = Vector(basePnt)
3589 dir = Vector(dir)
3590
3591 pln_geom = gp_Pln(basePnt.toPnt(), dir.toDir())
3592
3593 if length and width:
3594 pln_shape = BRepBuilderAPI_MakeFace(
3595 pln_geom, -width * 0.5, width * 0.5, -length * 0.5, length * 0.5
3596 ).Face()
3597 else:
3598 pln_shape = BRepBuilderAPI_MakeFace(pln_geom).Face()
3599
3600 return cls(pln_shape)
3601
3602 @overload
3603 @classmethod

Callers 11

rectMethod · 0.80
sectionMethod · 0.80
testFaceToPlnMethod · 0.80
testEachpointMethod · 0.80
test_distanceMethod · 0.80
test_toVtkMethod · 0.80
test_tessellateMethod · 0.80
test_constraint_getPlnFunction · 0.80

Calls 3

toPntMethod · 0.95
toDirMethod · 0.95
VectorClass · 0.85

Tested by 9

testFaceToPlnMethod · 0.64
testEachpointMethod · 0.64
test_distanceMethod · 0.64
test_toVtkMethod · 0.64
test_tessellateMethod · 0.64
test_constraint_getPlnFunction · 0.64