TAGGED: Moderator SpaceClaim, scripting
-
-
January 22, 2024 at 1:03 am
Kurian Kuriakose
SubscriberAs shown in the picture below. i am unable to reference to the curve of the airfoil to create an offset. I have tried smart variable, index and ray referencing. i have also tried to make it so that the edge is a Names selection, but i do not know the syntax on how to make a named selection as a selection.
If there is any way to resolve this it would be highly appreciated.
-
January 22, 2024 at 9:16 am
Atharv Joshi
Forum ModeratorHi Kurian,Â
Do you want to translate the curve or want to create offset?
Thanks and Regards
Atharv -
January 22, 2024 at 9:40 am
Atharv Joshi
Forum ModeratorIf you are looking to create an offset curve please try below code. Once you have created surface, we enter the sketch mode and create an offset curve. Curve selection is done using GetRootPart().Curves[0].Â
#Start Constraint Based Sketchingresult= SketchHelper.StartConstraintSketching()Â# Set Sketch Planeselection = FaceSelection.Create(GetRootPart().Bodies[0].Faces[0])result = ViewHelper.SetSketchPlane(selection)# EndBlockÂCurveToOffSet = Selection.Create(GetRootPart().Curves[0])offsetDistance = MM(-2)result= SketchOffsetCurve.Create(CurveToOffSet,offsetDistance)Â# Solidify Sketchmode = InteractionMode.Solidresult = ViewHelper.SetViewMode(mode)# EndBlockÂRegardsAtharv -
January 29, 2024 at 5:28 pm
Kurian Kuriakose
SubscriberThanks a lot !!Â
P. S: you must use it on a curve, not a surface(i lost too much time on this). -
January 30, 2024 at 6:59 am
Atharv Joshi
Forum ModeratorThanks for the confirmation, Kurian!
-
- The topic ‘Problem with Offset while scripting in Spaceclaim’ is closed to new replies.
-
3044
-
971
-
863
-
858
-
792
© 2025 Copyright ANSYS, Inc. All rights reserved.