Skip to content

Commit

Permalink
Merge afdc4db into 44ae035
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzncode authored Jul 6, 2023
2 parents 44ae035 + afdc4db commit 1f4ee77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cadquery/occ_impl/assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def toJSON(

val: Any = {}

data = toString(Compound.makeCompound(assy.shapes), tolerance)
data = toString(shape, tolerance)
trans, rot = loc.toTuple()

val["shape"] = data
Expand Down
6 changes: 2 additions & 4 deletions doc/assy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -783,14 +783,12 @@ Where:
.add(b1, loc=cq.Location((-2, 0, 0)), name="b3", color=cq.Color("red"))
)

pnt = (0.5, 0.5, 0.5)

# fix the position of b1
assy.constrain("b1", "Fixed")
# fix b2 center at point
assy.constrain("b2", "FixedPoint", pnt)
assy.constrain("b2", "FixedPoint", (0.5, 0.5, 0.5))
# fix b3 vertex position at point
assy.constrain("b3@vertices@<X and <Y and <Z", "FixedPoint", pnt)
assy.constrain("b3@vertices@<X and <Y and <Z", "FixedPoint", (0.5, 0.5, 0.5))

assy.solve()
show_object(assy)
Expand Down

0 comments on commit 1f4ee77

Please sign in to comment.