Generator Class

class NXOpen.ShipDesign.Generator

Bases: object

Represents Generator which wrap the ship api for china

To obtain an instance of this class, refer to NXOpen.ShipDesign.ShipSession

New 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:
Returns:

Return type:

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”)

AskPlatesSpatialRelations

Generator.AskPlatesSpatialRelations

Gets the spatial relations of the plates based on its positions.

Signature AskPlatesSpatialRelations(hull, inSheets, tolerence)

Parameters:
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”)

CheckBodyClash

Generator.CheckBodyClash

Check the clash between two bodys.

Signature CheckBodyClash(bodyA, bodyB)

Parameters:
Returns:

O: clash status for body a and body b

Return type:

NXOpen.ShipDesign.GeneratorClashType

New in version NX11.0.0.

License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)

CreateCargo

Generator.CreateCargo

Creates the ship cargo body based on the input boundary sheets.

Signature CreateCargo(inSheets, tolerence)

Parameters:
Returns:

Return type:

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”)

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:
Returns:

O: output outline sheet body

Return type:

NXOpen.Body

New in version NX11.0.2.

License requirements: nx_ship_basic (“Ship Basic Design”) OR nx_ship_detail (“Ship Detail Design”)

GetSheetsEdgesLaidOnTargetSheet

Generator.GetSheetsEdgesLaidOnTargetSheet

Gets the edges of tool sheet bodies which are laid on a target sheet body

Signature GetSheetsEdgesLaidOnTargetSheet(outSheet, inSheets, tolerence)

Parameters:
Returns:

Return type:

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”)

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”)