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

Method _locs

cadquery/cq.py:4375–4391  ·  view source on GitHub ↗

Convert items on the stack into locations.

(self: T)

Source from the content-addressed store, hash-verified

4373 return self.newObject(rv)
4374
4375 def _locs(self: T) -> List[Location]:
4376 """
4377 Convert items on the stack into locations.
4378 """
4379
4380 plane = self.plane
4381 locs: List[Location] = []
4382
4383 for obj in self.objects:
4384 if isinstance(obj, (Vector, Shape)):
4385 locs.append(Location(plane, obj.Center()))
4386 elif isinstance(obj, Location):
4387 locs.append(obj)
4388 if not locs:
4389 locs.append(self.plane.location)
4390
4391 return locs
4392
4393 def sketch(self: T) -> Sketch:
4394 """

Callers 2

sketchMethod · 0.95
placeSketchMethod · 0.95

Calls 3

LocationClass · 0.85
appendMethod · 0.80
CenterMethod · 0.45

Tested by

no test coverage detected