Lofting between two paths where one path contains bRepEdges and Surface body loft edges

Lofting between two paths where one path contains bRepEdges and Surface body loft edges

emanster.nz
Participant Participant
608 Views
5 Replies
Message 1 of 6

Lofting between two paths where one path contains bRepEdges and Surface body loft edges

emanster.nz
Participant
Participant

I've created the attached script that has the user select a group of edges that form a closed path, then projects those edges to the XY Plane, offsets them and then lofts between the path of lines and the offset. This script works perfectly when the original path contains only bRepEdges, such as in the first two pictures. However my primary use case requires some of the reference bodies inward facing edges to be pre-lofted, and when the edges of these lofts are included in the path I get the following error: "5: The loft could not be created. Try changing the inputs, swapping profiles for rails or a centerline, or adjusting the continuity conditions. Cannot create tool body for loft." I'm not sure where to go from what I currently have to get this loft generation to be completely automated. Is there a way to format my path to work or do I need to use another method to do this?

 

BladePreLoft.PNGBladePostLoft.PNGBracketPreLoft.PNGBracketPostLoft.PNG

0 Likes
609 Views
5 Replies
Replies (5)
Message 2 of 6

kandennti
Mentor
Mentor

Hi @emanster.nz .

 

I don't know what it means, but I ran the script and selected the edge of the red arrow.

1.png

 

Sure enough, I got the same exception. It occurs at the offset part.
For this edge, even if I offset it in the GUI, I get a warning and cannot offset it.
Could this be the cause?

 

 

0 Likes
Message 3 of 6

tykapl.breuil
Advocate
Advocate

I've tested it a bit and I found the same result. What seems to be the problem is doing bot the front and the back of piece in the same command. The problem clearly isn't in the code as it also happens when doing it by hand. Maybe you can try and see if you get an acceptable result breaking the loft up into several pieces, then sewing them together ?

0 Likes
Message 4 of 6

emanster.nz
Participant
Participant

Hi @kandennti 

 

That was the first issue I ran into when developing the script, I managed to find a workaround for the offset failing by lofting the edges highlighted in red below to create the loft edges highlighted in green before running the script. This fixes any issues with the offsetting and creates the full offset in the second picture. The problem I am now having is that my path that makes up one of the loft inputs (The other being the now offset sketch around the entire model) contains the lines in Blue and the lines in Green, which Fusion does not seem to recognize as one contiguous path for creating my lofts to the offset sketch. These lofts can be created one line at a time manually but I am trying to automate the process to save time.  PreLofting.PNG

BracketPostLoft.PNG

Attached are a series of videos showing: 1.Offset without pre-lofting 2. Making the pre-lofts 3. Creating the offset with the pre-lofts in place 4. Creating the final lofts to the offset manually 5. An example of what the script should do.

0 Likes
Message 5 of 6

emanster.nz
Participant
Participant

Hi @tykapl.breuil 

 

That is the process I am currently using. I have written a script that auto stitches all my lofts together, but even with that, manual lofting can take a very long time due to having to create a new loft from edge to offset every time I change between lofting from a surface body edge -> offset, to lofting from a solid body edge -> offset. On some of the larger and more complex models I'm using automating this process can shave upwards of 5 minutes off my workflow.

0 Likes
Message 6 of 6

kandennti
Mentor
Mentor

@emanster.nz .

 

Thanks for the video. I understand now.

I feel like this is complicated and quite difficult.
As a test, I tried to create a loft in the GUI using the offset line created by the script.

I had to be very careful about the order in which I added the profile edges as well, and I had to specify the rails to create the ideal surface, but I think I can manage to create the loft in one go.
(If you remove the rails in the attached file, you get a less than ideal surface.)

1.png

 

It seems that I need to do more detailed processing than simply adding lofts with two Path Objects, but I don't have a good idea.

0 Likes