You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code crashes both on Windows and Linux (with this CPACS file, though it would likely cras with any other CPACS file that has wing guide curves defined):
importosfromOCC.Extend.TopologyUtilsimportTopologyExplorerfromOCC.Core.TopoDSimporttopodsfromOCC.Core.BRepimportBRep_Tool_CurvefromOCC.Core.GeomConvertimportgeomconvert_CurveToBSplineCurvefromtixi3importtixi3wrapperfromtigl3importtigl3wrapper, surface_factories, configurationfromtigl3.geometryimportCWireToCurvefromtigl3.occ_helpers.topologyimportiter_edgestixi_h=tixi3wrapper.Tixi3()
tigl_h=tigl3wrapper.Tigl3()
dir_path=os.path.dirname(os.path.realpath(__file__))
tixi_h.open(dir_path+"/D150_8_guides_8_profiles.xml")
tigl_h.open(tixi_h, "")
# get the configuration managermgr=configuration.CCPACSConfigurationManager_get_instance()
# get the CPACS configuration, defined by the tigl handle# we need to access the underlying tigl handle (that is used in the C/C++ API)config=mgr.get_configuration(tigl_h._handle.value)
# get the wingwing=config.get_wing(1)
Nsegments=wing.get_segment_count()
# get profile wiresprofileWire_list= []
foriinrange(1, Nsegments+1):
segment=wing.get_segment(i)
profileWire_list.append(segment.get_inner_wire())
profileWire_list.append(wing.get_segment(Nsegments).get_outer_wire())
prof_splines_1= []
forwinprofileWire_list:
e=list(iter_edges(w))
curve, _, _=BRep_Tool_Curve(e[0])
curve=geomconvert_CurveToBSplineCurve(curve)
prof_splines_1.append(curve)
# Get Guide Curve wiresguideCurve_list= []
guideCurveWire_list= []
guide_curves=wing.get_guide_curve_wires()
t=TopologyExplorer(guide_curves)
foriwireint.wires():
guideCurve_list.append(CWireToCurve(topods.Wire(iwire)).curve())
guideCurveWire_list.append(iwire)
# interpolate profiles and guideswing_loft=surface_factories.interpolate_curve_network(prof_splines_1, guideCurve_list, 1e-4)
Output:
Traceback (most recent call last):
File "C:/data/sandbox/tigl_playground/debug.py", line 57, in <module>
wing_loft = surface_factories.interpolate_curve_network(prof_splines_1, guideCurve_list, 1e-4)
File "C:\ProgramData\Miniforge3\envs\tigl3\lib\site-packages\tigl3\surface_factories.py", line 46, in interpolate_curve_network
interpolator = CTiglInterpolateCurveNetwork(profiles, guides, tolerance)
File "C:\ProgramData\Miniforge3\envs\tigl3\lib\site-packages\tigl3\geometry.py", line 2972, in __init__
_geometry.CTiglInterpolateCurveNetwork_swiginit(self, _geometry.new_CTiglInterpolateCurveNetwork(profiles, guides, spatialTolerance))
TypeError: in method 'new_CTiglInterpolateCurveNetwork', argument 1 of type 'std::vector< opencascade::handle< Geom_Curve >,std::allocator< opencascade::handle< Geom_Curve > > > const &'
The text was updated successfully, but these errors were encountered:
The following code crashes both on Windows and Linux (with this CPACS file, though it would likely cras with any other CPACS file that has wing guide curves defined):
Output:
The text was updated successfully, but these errors were encountered: