Thanks I will study the code.
At a first glance it is interesting, and seems working, from your inages at least if I'm on mobile I can't test myself.
Regards
Carlo D.
Thanks I will study the code.
Code: Select all
for section in zip(faces1, faces2):
if (section[0].ShapeType == 'Shell' or section[0].ShapeType == 'Compound'):
# if we receive a Shell/Compound, it contains a single Face with multiple Wires where
# the first one represents the outer shape and subsequents represent holes in it
w = [section[0].Shells[0].Faces[0].Wires[0], section[1].Shells[0].Faces[0].Wires[0]]
l = Part.makeLoft(w, True)
for w in zip(section[0].Shells[0].Faces[0].Wires[1:], section[1].Shells[0].Faces[0].Wires[1:]):
subtractive = Part.makeLoft(w, True)
l = l.cut(subtractive)
elif (section[0].ShapeType == 'Face'):
# extract wires from Face
w = [section[0].SubShapes[0], section[1].SubShapes[0]]
l = Part.makeLoft(w, True)
Part.show(l, f"letter_{cnt}")
Hello, I'm trying to expand my scripting guide incorporating your code to show some concepts.
Code: Select all
c, fp, lp = quad.curveOnSurface(e)
mapped_edges.append(c.toShape(surf, fp, lp))
Code: Select all
c.toShape(surf, fp, lp)
Code: Select all
help(Part.Something.toShape)
onekk wrote: ↑Tue Aug 30, 2022 3:41 pm
I know that the result is the projection of the curve c on the surface using his fp and lp parameters.Code: Select all
c.toShape(surf, fp, lp)
But I can't get from what part of FC is derived from.
something like:
But what is the SomethingCode: Select all
help(Part.Something.toShape)
Regards
Carlo D.
Code: Select all
help(Part.Geom2d.Line2dSegment.toShape)
You are speaking around lines 579 584 about GeomCurve.edwilliams16 wrote: ↑Tue Aug 30, 2022 7:38 pm
but nothing about the fp, lp parameters.
You can see indication of that in the source in https://github.com/FreeCAD/FreeCAD/blob ... ometry.cpp
search on toShape. It appears to be a wrapper around OpenCascade.
I think it is the main purpose of the (App) Part module : implement a C++ and a python wrapper around OCCT.edwilliams16 wrote: ↑Tue Aug 30, 2022 7:38 pm but nothing about the fp, lp parameters.
You can see indication of that in the source in https://github.com/FreeCAD/FreeCAD/blob ... ometry.cpp
search on toShape. It appears to be a wrapper around OpenCascade.
Thanks I will study sources.Chris_G wrote: ↑Tue Aug 30, 2022 9:03 pm Here are the python class that implements toShape() with the parameters arguments :
https://github.com/FreeCAD/FreeCAD/blob ... p.cpp#L111
https://github.com/FreeCAD/FreeCAD/blob ... p.cpp#L185
They are abstract classes that are inherited by the python Geom/Geom2d curves.
This could be the description associated to the function?void Init (const Handle< Geom2d_Curve > &C, const Handle< Geom_Surface > &S, const Standard_Real p1, const Standard_Real p2)
END EDITtwo real values p1 and p2 which are the parameters for the vertices V1 and V2 on the curve. The curve may be defined as a 2d curve in the parametric space of a surface: a pcurve. The surface on which the edge is built is then kept at the level of the edge.