Generator Class¶
-
class
NXOpen.ShipDesign.Generator¶ Bases:
objectRepresents Generator which wrap the ship api for china
To obtain an instance of this class, refer to
NXOpen.ShipDesign.ShipSessionNew in version NX11.0.0.
Methods¶
| Method | Description |
|---|---|
| AdvanceProgress | Advances the progress bar. |
| AskIntersectionPlates | Gets all intersected plates with the given plates. |
| AskPlatesSpatialRelations | Gets the spatial relations of the plates based on its positions. |
| CheckBodyClash | Check the clash between two bodys. |
| CreateCargo | Creates the ship cargo body based on the input boundary sheets. |
| CreateProgress | Creates a progress bar with given title and number of total steps. |
| DeleteProgress | Deletes the progress bar. |
| GetOutlineSheetbody | Get the outline sheet body of input bodies. |
| GetSheetsEdgesLaidOnTargetSheet | Gets the edges of tool sheet bodies which are laid on a target sheet body |
| RegisterApplicationCallback | Register application callback when application is entered or exited. |
Enumerations¶
| GeneratorClashType Enumeration | Clash status to indicate to show space position relation between two bodies 1. |
Method Detail¶
AdvanceProgress¶
-
Generator.AdvanceProgress¶ Advances the progress bar.
Signature
AdvanceProgress(stepNumber)Parameters: stepNumber (int) – New in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
AskIntersectionPlates¶
-
Generator.AskIntersectionPlates¶ Gets all intersected plates with the given plates.
Signature
AskIntersectionPlates(plate, inSheets, tolerence)Parameters: - plate (
NXOpen.TaggedObject) – - inSheets (list of
NXOpen.TaggedObject) – - tolerence (float) –
Returns: Return type: list of
NXOpen.TaggedObjectNew in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
- plate (
AskPlatesSpatialRelations¶
-
Generator.AskPlatesSpatialRelations¶ Gets the spatial relations of the plates based on its positions.
Signature
AskPlatesSpatialRelations(hull, inSheets, tolerence)Parameters: - hull (
NXOpen.TaggedObject) – - inSheets (list of
NXOpen.TaggedObject) – - tolerence (float) –
Returns: a tuple
Return type: A tuple consisting of (elementIndex, outElements). elementIndex is a list of int. outElements is a list of
NXOpen.TaggedObject.New in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
- hull (
CheckBodyClash¶
-
Generator.CheckBodyClash¶ Check the clash between two bodys.
Signature
CheckBodyClash(bodyA, bodyB)Parameters: - bodyA (
NXOpen.DisplayableObject) – - bodyB (
NXOpen.DisplayableObject) –
Returns: O: clash status for body a and body b
Return type: New in version NX11.0.0.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
- bodyA (
CreateCargo¶
-
Generator.CreateCargo¶ Creates the ship cargo body based on the input boundary sheets.
Signature
CreateCargo(inSheets, tolerence)Parameters: - inSheets (list of
NXOpen.TaggedObject) – - tolerence (float) –
Returns: Return type: list of
NXOpen.TaggedObjectNew in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
- inSheets (list of
CreateProgress¶
-
Generator.CreateProgress¶ Creates a progress bar with given title and number of total steps.
Signature
CreateProgress(numSteps, operationName)Parameters: - numSteps (int) –
- operationName (str) –
New in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
DeleteProgress¶
-
Generator.DeleteProgress¶ Deletes the progress bar.
Signature
DeleteProgress()New in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
GetOutlineSheetbody¶
-
Generator.GetOutlineSheetbody¶ Get the outline sheet body of input bodies.
Signature
GetOutlineSheetbody(bodies, datumPlane)Parameters: - bodies (list of
NXOpen.Body) – - datumPlane (
NXOpen.DatumPlane) –
Returns: O: output outline sheet body
Return type: New in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
- bodies (list of
GetSheetsEdgesLaidOnTargetSheet¶
-
Generator.GetSheetsEdgesLaidOnTargetSheet¶ Gets the edges of tool sheet bodies which are laid on a target sheet body
Signature
GetSheetsEdgesLaidOnTargetSheet(outSheet, inSheets, tolerence)Parameters: - outSheet (
NXOpen.TaggedObject) – - inSheets (list of
NXOpen.TaggedObject) – - tolerence (float) –
Returns: Return type: list of
NXOpen.TaggedObjectNew in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)
- outSheet (
RegisterApplicationCallback¶
-
Generator.RegisterApplicationCallback¶ Register application callback when application is entered or exited.
It is specific for ship customers.
Signature
RegisterApplicationCallback(name, enterCallback, exitCallback)Parameters: - name (str) – The name of the application.
- enterCallback (CallableObject) – The method called when entering the application
- exitCallback (CallableObject) – The method called when exiting the application
New in version NX11.0.2.
License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)