Divide curve origin unclear

Hi,

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 :white_check_mark:
-Divide the central axis (curve) with either a preset distance or length :x:
-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)

You didn’t share your GH file - if you do, make sure you internalize objects.

1 Like

Sorry I just uploaded it into the initial post.

Thanks

1 Like

You can flip the curve before connecting it to the Divide Distance component.

PIPEQUESTION_re.gh (62.5 KB)

-Kevin

2 Likes

Kevin has shown you what to do (flip curve component).

Other than that, your curve does not start ‘on the CPlane’ - or at least not when I open the file, but that’s not an issue.

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.

Definitely more work ahead for me :smile:

1 Like

Well, in your screenshot it does appear (start of curve) to be at the CPlane orgin, but that CPlane might have been one you established? Not sure.

Possibly.

Either change that CPlane or ‘cheat’ it this way:
PIPEQUESTION.gh (59.0 KB)

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.

Thanks

1 Like

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.

-Kevin

2 Likes


PIPEQUESTION_RevA.gh (57.9 KB)

1 Like