# Distance Component Error: "Data conversion failed from Number to Point"

Hello Grasshoppers,

Please help; I used 2 Distance Components as inputs for a Planar_Surface component, but both provide me with the error “Data conversion failed from Number to Point”. My Points A & B received inputs from Point Deconstruction outputs. I have attached my definition along with a screenshot that contains a model of what it should look like if baked. Please let me know if you find a solution to my error.

Thank You,
Goosedeconstruct_post.gh (19.2 KB)

Again, the solution is really obvious, stated plainly in the error message (and the thread title!). The Distance component wants points, not coordinates,

I don’t know if I connected them correctly…? Is this what you expected?

Or maybe you want to replace the Distance components with A-B (Subtraction)?

Thanks, I actually tried just reconstructing the points from the coordinates and then adding a -X expression to the distance components and it worked. Do you think there is a cleaner/more efficient way to make this surface dependent on a point within an edge of the previous Brep?

Absolutely yes! What you are doing in that screen shot makes me shudder. I would use plane intersection again. But ultimately, it’s your project and you need to write GH code in ways that make sense to you.

deconstruct_post_2018Feb21a.gh (21.5 KB)

Thanks Joseph, your definition is very concise, but not exactly what I want to do right now, although it will be very helpful if I find that I’d rather create a surface that way. I know you likely an expert., or at least very creative in programming, but I don’t see the purpose in saying that my code makes you shudder. This is my first project, and since you clearly know how to solve these types of problems very well, maybe you can suggest some specific resources that may help prepare me understand these problems the way you do. I think that would definitely help me move this project a lot faster. Thanks again!

There is no reason I can see that shelf height must be defined by a point on the box edge. Sounds like I’m not the best teacher for you. Have fun and good luck.

deconstruct_post_2018Feb21b.gh (31.9 KB)

Obvious is a personal construct. If it was obvious to the person asking the question they would not have asked it.

4 Likes

Hi Joseph,

The reason I chose a point from an edge to define the height is because that part of the edge is a) where the material’s surface will start from and b) I can change the U value of the point along that curve so I can easily adjust the height. The last definition you posted does have a solution for the height I prefer though, so I will likely incorporate that in my new definition. However, I may need to keep my boring rectangular surface for a variety of other reasons, and that’s what I was referring to when I wrote that wasn’t looking to create a trapezoid as you had. Also, I am not requesting that you become my teacher, I just wanted to know if you recommend any specific resources that can help me troubleshoot these problems on my own.

Thanks!!!

Using an arbitrary Point On Curve to set the height of the shelf instead of a direct measurement of its ‘Z’ value doesn’t make sense to me. The shelf doesn’t need to be a trapezoid but I can’t touch this anymore, sorry.

As to what is obvious or not… That error message was pretty unambiguous to me, and if it wasn’t, I would RTFM before posting a question to the forum.

a term showing the frustration of being bothered with questions so trivial that the asker could have quickly figured out the answer on their own with minimal effort, usually by reading readily-available documents. People who say “RTFM!” might be considered rude, but the true rude ones are the annoying people who take absolutely no self-responibility and expect to have all the answers handed to them personally.

I realize this attitude is considered impolite and disruptive by some (especially in Europe?), but short of ignoring a thread completely, there has to be a more constructive way to respond to questions like this besides patient repetition and hand-holding?

@Joseph_Oster, this is the very first time I have asked this, so there is no repetition thus far. I did RTFM, or least looked at enough reference material, as well as searched this on the forum. But I must have missed something, so I am sorry to have wasted your time. I wasn’t offended by your attitude, I just didn’t think it was productive because I was already open to learning and improving my programming style. Can we just move passed this issue and get back to the learning and problem-solving process? If you are unwilling, I understand and respect that as well, and no offense taken.

My opinion, on the other hand, is that people really should ask on this forum, and be met politely and respectfully, by adults, whether they have read the “manual” or not.

This has already gone to far.

Joseph, once you said that you didn’t want to risk “coming out as mean and rude”, but let me tell you something.

You come out as extremely mean and rude. And arrogant. Cut. It. Out.

// Rolf

1 Like

Honestly @RIL, I think you are overestimating the significance of your opinion (to me, at least).

I quite like Joseph’s frankness… it’s a bit like asking Basil Fawlty if the restaurant serves food. Fortunately his knowledge and helpfulness keeps the forum zen in perfect harmony due to it being equal and opposite to his tact and empathy for beginners asking beginner questions.

@cartemarino: you’re doing ok for your first definition! The takeaway from this question is about data types. If you hover your mouse over any input or output, a pop up will explain what type of input is expected or what will be output. If there is data there it will even show you what that data is. You can also use the data viewer to see exactly what is in each input and output of a component.

FYI, this is @cartermarino’s earlier thread for this project:

I tried.

All I see is improvement!

1 Like