NonManifoldTopology / Topologic

Topologic is a software modelling library enabling hierarchical and topological representations of architectural spaces, buildings and artefacts through non-manifold topology.
GNU Affero General Public License v3.0
74 stars 19 forks source link

Topologic.Face.ByEdges and Topologic.Face.ByWire shows an exception #4

Open c1032831 opened 6 years ago

c1032831 commented 6 years ago

Expected Behavior

When passing a list of edges to create a NURBS face, a face should be created. When passing a wire to create a NURBS face, a face should be created.

Current Behavior

Instead of the face being created, I get the following message:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. Traceback (most recent call last): File "", line 133, in EnvironmentError: System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. at TopologicCore.Face.ByWire(shared_ptr , shared_ptr ) at Topologic.Face..ctor(Wire pWire) in d:\nmt\topologic\topologicdynamo\src\face.cpp:line 321 at Topologic.Face.ByWire(Wire wire) in d:\nmt\topologic\topologicdynamo\src\face.cpp:line 112 at Topologic.Face.ByEdges(IEnumerable1 edges) in d:\nmt\topologic\topologicdynamo\src\face.cpp:line 117 at Microsoft.Scripting.Interpreter.FuncCallInstruction2.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at DSIronPython.IronPythonEvaluator.EvaluateIronPythonScript(String code, IList bindingNames, IList bindingValues)

facebyedges

Possible Solution

Steps to Reproduce (for bugs)

  1. p1 = Point.ByCoordinates(0,0,0) p2 = Point.ByCoordinates(10,0,0) p5 = Point.ByCoordinates(10,15,0) p6 = Point.ByCoordinates(0,15,-5) va = Topologic.Vertex.ByPoint(p1) vb = Topologic.Vertex.ByPoint(p2) va1 = Topologic.Vertex.ByPoint(p5) vb2 = Topologic.Vertex.ByPoint(p6)
  2. v1 = [va,vb] v2 = [vb,va1] v4 = [va1,vb2] v5 = [vb2,va]
  3. e1b = Topologic.Edge.ByVertices(v1) e1b1 = Topologic.Edge.ByVertices(v2) e3b3 = Topologic.Edge.ByVertices(v4) e3b4 = Topologic.Edge.ByVertices(v5)
  4. e4 = [e1b,e1b1,e3b3,e3b4]
  5. f2b = Topologic.Face.ByEdges(e4)

or

  1. w4b = Topologic.Wire.ByEdges(e4) f2b = Topologic.Face.ByWire(w4b)

Context

I am setting up the testing schema, so came across this exception.

Your Environment