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

Method segment

cadquery/sketch.py:814–827  ·  view source on GitHub ↗

Construct a segment.

(
        self: T,
        p1: Point,
        p2: Point,
        tag: Optional[str] = None,
        forConstruction: bool = False,
    )

Source from the content-addressed store, hash-verified

812
813 @multimethod
814 def segment(
815 self: T,
816 p1: Point,
817 p2: Point,
818 tag: Optional[str] = None,
819 forConstruction: bool = False,
820 ) -> T:
821 """
822 Construct a segment.
823 """
824
825 val = Edge.makeLine(Vector(p1), Vector(p2))
826
827 return self.edge(val, tag, forConstruction)
828
829 @segment.register
830 def segment(

Callers 15

closeMethod · 0.95
test_assembleFunction · 0.95
test_distributeFunction · 0.80
test_modifiersFunction · 0.80
test_deleteFunction · 0.80
test_edge_interfaceFunction · 0.80
test_bezierFunction · 0.80
test_locatedFunction · 0.80
test_constraint_solverFunction · 0.80
test_valFunction · 0.80
test_valsFunction · 0.80

Calls 4

edgeMethod · 0.95
_endPointMethod · 0.95
VectorClass · 0.85
makeLineMethod · 0.80

Tested by 14

test_assembleFunction · 0.76
test_distributeFunction · 0.64
test_modifiersFunction · 0.64
test_deleteFunction · 0.64
test_edge_interfaceFunction · 0.64
test_bezierFunction · 0.64
test_locatedFunction · 0.64
test_constraint_solverFunction · 0.64
test_valFunction · 0.64
test_valsFunction · 0.64
test_bool_opsFunction · 0.64