Skip to content

Commit

Permalink
Fix horizontal and vertical points constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
vespakoen committed Jan 15, 2023
1 parent 2420160 commit 01db54b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion model/horizontal.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def needs_wp(self):

def create_slvs_data(self, solvesys):
wp = self.get_workplane()
return solvesys.horizontal(self.entity1.py_data, wp)
if self.entity2:
return solvesys.vertical(self.entity1.py_data, wp, self.entity2.py_data)
return solvesys.vertical(self.entity1.py_data, wp)

def placements(self):
return (self.entity1,)
Expand Down
2 changes: 2 additions & 0 deletions model/vertical.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def needs_wp(self):

def create_slvs_data(self, solvesys):
wp = self.get_workplane()
if self.entity2:
return solvesys.vertical(self.entity1.py_data, wp, self.entity2.py_data)
return solvesys.vertical(self.entity1.py_data, wp)

def placements(self):
Expand Down

0 comments on commit 01db54b

Please sign in to comment.