Grasshopper

algorithmic modeling for Rhino

Can I make the line to be generated from the center?

Hi, 

I am new to Grasshopper and was wondering if line is created from the center

I only see regular line definition which requires A(start) and B(end) pts 

or SDL Line definitions.

 

Thank you!!!!

Views: 3239

Replies to This Discussion

I don't believe there is such a component, but you could come up with your own way of creating such a line, for example:

Of course, that's a lot of components, but you could make a cluster of them:



It is also possible to write your own VB, C# and Pyton code, to make up such a component.

But perhaps someone with a bit more knowledge of Grasshopper could give you a better answer.

Attachments:

Not really an error, bug or oversight. But are you trying to replicate the behaviour of the Rhino command Line Bothsides?

If so then you need to move your starting point in the equal and opposite direction to your finishing point. But the line starts at one end and finishes, A and finishes at the other, B. You cannot get any negative t with the start in the centre of a line.

 

I haven't checked what the most efficient ways is, but this is how my UserObject works:
(the scaling Factor is 2 of coarse...)
Attachments:

Hi Pieter,

Since you brought it up, it got me thinking, so I've pitted your Scale\Flip against my Reverse\Move method. It would appear that the most time consuming thing for GH to do is Flip the direction of the curve. Which made me wonder why Flip it at all? Don't you need the direction to still be A-->B?



Yes that's why I flipped it (My UserObject is called LMS, so Line from MidPt to StartPt.)
But can you explain how 68% of three times 0ms relates to 32% of four times 0ms?
So are the %'s directly comparable?
I guess I've answered my own question.
Btw, these are my results (How come the differences between them are smaller now?)

We're talking about amounts of time that don't even display in milliseconds so its insignificant in the bigger picture. But because the two methods are acting along side each other and I Recomputed several times after building I think they are meant to be comparable.

Yes, they are comparable since they show the percentage of total time taken (for the whole definition) to calculate. So your solution still is the most efficient.
Maybe I'll just make a LME UserObject...;)

I find the lack of this concept really intriguing.
I'm sure it has to do with "deep coding", but Acad has "infinite" lines which you generate from a point and a direction and GH has mathematical intersections... so I guess it should be possible without such "cheating" as reversing, flipping, or the like, right?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service