How to deconstruct a LOFT surface in GhPython? [SOLVED]

Hi all,

I’m trying to create a lofted surface between two curves, and then be able to select each surface separately (Using List Item). However, the Loft output from the python component (weirdly)seems to be composed of a single surface.

The exact same procedure, when done using traditional gh component seems to work. Can someone guide me on how to solve this? Maybe I’m missing something?

01.09.2020 - GhLoft

I’ve already referred here, and here.

On a side note: I got the same(or similar) output when I created a RuledSurface using the same curves. Once I bake them, and import them back into Gh, it works like the usual component.

Updated File: 01.09.2020 - GhLoft.gh (9.3 KB)
.
.
.
.
Thanks in advance!

Kaushik LS

Can you internalize your inputs in your .gh file, or post the referenced 3dm file? When I try with 3 simple curves I get a single surface on both outputs.

Sorry, I thought I had internalized them already. I’ve updated the files.

I guess you’re looking for SplitKinkyFaces():

import Rhino.Geometry as rg
brep = rg.Brep.CreateFromLoft(crvs, rg.Point3d.Unset, rg.Point3d.Unset, rg.LoftType.Normal, False)[0]
brep.Faces.SplitKinkyFaces()
a = brep

Loft.gh (5.8 KB)

1 Like

Thank you! It works. Where can I find documentation on Rhino.Geometry for GhPython?

edit: Found it. Thanks!

hi @Mahdiyar Here I did 2 other examples of Loft type and have no problem
BUT order from BrepTrim StarTtrim,
BrepTrim ENDTRIM,,
Do not understand this type of API for Loft?
Show this with an example? please and Thank you{If it’s possible for you}


Loft.gh (18.5 KB)

public static Brep[] CreateFromLoft(
	IEnumerable<Curve> curves,
	Point3d start,
	Point3d end,
	bool StartTangent,
	bool EndTangent,
	BrepTrim StartTrim,
	BrepTrim EndTrim,
	LoftType loftType,
	bool closed
)