web analytics
VIOLENT  VOLUMES

IsLineParallelTo() and get2DLineLineInt()

Rhino.LineLineIntersection and Rhino.IsVectorParallelTo methods are problematic..

I spent quite an amount of time trying to find out where my offset script fails,

and then I realized Rhino.LineLineIntersection is not working as expected in many cases.

for example, it doesn’t make intersection where there is obviously one. or

it determines two lines are parallel with very big tolerence. (I think 1 degree)

Then I tried to write my own method returning intersection point of[……]

Read more


Rhinoscript Bug (SR6) – LineLineIntersection

Dim arrLineA, arrLineB, arrPoint

arrLineA = Array(Array(0,0,0), Array(3,0,0))

arrLineB = Array(Array(0,1,0), Array(3,0.99,0))

arrPoint = Rhino.LineLineIntersection(arrLineA, arrLineB)

If IsArray(arrPoint) Then

  Rhino.AddPoint arrPoint

Else
  Rhino.Print "no intersection"
End If

‘this should add point at (300,0,0), but arrPoint is NULL (no intersection)

sometimes my script doesn’t work with certain input, then I try to debug my script

looking for anything I[……]

Read more


Determining if the point lies inside a closed polyline

Option Explicit

Dim arrTestPt
Dim strPolyline

arrTestPt = Rhino.GetPoint ("pick a point")
strPolyline = Rhino.GetObject ("pick a  closed polyline", 4)

If Rhino.IsCurveClosed (strPolyline) Then
	If Rhino.IsPointOnCurve (strPolyline, arrTestPt) Then
		Rhino.Print "the point you just picked lies on the polyline"
	Else
		arrPolylineVertices = Rhino.PolylineVertices (strPolyline)
		If  (IsPointInPolyLine(arrTestPt, arrPolylineVertices) = 1) Then
			Rhino.Print "the point you just[......]

Read more


Polyline OffsetStructure

'---------------------------------------------------------------
'take closed polyline and returns polyline of each offset step
'---------------------------------------------------------------
Function OffsetCurveStructure(strCurve)

	Dim arrPolylineVertices
	arrPolylineVertices = Rhino.PolylineVertices(strCurve)

	Dim ActualVertNum
	ActualVertNum = UBound(arrPolylineVertices)

	Dim arrCenterPt

	'set of offset polylines at each step
	Dim arrOffsetStepPolylines
	Redim arrOffse[......]

Read more


Jacktable

Jacktable look up

Jacktable

The Jacktable , 2005

When the wings are folded, the table serves the gross area of 15068 cm²

and when both wings are unfolded, it serves 23388 cm² making 55% increasement

from original area.

the circumference increase from 5.07 M to 8.80M (73% increasement) when

the wings are unfolded which makes it possible for more people to sit around the table.

The glass surface makes the lower layers of frames and wings visible and

renders kinetic beauty as it transforms.


Rhinoscript test render

Random Voronoi Script Test 1

Random voronoi script test 02

 

This is one of the first few things you might want to try with rhinoscript

and it is being used everywhere now.

The redrawing of each cutting line takes time. When in actual application,

It can be turned off by adding ‘Rhino.EnableRedraw(False)‘ in the code and It will be

hundreds of times faster.

Download script : Voronoi cell generation Rhinoscript

And of course, if you don’t need control over string IDs of polylines or point coordinates and

generate simp[……]

Read more