public class Difference extends Complex3dModel
Constructor and Description |
---|
Difference(Abstract3dModel model1,
Abstract3dModel... model2)
Creates the object with the list of models given.
|
Difference(Abstract3dModel model1,
List<Abstract3dModel> model2)
Creates the object with the models given.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Abstract3dModel |
subtractModel(Abstract3dModel model)
Convenient method to create a Difference.
|
protected CSG |
toInnerCSG(FacetGenerationContext context) |
isPrimitive
addModel, 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, toCSG, toCSG, toScad, withTag
public Difference(Abstract3dModel model1, List<Abstract3dModel> model2) throws IllegalValueException
Creates the object with the models given. The first parameter will be the model and the second list of models will be subtracted by it.
If the first parameter is null it throws an IllegalValueException. If the second parameter is null or empty the operation do nothing, just gives back the first model.
model1
- the model subtracted frommodel2
- the model to be subtractedIllegalValueException
- if the first model is nullpublic Difference(Abstract3dModel model1, Abstract3dModel... model2) throws IllegalValueException
Creates the object with the list of models given. The first parameter is used as a model and all subsequent models will be subtracted from it.
If the first parameter is null it throws an IllegalValueException. If any subsequent parameter is null that parameter is ignored. If only one parameter is given this operation does nothing, just gives back the first model.
model1
- the model subtracted frommodel2
- the model to be subtractedIllegalValueException
- if the first model is nullprotected 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 subtractModel(Abstract3dModel model)
Abstract3dModel
subtractModel
in class Abstract3dModel
model
- the model to be subtracted 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.