I am currently working on a GH script which at first used Rhino geometry and now SW, working with new type of files is giving me issues I didn’t have before so I am sorry in advance if the question seems kinda stupid but I am still learning.
What I am trying to accomplish is:
-Extract the central axis of my geometry
-Divide the central axis (curve) with either a preset distance or length
-Create planes for each point and extract data from them for the rest of my program
As can be seen on the picture here, my problem is that the divide curve doesnt start at the begining of the curve, or a least not the way I want to (which is on the cplane).
I have tried to create a point at the beginning but on the next step, which is plane generation, it does generate many many planes at this point. I had this by simply connecting the output of my DivideCrv + the point into the PlaneNrml function.
Second issue, as can be seen in the panel, one would expect the very last (or first) point in the panel to be at plane height (z=0), but here in never really reaches the zero mark to begin with and then goes past that.
What am I missing on this one? I would expect the last points to be at 0 as my curve and BREP are both resting on the CPlane.
As always thanks to those who take time to reply, this forum is actually incredibly helpful. PIPEQUESTION.gh (54.1 KB)
Where does it start then? Thanks
I am asking because this might be the reason why my Z values in the panel end up being -30 something mm instead of zero.
@kev.r thanks a lot for the answer, I was trying to reverse it from the input I didn’t know there was a specific function for that.
Sorry for being incredibly clueless, but I am not sure what you mean by the CPlane that I established.
When importing the pat from SW to Rhino the orientation was correct but the part bottom plane was sligthly lower than Rhino’s plane. So I did move the cplane to surface using the CAD file’s bottom face thinking this would fix my issue. Which it did visually but not on my point list.
The lower point in the “CENTRAL AXIS” curve in your file is located at world coordinates {159.58664, 0, -33.132127}.
Moving the CPlane in Rhino has no effect on geometry. A Rhino CPlane is simply a construction aid, it has no fixed relationship to the world coordinate system.
The correct way to fix this is to move your imported part.
Select the part.
Run the _Move command.
At the Point to move from: prompt, select the center of the bottom surface (use the center Osnap).
At the Point to move to: prompt, enter 0 to move to world origin.