Skip to content

Commit 01db54b

Browse files
committed
Fix horizontal and vertical points constraints
1 parent 2420160 commit 01db54b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

model/horizontal.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def needs_wp(self):
3737

3838
def create_slvs_data(self, solvesys):
3939
wp = self.get_workplane()
40-
return solvesys.horizontal(self.entity1.py_data, wp)
40+
if self.entity2:
41+
return solvesys.vertical(self.entity1.py_data, wp, self.entity2.py_data)
42+
return solvesys.vertical(self.entity1.py_data, wp)
4143

4244
def placements(self):
4345
return (self.entity1,)

model/vertical.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def needs_wp(self):
3636

3737
def create_slvs_data(self, solvesys):
3838
wp = self.get_workplane()
39+
if self.entity2:
40+
return solvesys.vertical(self.entity1.py_data, wp, self.entity2.py_data)
3941
return solvesys.vertical(self.entity1.py_data, wp)
4042

4143
def placements(self):

0 commit comments

Comments
 (0)