Skip to content

Commit

Permalink
WIP GH
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasvestartas committed Apr 28, 2024
1 parent afe921f commit 18e5498
Show file tree
Hide file tree
Showing 125 changed files with 8,725 additions and 3,160 deletions.
2 changes: 1 addition & 1 deletion docs/examples/binding_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# 6, 0.95, 40, // 40-49 tt_e_p (top-to-top edge plane)
# 300, 0.5, 58, // 50-59 ss_e_r (side-to-side edge rotated)
# 300, 1.0, 60 // 60-69 b (boundary)
print(wood_globals.joints_parameters_and_types)
print(wood_globals.joints_parameters_and_types)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def read(*names, **kwargs):

setup(
name="compas_wood",
version="2.0.9",
version="2.0.10",
description="timber joinery generation",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
12 changes: 7 additions & 5 deletions src/compas_wood/conversions_rhino.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def to_point(vectors, depth):
if depth == 1: # Single polyline
polyline = m.point1()
for rhino_point in vectors:
polyline.append(m.point([rhino_point.X, rhino_point.Y, rhino_point.Z]))
polyline.append(m.point(rhino_point.X, rhino_point.Y, rhino_point.Z))
return polyline
else: # Nested polyline
polyline = getattr(m, f"point{depth}")()
Expand Down Expand Up @@ -42,12 +42,15 @@ def from_point1(point1, type="Polyline"):
point = point1[i]
points.append(Point3d(point[0], point[1], point[2]))
if type == "Polyline":
return Polyline(points)
polyline = Polyline(len(points))
for point in points:
polyline.Add(point)
return polyline
elif type == "Box" and len(points) == 8:
mesh = Mesh()
for point in points:
mesh.Vertices.Add(point)

mesh.Faces.AddFace(3, 2, 1, 0)
mesh.Faces.AddFace(4, 5, 6, 7)
mesh.Faces.AddFace(0, 1, 5, 4)
Expand Down Expand Up @@ -77,7 +80,7 @@ def to_vector(vectors, depth):
if depth == 1: # Single vector_of_vectors
vector_of_vectors = m.vector1()
for rhino_vector in vectors:
vector_of_vectors.append(m.vector([rhino_vector.X, rhino_vector.Y, rhino_vector.Z]))
vector_of_vectors.append(m.vector(rhino_vector.X, rhino_vector.Y, rhino_vector.Z))
return vector_of_vectors
else: # Nested vector_of_vectors
vector = getattr(m, f"vector{depth}")()
Expand Down Expand Up @@ -120,4 +123,3 @@ def from_vector3(vector3):

def from_vector4(vector4):
return [from_vector3(v) for v in vector4]

Empty file.
2 changes: 2 additions & 0 deletions src/compas_wood/datasets/out.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><input_polylines><Polyline><point><x>1515.6900668678</x><y>147.230332996318</y><z>25.0814586697325</z></point><point><x>2667.35279287788</x><y>2592.61140256139</y><z>-5451.97668882373</z></point></Polyline><Polyline><point><x>-562.484288106731</x><y>-4265.4576112566</y><z>9908.42796781505</z></point><point><x>1515.6900668678</x><y>147.230332996318</y><z>25.0814586697325</z></point></Polyline><Polyline><point><x>1607.17582656903</x><y>341.486463594076</y><z>-410.004972656968</z></point><point><x>-16235.4272966571</x><y>3086.57299393509</y><z>-4847.0979756921</z></point></Polyline><Polyline><point><x>-1458.68078974524</x><y>470.740985115292</y><z>25.0814586697315</z></point><point><x>4490.06092348084</x><y>-176.280319122627</y><z>25.0814586697325</z></point></Polyline><Polyline><point><x>19260.0024556229</x><y>-3187.17984169966</y><z>175.081458669692</z></point><point><x>1484.14952005417</x><y>80.2587671379442</y><z>175.081458669714</z></point></Polyline><Polyline><point><x>1484.14952005417</x><y>80.2587671379442</y><z>175.081458669714</z></point><point><x>-15767.6787964333</x><y>682.527726337721</y><z>175.081458669712</z></point></Polyline></input_polylines>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><input_polylines><Polyline><point><x>-452.148466593946</x><y>-21.3987764690012</y><z>57.6622978372823</z></point><point><x>-452.148466593946</x><y>-421.398776469001</y><z>57.6622978372823</z></point><point><x>-52.1484665939465</x><y>-421.398776469001</y><z>57.6622978372823</z></point><point><x>-52.1484665939465</x><y>-21.3987764690012</y><z>57.6622978372823</z></point><point><x>-452.148466593946</x><y>-21.3987764690012</y><z>57.6622978372823</z></point></Polyline><Polyline><point><x>-452.148466593946</x><y>-21.3987764690012</y><z>17.6622978372823</z></point><point><x>-452.148466593946</x><y>-396.543122116365</y><z>17.6622978372823</z></point><point><x>-52.1484665939465</x><y>-396.543122116365</y><z>17.6622978372823</z></point><point><x>-52.1484665939465</x><y>-21.3987764690012</y><z>17.6622978372823</z></point><point><x>-452.148466593946</x><y>-21.3987764690012</y><z>17.6622978372823</z></point></Polyline><Polyline><point><x>-117.341563027841</x><y>-158.577638313968</y><z>199.711690554673</z></point><point><x>282.64407153809</x><y>-155.187632283011</y><z>199.711690554673</z></point><point><x>282.64407153809</x><y>-155.18763228301</y><z>-200.288309445327</z></point><point><x>-117.341563027841</x><y>-158.577638313967</y><z>-200.288309445327</z></point><point><x>-117.341563027841</x><y>-158.577638313968</y><z>199.711690554673</z></point></Polyline><Polyline><point><x>-117.002562424745</x><y>-198.57620177056</y><z>199.711690554673</z></point><point><x>282.983072141185</x><y>-195.186195739604</y><z>199.711690554673</z></point><point><x>282.983072141185</x><y>-195.186195739603</y><z>-200.288309445327</z></point><point><x>-117.002562424745</x><y>-198.57620177056</y><z>-200.288309445327</z></point><point><x>-117.002562424745</x><y>-198.57620177056</y><z>199.711690554673</z></point></Polyline><Polyline><point><x>117.8540159302</x><y>178.484846106431</y><z>318.686994195978</z></point><point><x>-169.196281371067</x><y>-100.086736829184</y><z>318.686994195978</z></point><point><x>-169.196281371067</x><y>-100.086736829184</y><z>-81.3130058040223</z></point><point><x>117.854015930201</x><y>178.48484610643</y><z>-81.3130058040223</z></point><point><x>117.8540159302</x><y>178.484846106431</y><z>318.686994195978</z></point></Polyline><Polyline><point><x>145.711174223761</x><y>149.779816376304</y><z>318.686994195978</z></point><point><x>-141.339123077506</x><y>-128.791766559311</y><z>318.686994195978</z></point><point><x>-141.339123077505</x><y>-128.791766559311</y><z>-81.3130058040223</z></point><point><x>145.711174223762</x><y>149.779816376304</y><z>-81.3130058040223</z></point><point><x>145.711174223761</x><y>149.779816376304</y><z>318.686994195978</z></point></Polyline><Polyline><point><x>-249.713212552835</x><y>327.007631675163</y><z>318.686994195978</z></point><point><x>-246.323206521878</x><y>-72.9780028907676</y><z>318.686994195978</z></point><point><x>-246.323206521877</x><y>-72.9780028907678</y><z>-81.3130058040223</z></point><point><x>-249.713212552834</x><y>327.007631675163</y><z>-81.3130058040223</z></point><point><x>-249.713212552835</x><y>327.007631675163</y><z>318.686994195978</z></point></Polyline><Polyline><point><x>-289.711776009428</x><y>326.668631072067</y><z>318.686994195978</z></point><point><x>-286.321769978471</x><y>-73.3170034938635</y><z>318.686994195978</z></point><point><x>-286.32176997847</x><y>-73.3170034938635</y><z>-81.3130058040223</z></point><point><x>-289.711776009427</x><y>326.668631072067</y><z>-81.3130058040223</z></point><point><x>-289.711776009428</x><y>326.668631072067</y><z>318.686994195978</z></point></Polyline><Polyline><point><x>-615.633079288316</x><y>197.521154432464</y><z>237.662297837282</z></point><point><x>-405.683256215518</x><y>-142.950682569806</y><z>237.662297837282</z></point><point><x>-405.683256215517</x><y>-142.950682569806</y><z>-162.337702162718</z></point><point><x>-615.633079288315</x><y>197.521154432465</y><z>-162.337702162718</z></point><point><x>-615.633079288316</x><y>197.521154432464</y><z>237.662297837282</z></point></Polyline><Polyline><point><x>-577.510866648786</x><y>211.907735891886</y><z>237.662297837282</z></point><point><x>-371.636072515291</x><y>-121.955700262527</y><z>237.662297837282</z></point><point><x>-371.63607251529</x><y>-121.955700262526</y><z>-162.337702162718</z></point><point><x>-577.510866648786</x><y>211.907735891887</y><z>-162.337702162718</z></point><point><x>-577.510866648786</x><y>211.907735891886</y><z>237.662297837282</z></point></Polyline><Polyline><point><x>-682.968706707116</x><y>591.812814603101</y><z>237.662297837282</z></point><point><x>-615.633079288316</x><y>197.521154432465</y><z>237.662297837282</z></point><point><x>-615.633079288315</x><y>197.521154432465</y><z>-162.337702162718</z></point><point><x>-682.968706707115</x><y>591.812814603101</y><z>-162.337702162718</z></point><point><x>-682.968706707116</x><y>591.812814603101</y><z>237.662297837282</z></point></Polyline><Polyline><point><x>-643.539540690052</x><y>598.546377344981</y><z>237.662297837282</z></point><point><x>-577.510866648786</x><y>211.907735891886</y><z>237.662297837282</z></point><point><x>-577.510866648785</x><y>211.907735891886</y><z>-162.337702162718</z></point><point><x>-643.539540690051</x><y>598.546377344981</y><z>-162.337702162718</z></point><point><x>-643.539540690052</x><y>598.546377344981</y><z>237.662297837282</z></point></Polyline><Polyline><point><x>-247.966713009169</x><y>120.93875691119</y><z>268.792387090861</z></point><point><x>-251.408215568314</x><y>527.000448958128</y><z>268.792387090861</z></point><point><x>261.379164580834</x><y>317.770637574238</y><z>268.792387090861</z></point><point><x>-22.0629042092089</x><y>42.7007055249501</y><z>268.792387090861</z></point><point><x>-247.966713009169</x><y>120.93875691119</y><z>268.792387090861</z></point></Polyline><Polyline><point><x>-247.966713009169</x><y>120.93875691119</y><z>228.792387090861</z></point><point><x>-251.408215568314</x><y>527.000448958128</y><z>228.792387090861</z></point><point><x>261.379164580834</x><y>317.770637574238</y><z>228.792387090861</z></point><point><x>-22.0629042092089</x><y>42.7007055249501</y><z>228.792387090861</z></point><point><x>-247.966713009169</x><y>120.93875691119</y><z>228.792387090861</z></point></Polyline><Polyline><point><x>282.64407153809</x><y>-155.187632283011</y><z>199.711690554673</z></point><point><x>682.62970610402</x><y>-151.797626252054</y><z>199.711690554673</z></point><point><x>682.62970610402</x><y>-151.797626252054</y><z>-200.288309445327</z></point><point><x>282.64407153809</x><y>-155.18763228301</y><z>-200.288309445327</z></point><point><x>282.64407153809</x><y>-155.187632283011</y><z>199.711690554673</z></point></Polyline><Polyline><point><x>282.983072141185</x><y>-195.186195739604</y><z>199.711690554673</z></point><point><x>682.968706707116</x><y>-191.796189708647</y><z>199.711690554673</z></point><point><x>682.968706707116</x><y>-191.796189708646</y><z>-200.288309445327</z></point><point><x>282.983072141185</x><y>-195.186195739603</y><z>-200.288309445327</z></point><point><x>282.983072141185</x><y>-195.186195739604</y><z>199.711690554673</z></point></Polyline><Polyline><point><x>-452.148466593946</x><y>-421.398776469001</y><z>57.6622978372823</z></point><point><x>-452.148466593946</x><y>-598.546377344982</y><z>-300.97223410838</z></point><point><x>-52.1484665939465</x><y>-598.546377344982</y><z>-300.97223410838</z></point><point><x>-52.1484665939465</x><y>-421.398776469001</y><z>57.6622978372823</z></point><point><x>-452.148466593946</x><y>-421.398776469001</y><z>57.6622978372823</z></point></Polyline><Polyline><point><x>-452.148466593946</x><y>-396.543122116365</y><z>17.6622978372823</z></point><point><x>-452.148466593946</x><y>-562.682924150416</y><z>-318.686994195978</z></point><point><x>-52.1484665939465</x><y>-562.682924150416</y><z>-318.686994195978</z></point><point><x>-52.1484665939465</x><y>-396.543122116365</y><z>17.6622978372823</z></point><point><x>-452.148466593946</x><y>-396.543122116365</y><z>17.6622978372823</z></point></Polyline></input_polylines>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><input_polylines><Polyline><point><x>-196.937021928024</x><y>-186.963938695109</y><z>305.937792623638</z></point><point><x>-167.572372383909</x><y>327.277017659626</y><z>-192.843678728816</z></point><point><x>31.5786551082401</x><y>332.904970346631</y><z>-175.316716716701</z></point><point><x>2.21400556412482</x><y>-181.335986008105</y><z>323.464754635753</z></point><point><x>-196.937021928024</x><y>-186.963938695109</y><z>305.937792623638</z></point></Polyline><Polyline><point><x>-180.451387020035</x><y>-326.22128264343</y><z>163.334791259222</z></point><point><x>-151.086737475918</x><y>188.019673711306</y><z>-335.446680093231</z></point><point><x>48.0642900162311</x><y>193.64762639831</y><z>-317.919718081117</z></point><point><x>18.699640472114</x><y>-320.593329956426</y><z>180.861753271337</z></point><point><x>-180.451387020035</x><y>-326.22128264343</y><z>163.334791259222</z></point></Polyline><Polyline><point><x>-6.46300374759085</x><y>-332.904970346631</y><z>-312.327098082633</z></point><point><x>-95.8776257493646</x><y>44.1192123778219</y><z>384.984080689766</z></point><point><x>102.80612401384</x><y>50.6030722704445</y><z>406.955133029738</z></point><point><x>192.220746015613</x><y>-326.421110454009</y><z>-290.356045742661</z></point><point><x>-6.46300374759085</x><y>-332.904970346631</y><z>-312.327098082633</z></point></Polyline><Polyline><point><x>-1.74672783517963</x><y>-156.770670042665</y><z>-406.955133029738</z></point><point><x>-91.1613498369534</x><y>220.253512681787</y><z>290.356045742661</z></point><point><x>107.522399926251</x><y>226.73737257441</y><z>312.327098082633</z></point><point><x>196.937021928024</x><y>-150.286810150043</y><z>-384.984080689766</z></point><point><x>-1.74672783517963</x><y>-156.770670042665</y><z>-406.955133029738</z></point></Polyline></input_polylines>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 18e5498

Please sign in to comment.