Scripting surfaces in SpaceClaim 2023 R2 getting slow
Hello,
I wrote a script for creating a geometry of beams and surfaces in space claim 2021 R1. Now I'm testing it in 2023 R2 and I am getting several problems:
-The script is 10x slower and it seems that the surfaces are the problem.
-sometimes lines are not solidified and are not converted into beams, it seems to happen randomly
Have anyone incurred in the same problems?
Comments
-
Can you provide snippets of how you create the surfaces and lines? There are multiple ways to do this so knowing what API calls you use would help a lot.
Also are you saying you get different speeds and results when running the exact same scripts multiple times?0 -
@Gabriel Messager do you have an idea here?
0 -
Hello Mike,
I really appreciate your help and excuse in advance for my inexperience
This is the snippet I use for creating surfaces:
yP1=a
yP2=b
yP3=c
xP1=d
xP2=e
xP3=f
point1 = Point2D.Create(MM(xP1),MM(yP1))
point2 = Point2D.Create(MM(xP2),MM(yP2))
point3 = Point2D.Create(MM(xP3),MM(yP3))
result = SketchRectangle.Create(point1, point2, point3)
I create a series of rectangles in this way in a for loop, moving the sketch plane in every iteration. Then:Solidify Sketch
mode = InteractionMode.Solid
result = ViewHelper.SetViewMode(mode)EndBlock
This operation works fine in SC 2021 R1, but it's very slow in 2023 R2.
For the second issue:
I create in for loop a line segmented in different "sublines" (number of "sublines"=cont), then I select them to be converted in beams, through this selection method:curves=all_curves[-cont:] #curves to be converted in beams
selection_curve = Selection.Create(curves)I think the problem could lie here:
curves=all_curves[-cont:]
This is still an hypothesis that I have to check, but it could be that in 2023 the order of curves is not coherent with the creation order and so I fail to select them correctly.0