Hi guys, I’m trying to sweep 1 the red edge curves of the column along the blue curve. The problem is that because the red curves aren’t perpendicular to the start point of the blue curve the result I’m getting is not quite what I’d like. Is there any way to get sweep 1 to create the shape that would be created if the red curves were perpendicular to the start point tangent of the blue rail curve or will I have to rotate the cross sectional curves into the column? PS there are quite a lot of these in the model I’m working on so if there is any way to do this it’d save tonnes of time, thank you
Hello -
@danjarvis8 - try this quick script -
SweepPerp.py (1.4 KB)
It assumes the path and shape curves intersect at the end of the path curve…
To use the Python script use RunPythonScript
, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"
@danjarvis8 - This might be more what you need - I’m not sure it gets the direction right in all cases but give it a try - fewer clicks and better (I think) result…
SweepPerp2.py (2.1 KB)
-Pascal
Thanks Pascal, little bit of trimming but that’s really useful
Hi Pascal, (or anyone else?)
do you have also a script which let’s Profiles rotate while sweeping along the Path Curve, so that the Profile is always perpendicular to the surface it’s placed on?
As a Ship`s Hull is changing it’s Shape, the Profiles need to be rectangular to the hull surface in any Point.
I tried both Scripts above, the Profile stays in the Angle where it started.
Thanks !!
Hi Andre - try: Fin
the path curve on the surface and then use the edge of the fin surface as the path - with Sweep1
set to ‘Align to surface’
Any luck?
-Pascal
Hi Pascal,
thanks for ultra fast reply. As I’m just an ordinary Rhino User, could you explain a little the Expressions you used? I assume there’s something to change in the Script?
Hi Andre - select the path curve (assuming it lies on the hull surface) and start Fin. Pull the fin out a short distance. Then, swseep1, selecting the edge of the fin and not the original curve as the rail. In the Sweep1 dialog, set the option for ‘Align to surface’.
The trickery here is that the Fin is a sort of ‘dummy’ surface used to keep the profile curve oriented. You could make a trimmed version of the hull surface as well - it would accomplish the same thing - the tool needs a surface edge as thwe rail in order to keep things oriented correctly relative to the surface. (IMHO a trimmed edge should not be needed, just a curve on a surface, but that is how it is for now)
Delete the fin when done
FinTrick.3dm (78.4 KB)
-Pascal
Hi Pascal,
that worked fine, thanks. The process is a little bit long though.
Need to check some grasshopper options/apps.