public class Union extends Complex3dModel
Represents an union of models. It is a descendant of Abstract3dModel
, which means you
can use the convenient methods on unions too.
You don't have to worry about the optimization either, because the generated OpenSCAD code will be the optimal one in every case. The parameters could even contain null elements, those will be ignored during the model generation.
You can use the addModel(eu.printingin3d.javascad.models.Abstract3dModel)
method to add more models to the union.
Modifier and Type | Field and Description |
---|---|
protected List<Abstract3dModel> |
models |
Constructor and Description |
---|
Union(Abstract3dModel... models)
Construct the object.
|
Union(List<Abstract3dModel> models)
Construct the object.
|
Modifier and Type | Method and Description |
---|---|
Abstract3dModel |
addModel(Abstract3dModel model)
Convenient method to create a Union.
|
protected List<Abstract3dModel> |
getChildrenModels() |
protected Boundaries3d |
getModelBoundaries() |
protected Abstract3dModel |
innerCloneModel() |
protected Abstract3dModel |
innerSubModel(IScadGenerationContext context) |
protected SCAD |
innerToScad(IColorGenerationContext context)
Generates the OpenSCAD representation of the model without.
|
protected CSG |
toInnerCSG(FacetGenerationContext context) |
isPrimitive
addModelTo, align, align, align, align, align, annotate, background, cloneModel, debug, findAnnotatedModel, getBoundaries, getTag, isBackground, isDebug, isMoved, isRotated, move, moves, moves, moves, moves, rotate, rotates, rotates, round, subModel, subtractModel, toCSG, toCSG, toScad, withTag
protected final List<Abstract3dModel> models
public Union(List<Abstract3dModel> models)
models
- list of modelspublic Union(Abstract3dModel... models)
models
- array of modelsprotected SCAD innerToScad(IColorGenerationContext context)
Abstract3dModel
innerToScad
in class Abstract3dModel
protected Boundaries3d getModelBoundaries()
getModelBoundaries
in class Abstract3dModel
protected Abstract3dModel innerCloneModel()
innerCloneModel
in class Abstract3dModel
protected CSG toInnerCSG(FacetGenerationContext context)
toInnerCSG
in class Abstract3dModel
public Abstract3dModel addModel(Abstract3dModel model)
Abstract3dModel
addModel
in class Abstract3dModel
model
- the model to be added to this objectprotected Abstract3dModel innerSubModel(IScadGenerationContext context)
innerSubModel
in class Abstract3dModel
protected List<Abstract3dModel> getChildrenModels()
getChildrenModels
in class Abstract3dModel
Copyright © 2014–2020, Printing in 3D. All rights reserved.