nt,arrEndPoint,strLine Dim arrObjects,strIntersectLine,arrEndPt,arrIntersectLine,dblY 'Select the curve to evaluate. strObject=Rhino.GetObject("Select the curve.",4) If IsNull(strObject) Then Exit Sub 'Enter the X value. dblX=Rhino.GetReal("Enter the X to evaluate.") If IsNull(dblX) Then Exit Sub 'Define a line in the Y direction from the given X value. arrStartPoint=Array(dblX,0,0) arrEndPoint=Array(dblX,1,0) 'Hide the display of operations. Call Rhino.EnableRedraw(False) 'Draw a line in the positive Y direction. strLine=Rhino.AddLine(arrStartPoint,arrEndPoint) 'Test to see if the line intersets the curve. If so print the Y value. Dim arrTest,arrPoint arrTest=Rhino.CurveCurveIntersection(strObject,strLine) If Not IsNull(arrTest) Then arrPoint=arrTest(0,1) Call Rhino.Print(arrPoint(1)) 'If no intersection then extend the line to intersect the curve and print the Y value. Else arrObjects=Array(strObject) strIntersectLine=Rhino.ExtendCurve(strLine,0,1, arrObjects) arrEndPt=Rhino.CurveEndPoint(strIntersectLine) dblY=arrEndPt(1) Call Rhino.Print (dblY) End If 'Delete the line drawn. Call Rhino.DeleteObject(strLine) 'Enable the display. Call Rhino.EnableRedraw(True) End Sub…
ineas = [] # construct a new, empty list for L (lines)D = []for i in range(len(M) - 1): for j in range(i + 1, len(M)): #if rs.PointCoordinates(M[i]) == rs.PointCoordinates(M[j]): # continue line = rs.AddLine(M[i], M[j]) #if so, add the line D.append(rs.CurveLength(line)) #also, compute the length Lineas.append(line)
…
well. I believe (and I'm not totally sure) that the issue may be because of the 'end of line' marker. You see, the Generic Serial Read component uses a carriage return ('\r') and new line feed ('\n') to determine the end of the line of data being sent over the serial port. When it detects these symbols, it outputs all of the data that has been stored in the buffer, and then starts to wait for the next line to come over the port. I'm wondering if the code running on the rs232 device can be configured to send these characters to indicate the end of each line.
From the image you posted, it looks like the Tag Heuer device is using a 1200/8-N-1 configuration for the serial communication. Here's a link for more information: http://en.wikipedia.org/wiki/8-N-1. I'm not sure what the stop bit the device is using, but perhaps this is what could be causing the conflict. I'm sorry I don't have more answers on exactly how to trouble shoot this problem.
Out of curiosity... Is there a reason you're using this device? Is it much cheaper than an Arduino? It sounds like you've only got 2 photocells connected in your circuit. These cost less than a dollar, and an Arduino will cost you around $30. And the photocell circuit is very easy to setup using an Arduino/Firefly. Just curious why you want to use this device. I definitely want to get this rs232 thing figured out... but just wondering if there is an easier way.
HTH,
Andy…
he grid whose vertices will be considered. If you want the final coordinates to be whole numbers, use Step=1, if you want them to be multiples of 2, use size=2, etc.
Domain (D) = the extent in X that will be searched. The start of the domain represents the first search attempt.
The algorithm works as follows:
Starting at the left extreme of the search domain, a vertical line is intersected with the provided line, yielding intersection point X1.
The y coordinate of X1 is lowered until it is some multiple of S.
Another point X2 is made exactly S above X1.
From X1 and X2, the point closest to the line is selected.
If this point is closer than any existing best answer, it becomes the new best answer.
The search moves S units to the right.
Repeat until the end of the search domain is reached.
This search only looks at two potential candidates per vertical ray, so it should run in O(N), not O(N^2).
…
probably best if u take a moment to look at the jpeg that i have attached.i basically have a polyline consisting of a given number of segments ( which vary), the points of which are extracted and then (apart from the first one) moved down so that the a line of fixed length can be built through them. the original polyline sits on the ground plane, as i have said the segments vary in lengh, this information is exrtracted using the 'length component' .... basically for each segment you make a calculation using pythagoras' theorem to work out the length of short edge('c')of the right angled triangle, as you have the hypotenuse ( which is the fixed length) and you have the length of the original line ( 'b'), ie, the amount the point has to drop in the z-axis , but clearly each successicve vlaue needs to added together. so what i would really appreciate is if some could give me some scripting asssitance ! as i feel that i need a way of adding the successive values of 'c' together and then adding them to the new 'c' value. i woudl count myself as a very proficient in general grasshopper but my scripting is nt up to much ! so any help would be really appreciated !thanks in advance louis…
Studio serves as a firm-wide resource to LMN, our collaborators, business partners, and clients we will also be sharing with the design community our successes, research, and hopefully not too often, our failures.
Our blog at lmnts.lmnarchitects.com is just beginning but stop by to see what we're working on in Grasshopper, download definitions, and check out our latest endeavors.
…
s with Rhino & Grasshopper and Cinema 4d(rendering).
I found this two good laptops!
Hp Elitebook Windows® 7 Professional autentico 64Processor Intel® Core™ i7-720QM (1,60 GHz, 6 MB L3 di cache)8 GB di SDRAM DDR3 a 1333 MHzSATA II da 500 GB a 7200 rpmScheda grafica NVIDIA Quadro FX 2800M con 1 GB di memoria video dedicata GDDR3
Price 2.200 Euro
SONY VPCF12S1EWindows® 7 Professional autentico 64Processore Intel® Core™ i7-740QM8 GB di SDRAM DDR3 a 1333 MHzSerial ATA da 500 GB a 7200 rpmScheda grafica NVIDIA® GeForce® GT 330M con 1 GB di memoria video dedicata GDDR3Price 1.400 Euro
Looking at the price, I would buy the second one…but I would ask you one thing....Considering that using Grasshopper I will create really complex works, using a GeForce instead a Quadro processor could it be a problem??…
iginal from the old forum.
For some reason, I'm getting an error message that the points can't be added to the object list, i didn't have any problem with other types of objects. To fix this, you have to substitute line 65 with this one:
Dim tree As New DataTree(Of on3dpoint)
Btw, as Marc pointed out, this will only work if you are going to output 10 lists or less.…
ts the "0th" points of every path. How would i connect, say, 1 st pt on the 1st curve w/ 2nd pt on the 2nd curve; 3rd pt of 2nd curve w/ 4th pt on 3rd curve ... so on. i'm trying to create the connecting line separately, rather than 1 continuous line.
thx…